Minimal Go library and binary for building spec-compliant MCP servers with automatic JSON Schema from struct tags.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Tiny Go MCP Server.
A lightweight Model Context Protocol (MCP) toolkit for Go. Build spec-compliant MCP servers (stdio, streamable HTTP, legacy SSE) with tools, resources, and prompts β minimal boilerplate and automatic JSON Schema from Go structs.
Built on the official modelcontextprotocol/go-sdk.
Requirements: Go 1.26+ (download).
| Tiny Go MCP Server | Full frameworks | |
|---|---|---|
| Goal | Thin helper on official go-sdk + tiny static binary | Full MCP feature surface |
| Deps | Official go-sdk only | Varies |
| Binary | ~5MB stripped, no runtime on host | Often larger stacks |
| Schemas | Inferred from struct tags | Manual or builder APIs |
Use this project as a library (tinymcp package) or as a starting template (cmd/tiny-go-mcp).
| tinymcp (this repo) | mcp-go | go-sdk alone | |
|---|---|---|---|
| Best for | Thin helper on go-sdk, tiny binary | Rich helpers, large ecosystem | Full control, no extra layer |
| Schema | Struct tags β auto JSON Schema | Builder APIs / helpers | AddTool + generics yourself |
| Transport | stdio (Start()), streamable HTTP (StartHTTP), legacy SSE (StartSSE) | stdio, SSE, HTTP, β¦ | All transports |
| Deps | go-sdk only | Standalone module | go-sdk only |
Choose tinymcp when you want the official protocol implementation with minimal boilerplate and a small static server binary.
tinymcp is a thin helper on the official go-sdk β not a replacement for it.
We reduce setup and transport boilerplate (server creation, registration error handling, stdio/HTTP/SSE, TextResult, deploy examples). The protocol implementation, generics, and schema inference still come from modelcontextprotocol/go-sdk.
That means handler code uses both imports β and that is intentional:
| Use tinymcp for | Use go-sdk (mcp) for |
|---|---|
NewServer, RegisterTool, transports | Handler signatures (CallToolRequest, GetPromptRequest, β¦) |
| Safe registration (errors, not panics) | Tool annotations, elicitation, custom protocol features |
TextResult, HTTP middleware helpers | Anything via server.RawServer() |
We are not aiming for a non-leaky facade that hides the SDK. If you need full control, call RawServer() or use go-sdk directly β same underlying server, no lock-in.
Same protocol implementation β tinymcp removes repetitive setup. Handler code still imports mcp for request types in both cases.
go-sdk alone (minimal stdio server):
tinymcp (same tool, less boilerplate):
| tinymcp adds | Still on go-sdk (mcp) |
|---|---|
NewServer(name, ver) | Handler signatures (CallToolRequest, prompts, resources) |
RegisterTool + struct-tag JSON Schema | Tool annotations via RegisterToolDef + mcp.Tool |
| Safe registration errors (no panics) | Advanced session / event-store APIs |
Start() / StartHTTP() / HTTP middleware | Full control via RawServer() |
Use go-sdk alone when you want zero wrapper. Use tinymcp when you want less setup while staying on the official implementation.
| Method | API | Typical clients |
|---|---|---|
| stdio (default) | Start() | Cursor, Claude Desktop, Windsurf (local subprocess) |
| Streamable HTTP | StartHTTP(addr, opts) or StreamableHTTPHandler | Remote MCP clients, gateways, browser tools |
| Legacy SSE | StartSSE(addr, opts) or SSEHandler | Older clients on MCP 2024-11-05 SSE transport |
Start() runs stdio (stdin/stdout) β what most local AI clients expect.
For HTTP/SSE, tinymcp wraps the official go-sdk handlers with minimal options:
Stateless mode (Stateless: true) is the default in examples: one POST JSON-RPC per request, no long-lived SSE GET stream, and no server-initiated messages. Omit it or use session options when you need full streamable HTTP sessions β see docs/HTTP.md.
See docs/HTTP.md and examples/http. To host for Smithery URL listing (no Docker for end users), use examples/http-deploy. For advanced session routing or event stores, use server.RawServer() with the go-sdk directly.
Step-by-step guide: docs/QUICKSTART.md. AI codegen: SYSTEM_PROMPT.md.
See examples/minimal for a runnable copy-paste example.
Requires tagged module template/ (v1.1.1+) for stdio, or template-http/ for streamable HTTP:
Or copy examples/minimal, template/, or template-http/ directly.
Both install paths produce a binary named tiny-go-mcp:
Or build from source (binary in the repo root):
| Method | Binary name | Typical path |
|---|---|---|
go install β¦/cmd/tiny-go-mcp | tiny-go-mcp | $(go env GOPATH)/bin/tiny-go-mcp |
make build / make release | tiny-go-mcp | ./tiny-go-mcp in the repo |
make install | tiny-go-mcp | $(go env GOPATH)/bin/tiny-go-mcp |
These tools exist for MCP integration demos, not production logic. Agents should compute math and write greetings in-chat unless they are explicitly testing tool calls.
| Tool | When to use | When not to / alternative | Arguments |
|---|---|---|---|
add | Test that the client can call an addition tool | Real arithmetic β compute locally or use a calculator MCP | a, b |
subtract | Test subtraction wiring (use instead of add for subtraction tests) | Real arithmetic β compute locally | a, b |
greet | Test a text-returning tool (use instead of add/subtract for messaging demos) | User-facing hello β reply in the conversation | name (required), greeting (optional) |
MCP servers communicate over stdio. Point your client at the compiled binary path.
Template config: examples/mcp-client-config.json (copy and set the absolute path to tiny-go-mcp).
Logging: The protocol uses stdin/stdout. Server logs (if any) go to stderr only. Set TINY_GO_MCP_VERBOSE=1 on the server process to enable startup log lines.
Settings β Features β MCP β Add server:
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/kioie-tiny-go-mcp-server)<a href="https://allmcps.com/mcp/kioie-tiny-go-mcp-server"><img src="https://allmcps.com/api/badge/kioie-tiny-go-mcp-server?style=directory" alt="Tiny Go MCP Server on AllMCPs" /></a>