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

v0.3.0

Choose a tag to compare

@MegaGrindStone MegaGrindStone released this 04 Jan 18:02
· 72 commits to main since this release

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)