Golang Mcp Server

by inja-online

250 downloads
Not rated
GitHub

About

MCP Go Server connects AI assistants like Claude directly to the Go runtime. It acts as a bridge, giving your AI the necessary tools to execute, manage, and optimize Go-based development workflows efficiently.

Details

Author
inja-online
Downloads
250
Categories
Other

- 22 tools covering execution, build, test, format, optimization, and server management
- 8 resources to discover modules, build tags, tests, and workspace structure
- 7 guided prompts for project setup, testing, debugging, and deployment
- Code execution directly via go run and full Go operations (build, test, format, lint)
- Optimization tools: profiling, tracing, benchmarking, race detection, memory profiling
- Optional LSP integration (requires ENABLE_LSP=true)
- Cross-platform support for Linux, macOS, and Windows

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Golang Mcp Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Integrate the server into an MCP client by configuring its path and optional settings. To enable Language Server Protocol features, set the environment variable ENABLE_LSP=true before starting the server.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "golang mcp server": {
            "mcp-go": {
                "command": "/usr/local/bin/mcp-go",
                "args": [],
                "env": {
                    "DISABLE_NOTIFICATIONS": "true"
                }
            }
        }
    }
}

McpServers

{
    "mcp-go": {
        "command": "/usr/local/bin/mcp-go",
        "args": [],
        "env": {
            "DISABLE_NOTIFICATIONS": "true"
        }
    }
}

Empower your AI assistant to build with Go. MCP Go Server gives LLMs the ability to control Go development workflows from execution to optimization by serving as a secure bridge between the model and the runtime.


Features



- 22 Comprehensive Tools: Code execution, Go operations, optimization, server management, package documentation, and optional LSP support
- 8 Discovery Resources: Access Go modules, build tags, tests, workspace structure, and package documentation
- 7 Guided Prompts: Step-by-step guides for project setup, testing, optimization, debugging, dependencies, code review, and deployment
- Code Execution: Execute Go files directly with go run
- Go Operations: Build, test, format, and manage Go modules
- Optimization Tools: Performance profiling, benchmarking, and race detection
- Server Management: Start, stop, and monitor long-running Go servers
- Package Documentation: Fetch package documentation from go.dev (pkg.go.dev)
- Project Discovery: Discover Go modules, build tags, test files, and workspace structure
- LSP Support: Optional Language Server Protocol integration (requires ENABLE_LSP=true)
- Cross-Platform: Support for Linux, macOS, and Windows
- Cross-Compilation: Build for different platforms and architectures
-

Tools (22 total)



Code Execution (1):
- go_run - Execute Go files directly

Go Operations (7):
- go_build - Build Go packages
- go_test - Run tests with coverage
- go_fmt - Format Go code
- go_mod - Manage Go modules
- go_doc - Generate documentation
- go_lint - Lint Go code
- go_cross_compile - Cross-compile for different platforms

Optimization (6):
- go_profile - Generate performance profiles
- go_trace - Generate execution traces
- go_benchmark - Run benchmarks
- go_race_detect - Detect race conditions
- go_memory_profile - Generate memory profiles
- go_optimize_suggest - Get optimization suggestions

Server Management (5):
- go_server_start - Start background servers
- go_server_stop - Stop servers
- go_server_list - List running servers
- go_server_logs - Get server logs
- go_server_status - Get server status

Package Documentation (3):
- go_pkg_docs - Fetch package docs from go.dev
- go_pkg_search - Search for packages
- go_pkg_examples - Extract examples

LSP Tools (5, optional - requires ENABLE_LSP=true):
- lsp_start_session - Start LSP session
- lsp_shutdown_session - Shutdown LSP session
- lsp_request - Send LSP request
- lsp_notify - Send LSP notification
- lsp_subscribe_diagnostics - Subscribe to diagnostics

Resources (8 total)



- go://modules - Go modules and dependencies
- go://build-tags - Build tags and constraints
- go://tests - Test files and benchmarks
- go://workspace - Workspace structure
- go://pkg-docs/{path} - Package documentation
- go://tools - List all available tools
- go://prompts - List all available prompts
- go://resources - List all available resources

Prompts (7 total)



- setup-go-project - Project setup guide
- write-go-tests - Test writing template
- optimize-go-performance - Performance optimization guide
- debug-go-issue - Debugging guide
- add-go-dependency - Dependency management guide
- go-code-review - Code review checklist
- go-server-deployment - Deployment guide

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.