Golang

Developer toolsDocs and learning

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

Your AI app calls the Golang MCP server, which does the developer tools and docs and learning work and sends the result back to the chat.

About Golang

Golang is a community MCP server from metoro-io, filed in our directory under developer tools and docs and learning. Write Model Context Protocol servers in few lines of go code. Docs at https://mcpgolang.com . Created by https://metoro.io.

At a glance

Publisher
metoro-io (community)
Runs
See the README for setup
Written in
Go
License
MIT
GitHub stars
1,234

How to set up Golang

  1. Follow the install steps in the Golang README; it is written in Go, so have that toolchain ready.
  2. Check the Golang README for keys or settings; the registry lists none that Golang requires.
  3. Add Golang to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Golang tools to confirm the connection.
  5. Run one read-only task with Golang first, and keep your app asking before each tool call until the results look right.

Golang compared with similar servers

  • Simutil by dungngminh has fewer GitHub stars than Golang (1.2k against 1.2k); both are community servers, and both run locally.
  • Magic Cloud by polterguy has more GitHub stars than Golang (1.3k against 1.2k); both are community servers, and both run locally.
  • Token Savior by Mibayy has fewer GitHub stars than Golang (1.2k against 1.2k); both are community servers, and both run locally.

Before you connect Golang

  • Give Golang its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Golang tool call until you trust what it does with them.
  • Treat text that Golang fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Golang on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Golang

How marketing and sales teams put Golang to work, by company size. Pick the size closest to yours and start Golang on one use case.

Small business

  • A small business with a developer can use Golang to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Golang to explain and fix a marketing site issue without context switching between tools.
  • A small business can use Golang to keep help docs and how-tos current, answering customer questions before they become tickets.
  • Golang runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Golang to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Golang to keep scripts and automations documented and versioned as they change.
  • Marketing teams can connect Golang so agents write from current product docs, keeping launch copy accurate.
  • Start Golang on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Golang with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Golang so web and marketing engineering share one reviewed way of working with AI.
  • Enterprises can serve approved docs through Golang, so every agent answers from the same source of truth.
  • Golang is a community server, so have security review the code and pin a version before Golang touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Golang README

From metoro-io/mcp-golang on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

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
package main

import (
    "fmt"
    "github.com/metoro-io/mcp-golang"
    "github.com/metoro-io/mcp-golang/transport/stdio"
)

// Tool arguments are just structs, annotated with jsonschema tags
// More at https://mcpgolang.com/tools#schema-generation
type Content struct {
    Title       string  `json:"title" jsonschema:"required,description=The title to submit"`
    Description *string `json:"description" jsonschema:"description=The description to submit"`
}
type MyFunctionsArguments struct {
    Submitter string  `json:"submitter" jsonschema:"required,description=The name of the thing calling this tool (openai, google, claude, etc)"`
    Content   Content `json:"content" jsonschema:"required,description=The content of the message"`
}

func main() {
    done := make(chan struct{})

    server := mcp_golang.NewServer(stdio.NewStdioServerTransport())
    err := server.RegisterTool("hello", "Say hello to a person", func(arguments MyFunctionsArguments) (*mcp_golang.ToolResponse, error) {
        return mcp_golang.NewToolResponse(mcp_golang.NewTextContent(fmt.Sprintf("Hello, %server!", arguments.Submitter))), nil
    })
    if err != nil {
        panic(err)
    }

    err = server.RegisterPrompt("promt_test", "This is a test prompt", func(arguments Content) (*mcp_golang.PromptResponse, error) {
        return mcp_golang.NewPromptResponse("description", mcp_golang.NewPromptMessage(mcp_golang.NewTextContent(fmt.Sprintf("Hello, %server!", arguments.Title)), mcp_golang.RoleUser)), nil
    })
    if err != nil {
        panic(err)
    }

    err = server.RegisterResource("test://resource", "resource_test", "This is a test resource", "application/json", func() (*mcp_golang.ResourceResponse, error) {
        return mcp_golang.NewResourceResponse(mcp_golang.NewTextEmbeddedResource("test://resource", "This is a test resource", "application/json")), nil
    })

    err = server.Serve()
    if err != nil {
        panic(err)
    }

    <-done
}
HTTP Server Example

You can also create an HTTP-based server using either the standard HTTP transport or Gin framework:

// Standard HTTP
transport := http.NewHTTPTransport("/mcp")
transport.WithAddr(":8080")
server := mcp_golang.NewServer(transport)

// Or with Gin framework
transport := http.NewGinTransport()
router := gin.Default()
router.POST("/mcp", transport.Handler())
server := mcp_golang.NewServer(transport)

Note: HTTP transports are stateless and don't support bidirectional features like notifications. Use stdio transport if you need those features.

Client Example

Checkout the examples/client directory for a more complete example.

package main

import (
    "context"
    "log"
    mcp "github.com/metoro-io/mcp-golang"
    "github.com/metoro-io/mcp-golang/transport/stdio"
)

// Define type-safe arguments
type CalculateArgs struct {
    Operation string `json:"operation"`
    A         int    `json:"a"`
    B         int    `json:"b"`
}

func main() {
   cmd := exec.Command("go", "run", "./server/main.go")
   stdin, err := cmd.StdinPipe()
   if err != nil {
    log.Fatalf("Failed to get stdin pipe: %v", err)
   }
   stdout, err := cmd.StdoutPipe()
   if err != nil {
    log.Fatalf("Failed to get stdout pipe: %v", err)
   }

   if err := cmd.Start(); err != nil {
    log.Fatalf("Failed to start server: %v", err)
   }
   defer cmd.Process.Kill()
    // Create and initialize client
    transport := stdio.NewStdioServerTransportWithIO(stdout, stdin)
    client := mcp.NewClient(transport)
    
    if _, err := client.Initialize(context.Background()); err != nil {
        log.Fatalf("Failed to initialize: %v", err)
    }

    // Call a tool with typed arguments
    args := CalculateArgs{
        Operation: "add",
        A:         10,
        B:         5,
    }
    
    response, err := client.CallTool(context.Background(), "calculate", args)
    if err != nil {
        log.Fatalf("Failed to call tool: %v", err)
    }
    
    if response != nil && len(response.Content) > 0 {
        log.Printf("Result: %s", response.Content[0].TextContent.Text)
    }
}
Using with Claude Desktop

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

{
"mcpServers": {
  "golang-mcp-server": {
      "command": "<your path to golang MCP server go executable>",
      "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

Questions about Golang

What is the Golang MCP server?

Write Model Context Protocol servers in few lines of go code. Docs at https://mcpgolang.com . Created by https://metoro.io. Golang is maintained by metoro-io on GitHub at metoro-io/mcp-golang, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Golang MCP server?

Golang doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (metoro-io/mcp-golang). Like most servers, Golang ends with a command or URL you paste into your AI app's MCP config.

Does Golang need an API key?

The registry lists no required keys for Golang. Check the Golang README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Golang an official MCP server?

No. Golang is a community server maintained by metoro-io. Community servers can be excellent; read the code and the open issues before you give Golang access to company data.

What license is Golang under?

Golang is released under the MIT license, according to its GitHub repository. The license covers the code of Golang; the service it connects to has its own terms.