Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

mcp-golang

> 编程语言
Open source

Write Model Context Protocol servers in few lines of go code. Docs at https://mcpgolang.com . Created by https://metoro.io

1.2K stars0 likes0 views
WebsiteGitHub

About

Write Model Context Protocol servers in few lines of go code. Docs at https://mcpgolang.com . Created by https://metoro.io

mcp-golang

mcp-golang is an unofficial implementation of the Model Context Protocol in Go.

Write MCP servers and clients in golang with a few lines of code.

Docs at https://mcpgolang.com

Highlights

  • ️Type safety - Define your tool arguments as native go structs, have mcp-golang handle the rest. Automatic schema generation, deserialization, error handling etc.
  • Custom transports - Use the built-in transports (stdio for full feature support, HTTP for stateless communication) or write your own.
  • ⚡ Low boilerplate - mcp-golang generates all the MCP endpoints for you apart from your tools, prompts and resources.
  • Modular - The library is split into three components: transport, protocol and server/client. Use them all or take what you need.
  • Bi-directional - Full support for both server and client implementations through stdio transport.

Example Usage

Install with go get github.com/metoro-io/mcp-golang

Server Example

…

Using with Claude Desktop

Create a file in ~/Library/Application Support/Claude/claude_desktop_config.json with the following contents:

json
{
"mcpServers": {
  "golang-mcp-server": {
      "command": "",
      "args": [],
      "env": {}
    }
  }
}

Contributions

Contributions are more than welcome! Please check out our contribution guidelines.

Discord

Got any suggestions, have a question on the api or usage? Ask on the discord server. A maintainer will be happy to help you out.

Examples

Some more extensive examples using the library found here:

  • Metoro - Query and interact with kubernetes environments monitored by Metoro

Open a PR to add your own projects!

Server Feature Implementation

Tools

  • Tool Calls
  • Native go structs as arguments
  • Programatically generated tool list endpoint
  • Change notifications
  • Pagination

Prompts

  • Prompt Calls
  • Programatically generated prompt list endpoint
  • Change notifications
  • Pagination

Resources

  • Resource Calls
  • Programatically generated resource list endpoint
  • Change notifications
  • Pagination

Transports

  • Stdio - Full support for all features including bidirectional communication
  • HTTP - Stateless transport for simple request-response scenarios (no notifications support)
  • Gin - HTTP transport with Gin framework integration (stateless, no notifications support)
  • SSE
  • Custom transport support
  • HTTPS with custom auth support - in progress. Not currently part of the spec but we'll be adding experimental support for it.

Client

  • Call tools
  • Call prompts
  • Call resources
  • List tools
  • List prompts
  • List resources

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Go

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言