mcp-golang
Write Model Context Protocol servers in few lines of go code. Docs at
Overview
mcp-golang is an unofficial implementation of the Model Context Protocol in Go programming language, allowing users to write Model Context Protocol servers with minimal code.
To use mcp-golang, install it via Go, define your tool arguments as Go structs, and write your server model using the provided library functions. For detailed instructions, refer to the documentation at https://mcpgolang.com.
- 🛡️ Type safety through native go struct definitions and automatic schema handling. - 🚛 Supports custom transports while providing built-in options. - ⚡ Low boilerplate code generation for MCP endpoints. - 🧩 Modular structure divided into transport, protocol, and server components for flexible usage.
- Creating servers that comply with the Model Context Protocol for various applications.
- Implementing tools and prompts for AI models and user interactions.
- Integrating with Kubernetes environments through supported libraries.
Add to your AI client
Use these steps to connect mcp-golang in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-golang-metoro-io": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-golang-metoro-io"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-golang-metoro-io": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-golang-metoro-io"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-golang-metoro-io": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-golang-metoro-io"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-golang-metoro-io": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-golang-metoro-io"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-golang-metoro-io": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-golang-metoro-io"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-golang-metoro-io": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-golang-metoro-io"
]
}
}
}FAQ
Is mcp-golang suitable for all types of projects?
Yes! It can be used for a variety of projects requiring Model Context Protocol support in Go.
Can I contribute to mcp-golang?
Absolutely! Contributions are welcome, and guidelines are available in the repository.
What transports are supported?
Currently, mcp-golang supports Stdio and SSE, with custom transport support also available.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":173,"uuid":"77313233-c8a7-4495-81bb-9e4dde0b76cd","name":"mcp-golang","title":"mcp-golang","description":"Write Model Context Protocol servers in few lines of go code. Docs at","avatar_url":"https://avatars.githubusercontent.com/u/126341325?v=4","created_at":"2024-12-13T09:12:17.600Z","updated_at":"2024-12-13T12:28:14.068Z","status":"created","author_name":"metoro-io","author_avatar_url":"https://avatars.githubusercontent.com/u/126341325?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/metoro-io/mcp-golang","target":"_self","content":"$29","summary":"$2a","img_url":"https://github.com/metoro-io/mcp-golang/raw/main/resources/mcp-golang-logo.webp","type":null,"metadata":"{\"star\":\"766\",\"license\":\"MIT license\",\"language\":\"Go\",\"is_official\":false,\"latest_commit_time\":\"2025-04-18 14:11:49\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]