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.
details in #159 ## Summary by CodeRabbit - **Refactor** - Streamlined the server hook system with a unified interface-based design for better extensibility and context management. - Consolidated hook logic...
I am experimenting with dynamically changing the tool offering, and for a local server with one user it works really well but for a remote server with many users we...
fix for client can not get tool annotation, and add some tests ## Summary by CodeRabbit - **Bug Fixes** - Improved validation and display of tool annotation metadata in tool...
### New Features Introducing a new Hook method: **AddOnRequestInitialization** Enabling users to perform validation or preprocessing operations before the actual request handling—functioning similarly to middleware. Execution proceeds only upon successful...
to solve the #162 the ToolCall request should return an HTTP 202 (Accepted) status code immediately, without waiting for `handleMessage` to complete. like [https://github.com/modelcontextprotocol/python-sdk src/mcp/server/sse.py 174](https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/sse.py#L174) ## Summary by CodeRabbit...
## Problem Description We observe intermittent 504 errors when handling long-running requests through Nginx Ingress, despite the SSE backend functioning properly. Below are the key details: ## Environment ### 1....
Replace string ping messages system added in https://github.com/mark3labs/mcp-go/pull/80 with [MCP spec compliant JSON-RPC requests](https://modelcontextprotocol.io/specification/2024-11-05/basic/utilities/ping). - Update request handler to ignore ping responses (add `Result` field to `baseMessage` to disambiguate empty...
This PR implements the basic streamable-http transport for the client side. This implementation follows the [specification](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports), including (but not limited to) - upgradable to SSE response - SessionID management -...
There is data race between [func (s *SSEServer) Start(addr string) error](https://github.com/mark3labs/mcp-go/blob/37ac814a6010484d409bef15f6f4b015f486bdaa/server/sse.go#L192C2-L192C10) and [func (s *SSEServer) Shutdown(ctx context.Context) error](https://github.com/mark3labs/mcp-go/blob/37ac814a6010484d409bef15f6f4b015f486bdaa/server/sse.go#L203C2-L203C4)