mcp-golang
Write Model Context Protocol servers in few lines of go code. Docs at https://mcpgolang.com . Created by https://metoro.io
How to use
The mcp-golang server allows you to quickly implement Model Context Protocol servers using minimal Go code. It simplifies the process of creating robust and efficient servers, making it an ideal choice for developers who need to integrate context-aware models into their applications with ease. By leveraging this tool, you can focus on your model's logic rather than the underlying server infrastructure.
Once you have the mcp-golang server running, you can interact with it by sending HTTP requests that conform to the Model Context Protocol. This server is designed to handle context-specific queries, allowing you to retrieve or manipulate model data efficiently. For best results, structure your requests to align with the context definitions used in your models, ensuring you utilize the full capabilities of the MCP.
How to install
Prerequisites
To use mcp-golang, ensure you have Go installed on your machine. You can download it from golang.org.
Option A: Quick Start
You can quickly start using mcp-golang by cloning the repository directly from GitHub:
git clone https://github.com/metoro-io/mcp-golang
cd mcp-golang
go run main.go
Option B: Global Install Alternative
If you prefer to install it globally, you can build and install it using the following commands:
go install github.com/metoro-io/mcp-golang@latest
Make sure your Go bin directory is in your PATH to access the server from anywhere.
Additional notes
When configuring your mcp-golang server, pay attention to the environment variables that control server behavior, such as MCP_PORT for the port number. A common issue is forgetting to set the context properly, which can lead to unexpected errors during model interactions. Always verify your model definitions against your server configurations.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go