Godoctor

v1.0.0Developer Toolsstable

A Model Context Protocol server for Go developers

godoctormcpai-integration
Share:
62
Stars
0
Downloads
0
Weekly
0/5

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

Get AI assistance for Go programming and development.
Access Go refactoring and analysis tools through MCP.
Improve Go code quality with intelligent suggestions.
danicat

Maintainer

LicenseApache-2.0
Languagego
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx godoctor

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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)
1

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@latest
2

Verify 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-tools
3

Register 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 -- godoctor
4

Append 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.md
5

Start 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.

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.

Quick Config Preview

{ "mcpServers": { "godoctor": { "command": "npx", "args": ["-y", "godoctor"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides