Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Releases

v0.6.2

Choose a tag to compare

@MegaGrindStone MegaGrindStone released this 04 May 19:22

This update improves the SSE client implementation by expanding accepted HTTP response codes and fixing URL handling, resulting in better compatibility with various server configurations and more reliable message processing for server-sent events.

Changed

  • Enhance SSEClient to accept both HTTP status codes 200 (OK) and 202 (Accepted) as valid server responses, improving compatibility with different server implementations.

Fixed

  • Correct SSEClient URL handling to properly process relative message URLs provided by the server, ensuring proper resource resolution.

v0.6.1

Choose a tag to compare

@MegaGrindStone MegaGrindStone released this 09 Apr 07:07

This update introduces comprehensive logging configuration options for all components (client, server, StdIO, and SSE) and improves URL handling in the SSE server by automatically converting relative URLs to absolute URLs, enhancing reliability in various deployment scenarios.

Added

  • Add WithClientLogger and WithServerLogger options for customized client and server logging configuration.
  • Add WithStdIOLogger option for StdIO logging configuration.
  • Add WithSSEClientLogger and WithSSEServerLogger options for SSEClient and SSEServer logging configuration.
  • Add WithSSEScheme option to specify protocol (HTTP/HTTPS) for SSEServer message URL construction. Thanks @mikaelmorvan.

Changed

  • Enhance SSEServer to automatically convert relative message URLs to absolute URLs, improving compatibility across different environments. Thanks @mikaelmorvan.

v0.6.0

Choose a tag to compare

@MegaGrindStone MegaGrindStone released this 08 Mar 18:30

This release focuses on significant architectural improvements, introducing the new Server struct with comprehensive ping management capabilities, enhanced connection lifecycle options, and a more responsive client connection model. The changes provide better resource management through dedicated session control methods and a new in-memory server implementation, while simplifying the timeout handling approach through context-based parameters.

Added

  • Add automatic server session closure when ping timeout threshold is exceeded.
  • Add Server struct that replaces the previous Serve function with equivalent functionality.
  • Add ping management options for server: WithServerPingTimeout and WithServerPingTimeoutThreshold.
  • Add server lifecycle callback options: WithServerOnClientConnected and WithServerOnClientDisconnected.
  • Add connection management methods: Disconnect for Client struct and Shutdown for ServerTransport interface.
  • Add ping management options for client: WithClientPingTimeout and WithClientOnPingFailed.
  • Add Stop method to Session interface for controlled session termination.
  • Add WithSSEClientMaxPayloadSize option to configure maximum payload size in SSE clients.
  • Add memory server implementation.

Changed

  • Modify Connect method to return immediately after session establishment instead of blocking indefinitely.
  • Update StartSession method in ClientTransport to return a Session object instead of an iterator.

Removed

  • Remove WithServerWriteTimeout and WithServerReadTimeout options as they are no longer necessary with the new timeout model.
  • Remove WithClientWriteTimeout and WithClientReadTimeout options in favor of using context timeout parameters.
  • Remove Serve function in favor of the more flexible Server struct implementation.
  • Remove Send function from ClientTransport interface as this functionality is now handled by the Session interface.

v0.5.1

Choose a tag to compare

@MegaGrindStone MegaGrindStone released this 16 Feb 18:01

This release focuses on improving error handling and filesystem server compatibility. Key improvements include enhanced error messaging in the JSONRPCError struct, better filesystem server alignment with the official MCP implementation, and the addition of comprehensive testing. These changes significantly improve debugging capabilities and ensure more reliable filesystem operations.

Added

  • Add comprehensive test suite for filesystem server implementation to ensure reliability and correctness.

Changed

  • Enhance filesystem server compatibility with official MCP implementation.
  • Improve error message clarity in JSONRPCError struct for better debugging.
  • Implement detailed error string representation in JSONRPCError struct, replacing generic "Internal error" messages.
  • Add specific error handling for CallTool requests with dedicated CallToolResult error reporting.
  • Exclude .git directory from directory_tree tool results to improve relevance of filesystem operations.

v0.5.0

Choose a tag to compare

@MegaGrindStone MegaGrindStone released this 09 Feb 12:01

This release focuses on improving JSON serialization flexibility and simplifying I/O interfaces. The changes include making annotations optional in resource types and streamlining the StdIO transport implementation by delegating closing responsibilities to callers.

Changed

  • Make Annotations field nullable in resource types to support optional JSON serialization.
  • Simplify StdIO transport by using io.Reader and io.Writer interfaces instead of closeable variants.

Removed

  • Remove Close method from StdIO transport as part of I/O interface simplification.

v0.4.2

Choose a tag to compare

@MegaGrindStone MegaGrindStone released this 21 Jan 15:38

This release introduces a new capability for runtime server information retrieval through the ServerInfo method, enabling clients to dynamically access server configuration and capabilities without additional setup requirements.

Added

  • ServerInfo method to Client struct for retrieving server information and capabilities at runtime.

v0.4.1

Choose a tag to compare

@MegaGrindStone MegaGrindStone released this 18 Jan 20:34

This release implements audio content support as specified in the latest MCP specification update, adding necessary enum values and maintaining consistency with existing content type structures. The changes enable seamless integration of audio processing capabilities while preserving compatibility with existing image content handling patterns.

Added

  • ContentTypeAudio to ContentType enum.

v0.4.0

Choose a tag to compare

@MegaGrindStone MegaGrindStone released this 10 Jan 03:26

This release changes how clients handle server capabilities during initialization. Instead of requiring users to define server capabilities when creating a client, which proved impractical in real-world usage where MCP hosts often lack compile-time knowledge of server capabilities, the client can now connect to any server and dynamically check for desired capabilities. This is implemented through new methods like PromptServerSupported and ResourceServerSupported, allowing runtime verification of specific server features.

Added

  • Added PromptServerSupported, ResourceServerSupported, ToolServerSupported, and LoggingServerSupported methods to Client struct to check if the server supports specific features.
  • Added more tests for mcp package.

Removed

  • ServerRequirement for creating a new client.

v0.3.1

Choose a tag to compare

@MegaGrindStone MegaGrindStone released this 07 Jan 03:52

This release focuses on adhering to the official JSON Schema specification and improving metadata management. Key changes include the introduction of unified resource content handling, enhanced annotation support, and simplified JSON handling by removing third-party schema validation dependencies. The changes in Tool's InputSchema and CallToolParams' Arguments provide more flexibility by allowing users to implement their own JSON Schema validation.

Added

  • Annotations struct for metadata management
  • ResourceContents struct for unified text and blob handling
  • UnsubscribeResource function in subscription handler
  • WithInstructions server option for client guidance
  • String method for LogLevel type

Changed

  • Rename PromptRole to Role for better clarity
  • Enhance Content structure with new Annotations and ResourceContent fields
  • Update resource handling to use ResourceContent for embedded resources
  • Add pagination support with Cursor and NextCursor fields in template operations
  • Add Total field to completion results for progress tracking
  • Implement Annotations support across Resource and ResourceTemplate types
  • Update LogData to use json.RawMessage for flexible data handling
  • Change InputSchema field in Tool struct to use json.RawMessage type
  • Change Arguments field in CallToolParams struct to use json.RawMessage
  • Adjust filesystem and everything servers for current schema

Removed

  • Remove Text and Blob fields from Resource type (functionality moved to ResourceContent)

v0.3.0

Choose a tag to compare

@MegaGrindStone MegaGrindStone released this 04 Jan 18:02

This release introduces significant improvements in API consistency and modernizes the codebase by adopting Go 1.23's iterator pattern. Key changes include restructured parameter naming conventions, simplified package organization, enhanced transport interfaces, and improved SSE handling through the integration of go-sse library. The adoption of iterators for handling sessions, messages, and streaming operations provides a more efficient and safer alternative to channels for sequential data processing.

Added

  • Session interface for handling session on ServerTransport interfaces.
  • ProgressReporter function type for reporting progress in server primitive operations
  • ResourceSubscriptionHandler interface for handling resource subscriptions.

Changed

  • Refactored parameter naming convention for Client request methods to improve consistency between method names and their parameters. Previously, parameter names like PromptsListParams and PromptsGetParams used noun-verb style while methods used verb-noun style. Now, parameter names follow the same verb-noun pattern as their corresponding methods (e.g., ListPromptsParams and GetPromptParams).
  • Refactored the result name of the request calls, either in Client or Server interfaces. This is done to improve consistency between method names and their results. For example, ListPrompts now returns ListPromptsResult instead of PromptList.
  • Use structured parameter types (such as ListPromptsParams or GetPromptParams) in Client method signatures when making server requests, rather than using individual parameters. For example, instead of passing separate cursor and progressToken parameters to ListPrompts, or name and arguments to GetPrompt, use a dedicated parameter struct.
  • Utilize go-sse to handle SSEClient by @tmaxmax.
  • Utilize go-sse's Session to sent the event messages from SSEServer.
  • Moved mcp package from pkg/mcp to root folder and pkg/servers package to servers package to simplify import paths. The pkg directory added unnecessary nesting and noise in import paths (e.g., from github.com/MegaGrindStone/go-mcp/pkg/mcp to github.com/MegaGrindStone/go-mcp, and from github.com/MegaGrindStone/go-mcp/pkg/servers to github.com/MegaGrindStone/go-mcp/servers).
  • Split Transport interface into ServerTransport and ClientTransport interfaces. ClientTransport doesn't need session-based messages as Client would just use one Session in its lifecycle.
  • Use iterator pattern for sessions in ServerTransport and messages in ClientTransport.
  • Use iterator pattern for streaming logs in LogHandler.
  • Use iterator pattern for all the updaters.
  • Use io.ReadCloser and io.WriteCloser for StdIO transport.
  • Adjust everything server for current interfaces.
  • Adjust filesystem server for current interfaces.

Removed

  • pkg/mcp package (moved to root for cleaner imports).
  • pkg/servers package (moved to servers for cleaner imports).
  • Transport interface (replaced by ServerTransport and ClientTransport)
  • ProgressReporter interface (replaced with function type for simpler progress reporting)
  • ResourceSubscribedUpdater interface (replaced with ResourceSubscriptionHandler)