Gograph

v1.0.0Coding Agentsstable

A fast, local-only CLI tool to generate repository structures and improve IDE context awareness for Go codebases.

agentic-codingai-agentai-coding-assistantantigravityast
Share:
141
Stars
0
Downloads
0
Weekly
0/5

What is Gograph?

Gograph is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to fast, local-only cli tool to generate repository structures and improve ide context awareness for go codebases.

A fast, local-only CLI tool to generate repository structures and improve IDE context awareness for Go codebases.

This server falls under the Coding Agents and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A fast, local-only CLI tool to generate repository structure

Use Cases

Generate repository structure maps for better IDE context in Go projects.
Analyze Go codebase AST to improve code understanding for AI agents.
ozgurcd

Maintainer

LicenseMIT
Languagego
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx gograph

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 Gograph

Gograph is a fast, local-only MCP server and CLI tool that performs deep static analysis of Go codebases to give AI agents rich structural context about your code. It exposes 50+ query tools covering symbol navigation, call graph tracing, architecture boundary enforcement, infrastructure mapping (HTTP routes, SQL, env vars), and pre/post-edit impact analysis. Because it operates purely through AST analysis with no code execution or network calls, it integrates safely into any development workflow and dramatically reduces the number of separate tool calls an AI agent needs to understand a Go project.

Prerequisites

  • Go toolchain installed (for building from source) or Homebrew on macOS for the tap install
  • A Go codebase to analyze
  • Claude Code CLI or another MCP-compatible client
  • No API keys required — gograph runs entirely locally
1

Install gograph

Install gograph via Homebrew on macOS. Alternatively, build from source using Go if you are on Linux or Windows.

brew install ozgurcd/tap/gograph
2

Register gograph as a Claude Code plugin

Run the built-in registration command from your Go project root to automatically configure gograph as an MCP server in Claude Code. This command updates the Claude Code plugin list and sets up query redirects for Go symbols.

cd /path/to/your/go/project
gograph add-claude-plugin
3

Build the codebase index

Run an initial build to index your Go project. Use --precise for full accuracy at the cost of slightly longer processing time.

gograph build . --precise
4

Run the MCP server for your project

Start gograph in MCP server mode pointing at your Go project directory. This exposes all 50+ tools to your AI client.

gograph mcp .
5

Configure architectural boundaries (optional)

Define layer boundaries in a .gograph/boundaries.json file to enable architecture enforcement checks. Gograph will flag imports that violate these rules when you run the boundaries command.

mkdir -p .gograph
cat > .gograph/boundaries.json << 'EOF'
{
  "layers": [
    { "name": "domain", "packages": ["internal/domain/**"], "may_import": [] },
    { "name": "service", "packages": ["internal/service/**"], "may_import": ["domain"] }
  ]
}
EOF

Gograph Examples

Client configuration (Claude Desktop)

claude_desktop_config.json entry to run gograph as an MCP server for a specific Go project.

{
  "mcpServers": {
    "gograph": {
      "command": "gograph",
      "args": ["mcp", "/path/to/your/go/project"]
    }
  }
}

Prompts to try

Example prompts that leverage gograph's deep Go code analysis capabilities.

- "Show me the full context for the ValidateToken function — its source, callers, callees, and tests."
- "Before I refactor the UserRepository interface, what is the risk and impact analysis?"
- "List all HTTP routes defined in this codebase and which handlers they map to."
- "Find all SQL queries in the project and identify which ones lack parameterization."
- "Check if there are any architecture boundary violations in the current codebase."
- "Generate machine-readable wiki documentation for this entire Go project."

Troubleshooting Gograph

gograph build fails to parse certain files

Ensure the Go toolchain is correctly installed and `go build ./...` succeeds in your project first. Gograph relies on the Go AST which requires valid, compilable Go code. Generated files or vendor directories can be excluded if they cause issues.

Claude Code does not show gograph tools after running add-claude-plugin

Restart Claude Code after running `gograph add-claude-plugin`. Verify the plugin was registered by checking the Claude Code plugin list. Make sure you ran the command from inside your Go project directory, not a parent directory.

Frequently Asked Questions about Gograph

What is Gograph?

Gograph is a Model Context Protocol (MCP) server that fast, local-only cli tool to generate repository structures and improve ide context awareness for go codebases. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Gograph?

Follow the installation instructions on the Gograph GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Gograph?

Gograph works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Gograph free to use?

Yes, Gograph is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

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

Read the full setup guide →

Ready to use Gograph?

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