MCP Golang

April 28, 2026 ยท View on GitHub

A Model Context Protocol (MCP) server that provides Go language tools for LLMs to analyze, test, and format Go code.

Features:

  • Full set of Go code analysis tools (go vet, go test, go fmt, golint, deadcode, go mod tidy)
  • TypeScript implementation with strict type checking
  • Comprehensive error handling and validation
  • Tool output passed directly to LLMs

๐Ÿš€ Getting Started

Available Go Tools

  • go_analyze โ€” Comprehensive code analysis using golangci-lint (configurable severity, auto-fix)
  • go_fix โ€” Code cleanup: runs go mod tidy, goimports, and gofumpt in sequence
  • go_test โ€” Run Go tests with optional coverage reports, race detection, and benchmarks

All tools require an absolute wd (working directory) path parameter.

License

MIT