Godoctor
A Model Context Protocol server for Go developers
What is Godoctor?
Godoctor is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol server for go developers
A Model Context Protocol server for Go developers
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A Model Context Protocol server for Go developers
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx godoctorConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Godoctor
GoDoctor is an MCP server and CLI extension purpose-built for Go developers, providing structured tools that help AI coding agents navigate, edit, build, and test Go codebases safely. It runs a persistent background gopls daemon over a stateful JSON-RPC session to deliver fast type information, and it intercepts Go file operations so the agent uses specialized tools like smart_read and smart_edit instead of raw file commands. Developers use GoDoctor to reduce syntax errors introduced by AI edits and to conserve context window tokens when working on large Go projects.
Prerequisites
- Go 1.21+ installed with GOPATH/bin on your PATH
- An MCP-compatible client such as Claude Code or Gemini CLI
- gopls installed (automatically used by GoDoctor as a background daemon)
- A Go project or module to work with
- Git (for installing from source if needed)
Install the GoDoctor binary
Use go install to compile and place the godoctor binary into your GOPATH/bin directory, making it available as a system command.
go install github.com/danicat/godoctor/cmd/godoctor@latestVerify the installation
Confirm the binary is accessible and list all registered MCP tools to understand what GoDoctor exposes to the AI agent.
godoctor --version
godoctor --list-toolsRegister GoDoctor as an MCP server in Claude Code
Use the claude mcp add command to register GoDoctor as a user-scoped stdio MCP server. This makes it available across all Claude Code sessions.
claude mcp add --transport stdio --scope user godoctor -- godoctorAppend agent instructions to your project
GoDoctor can emit system instructions tailored for LLM agents. Appending these to your CLAUDE.md ensures the AI agent understands how to use the GoDoctor tools correctly.
godoctor --agents >> CLAUDE.mdStart your coding session
Open your Go project in Claude Code. GoDoctor runs automatically in the background — the agent will discover and call tools like smart_read, smart_edit, and smart_build whenever it works on .go files. Non-Go files are unaffected and pass through normally.
Godoctor Examples
Client configuration
Claude Code registers GoDoctor via the CLI command above. For other MCP clients that accept a JSON config, use this block:
{
"mcpServers": {
"godoctor": {
"command": "godoctor",
"args": [],
"env": {}
}
}
}Prompts to try
Example natural-language prompts that exercise GoDoctor's navigation, editing, and build tools in a Go project:
- "Read the main.go file and describe all exported types it references"
- "Refactor the handleRequest function to return an error instead of panicking"
- "Run the tests for the ./pkg/auth package and show me coverage"
- "Add the golang.org/x/crypto module and show me the documentation for bcrypt"
- "Build the project and fix any compilation errors you find"Troubleshooting Godoctor
godoctor: command not found after running go install
Ensure $GOPATH/bin (or $(go env GOPATH)/bin) is on your PATH. Run: export PATH="$PATH:$(go env GOPATH)/bin" and add it to your shell profile.
gopls-related errors or slow type resolution on first use
GoDoctor starts a gopls daemon on first invocation. Run 'godoctor --list-tools' once manually to let it initialize before starting a Claude Code session, and ensure gopls is installed (go install golang.org/x/tools/gopls@latest).
smart_edit rolls back changes unexpectedly
smart_edit automatically rolls back if the Go compiler detects a syntax error after an edit. Review the error message GoDoctor returns — it includes the compiler output — then ask the agent to correct the specific syntax issue before retrying.
Frequently Asked Questions about Godoctor
What is Godoctor?
Godoctor is a Model Context Protocol (MCP) server that model context protocol server for go developers It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Godoctor?
Follow the installation instructions on the Godoctor GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Godoctor?
Godoctor works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Godoctor free to use?
Yes, Godoctor is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
Godoctor Alternatives — Similar Developer Tools Servers
Looking for alternatives to Godoctor? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Godoctor in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Godoctor?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.