Skip to content

Releases: BackendStack21/go-mcp

v1.2.0

30 May 15:17
d71a60b

Choose a tag to compare

v1.2.0

⚡ Performance

  • JSON-RPC responses now built from typed structs instead of map[string]any.
    Every request handler previously assembled its result payload from ad-hoc maps,
    which forced per-request map allocation and runtime key-sorting in encoding/json.
    Switching to typed structs produces byte-for-byte identical JSON with measurably
    less work:

    Path Time Allocations Bytes
    initialize ~7.4µs → ~4.0µs 48 → 18 4553 → 2824
    tools/call ~7.7µs → ~6.3µs 48 → 35 4464 → 3584
    tools/list ~flat 72 → 67 5766 → 5350

    No API or wire-format changes — existing clients are unaffected.

🧪 CI / Tooling

  • Added a GitHub Actions CI workflow running on every push and PR to main:
    gofmt verification, go vet, race-enabled tests with coverage, library and
    example builds, and a benchmark smoke run. Matrix covers Go 1.24.3 (module
    minimum) and stable.
  • Added benchmarks for the initialize, tools/list, and tools/call paths.
  • Formatted examples/db-explorer/main.go to satisfy the new gofmt gate.

Full changelog: v1.1.0...v1.2.0

v1.0.0 — First Stable Release

04 May 10:21

Choose a tag to compare

go-mcp v1.0.0

Zero-dependency Model Context Protocol server framework for Go.

What is go-mcp?

Turn any Go program into an AI-accessible service. Register tools, resources, and prompts — the MCP client discovers and calls them over stdin/stdout JSON-RPC 2.0. Single binary. Zero deps.

Features

  • 8 MCP methods — full spec: initialize, tools/list, tools/call, resources/list, resources/read, prompts/list, prompts/get, notifications/initialized
  • Zero dependencies — Go stdlib only (encoding/json, context, io, os)
  • 97.8% test coverage — 28 tests including Docker E2E
  • 4 example servers — greeter, db-explorer, sys-monitor, fs-navigator
  • Docker E2E pipeline — validates full MCP protocol in containers
  • Beautiful docs — use-case-driven README + GitHub Pages landing page

Quick Start

go get github.com/BackendStack21/go-mcp
srv := gomcp.NewServer("my-server", "1.0.0")
srv.AddTool(gomcp.Tool{Name: "echo", ...})
srv.Run()

Numbers

Metric Value
Lines of code ~350
Dependencies 0
Tests 28
Coverage 97.8%
Cold start <1ms
Binary size ~3MB
Docker image ~15MB

License

MIT