mcp-go
mcp-go copied to clipboard
A Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
## What this PR does 1. This PR fixes a data race issue between `SSEServer.Start` and `SSEServer.Shutdown` by adding a `sync.RWMutex` to the `SSEServer` struct. 2. Fix test error on...
Hi, we encountered a panic because the session channel is closed twice. 1. https://github.com/mark3labs/mcp-go/blob/71b910bee8fee098e3412177dac8548453eee5c0/server/sse.go#L206 2. https://github.com/mark3labs/mcp-go/blob/71b910bee8fee098e3412177dac8548453eee5c0/server/sse.go#L309 This can happen when the request context and server are shut down simultaneously. Additionally,...
你好,我在我现有Web项目中想集成mcp-go框架遇到的一些问题,我是想通过原有项目增加/sse路由去接入mcp服务倒是没有找到相关示例。
When I run the command "go test -v './...'", there is the error ``` --- FAIL: TestStdioMCPClient (0.68s) stdio_test.go:42: Failed to create client: failed to start stdio transport: failed to...
Add OnUnregisterSession hook functionality to complement the existing OnRegisterSession hooks, allowing code to run when a client session is being removed from the server. In some cases, the server may...
[First PR to project] Export sendNotificationToAllClients so it can be called from the MCP server to send unsolicited notifications to all clients (sessions). I have a use-case for my MCP...
Looking at https://github.com/mark3labs/mcp-go/blob/main/mcp/types.go#L647, it looks as though `Annotations` is a pointer to an anonymous structure, and the only way I can create that is with this, which is slightly awkward:...
## Summary by CodeRabbit - **New Features** - Added detailed documentation on session management, notifications, and per-session tools in the user guide. - Introduced support for session-specific tools, allowing customization...
What is the use of the line `close(ready)`? https://github.com/mark3labs/mcp-go/blob/9f39a43b4e9d756e386289dd687f57cf9ffacfe0/client/transport/stdio.go#L93 
fix https://github.com/mark3labs/mcp-go/issues/167 According to the mcp [sepecification ](https://modelcontextprotocol.io/specification/2025-03-26/basic/lifecycle#stdio)  Kill proces on windows should recursively kill all children process because there are no process group on windows. Kill process on...