golang
🤖 An MCP server that provides AI assistants with tools to build, test, profile, and manage Go (Golang) projects.
claude mcp add --transport stdio inja-online-golang-mcp docker run -i inja-online/golang-mcp
How to use
This MCP Go Server exposes a suite of tools designed to help AI assistants interact with and manage Go projects. It provides code execution capabilities for Go files, a set of Go-specific operations (build, tests, formatting, module management, and documentation), optimization utilities (profiling, tracing, benchmarking, and race detection), and server management commands to monitor long-running services. When connected via an MCP client, you can invoke actions such as go_run to execute Go programs directly, go_build to compile packages, go_test to run tests with coverage, go_fmt to format code, and go_doc or go_pkg_docs to fetch package documentation from go.dev. There are also specialized tools for project discovery (listing modules, tests, workspace structure) and optional LSP support for advanced code intelligence.
How to install
Prerequisites:
- Docker installed and running (recommended for containerized deployment) or an environment capable of running the Go-based server if using a binary or source build.
- Optional: Go toolchain if you plan to build from source or install from source using Go tooling.
Installation via Docker (recommended):
- Ensure Docker is installed and running on your machine.
- Pull and run the container image: docker pull inja-online/golang-mcp docker run -i inja-online/golang-mcp
Installation from source (advanced):
- Install Go 1.23+ as required by the project.
- Clone the repository: git clone https://github.com/inja-online/golang-mcp.git cd golang-mcp
- Build and run locally (example): go build ./... ./golang-mcp
Prerequisites recap:
- Docker or Go toolchain installed
- Access to the repository (for source builds) or the pre-built container image name
Optional verification:
- Verify that the MCP server starts and responds to client requests, and check logs for any boot-time configuration messages.
Additional notes
Tips and common considerations:
- If you use Docker, ensure the container has network access to any external resources needed by your Go projects (e.g., module proxies).
- The MCP server exposes a wide range of tools; refer to the Quick Reference in the README to understand the exact tool names and usage.
- For LSP-enabled workflows, enable ENABLE_LSP in your environment if you plan to use the optional LSP tools.
- If you encounter issues starting the server, check that the Docker image tag matches the latest release and that your host system has adequate resources (CPU/RAM) for Go builds and tests.
- When using go_pkg_docs or go_pkg_search, ensure network access to go.dev and related module sources so documentation can be fetched successfully.
Related MCP Servers
k8s
Manage Your Kubernetes Cluster with k8s mcp-server
last9
Last9 MCP Server
packt-netops-ai-workshop
🔧 Build Intelligent Networks with AI
tempo
An MCP ( Model Context Protocol ) Server for Grafana Tempo
chromedp
MCP server for browser automation using chromedp
cursor-buddy
🤖 MCP server that gives AI agents deep context about your project - coding standards, knowledge base, todos, database schema & history. Keep your AI assistant consistent and context-aware.