MCP Catalogs
Home

mcp-go-sdk

by SetiabudiResearch·7·Score 32

Go SDK for implementing MCP servers with tool execution, resource access, and prompt handling.

developer-toolsai-llmother
4
Forks
0
Open issues
15 mo ago
Last commit
2d ago
Indexed

Overview

The mcp-go-sdk is a complete implementation of the Model Context Protocol in Go, providing transport layers with multiple communication options including stdio, SSE, and WebSocket. It offers server implementations with reflection-based handler invocation, session management, and support for both synchronous and asynchronous tools. The SDK supports resource pattern matching for flexible data access and prompt template rendering.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Building MCP servers in Go for CLI applications
you:Creating file system access tools through MCP
you:Developing web-based AI applications with WebSocket transport
you:What transport protocols are supported?
you:Can I create async tools with this SDK?

When to choose this

Choose this SDK when you need to build MCP servers in Go, especially for Go-centric development teams or when integrating with existing Go infrastructure.

When NOT to choose this

Avoid this if you need a more mature SDK with broader community support or if you're not already invested in the Go ecosystem.

Tools this server exposes

7 tools extracted from the README
  • greetfunc(name string) string

    Greet a person by name

  • myToolfunc(arg1 string, arg2 int) (string, error)

    Process a string with an integer parameter

  • longRunningToolfunc(params string) error

    Execute an asynchronous long-running operation

  • filesfunc(path string) ([]byte, error)

    Access files using path parameter

  • apifunc(version, endpoint string) (interface{}, error)

    Access API with version and endpoint parameters

  • confirmfunc(action string) string

    Generate a confirmation prompt for a given action

  • chatfunc(context string) []protocol.PromptMessage

    Generate a chat prompt for a given context

Comparable tools

mcp-python-sdkmcp-node-sdkmcp-rust-sdk

Installation

go get github.com/SetiabudiResearch/mcp-go-sdk

For Claude Desktop integration:

{
  "mcpServers": {
    "mcp-go-example": {
      "command": "go",
      "args": ["run", "/path/to/your/server.go"]
    }
  }
}

FAQ

What transport protocols are supported?
The SDK supports stdio, SSE (Server-Sent Events), and WebSocket transport protocols for different application scenarios.
Can I create async tools with this SDK?
Yes, the SDK supports both synchronous tools via AddTool() and asynchronous tools via AddAsyncTool().

Compare mcp-go-sdk with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.