go-review-mcp
Code reviewing following the Go style guides directly from official and recommended sources.
Go Review MCP
A Model Context Protocol (MCP) server that provides real-time access to official Go style guides for intelligent code review.
Overview
Go Review MCP fetches the latest style guides directly from official and recommended sources:
Official
Recommended
Features
Tools
- fetch_live_guide - Fetch and index the latest style guides from all official sources (Google and Uber)
- search_live_guide - Search through all live-fetched guide content for specific patterns
- get_guide_topic - Extract topic-specific content from all live guides (naming, errors, concurrency, testing, interfaces, formatting, comments, imports, context)
- get_review_guidelines - Get curated review guidelines for specific topics
Prompts
- review_code - Comprehensive Go code review
- check_naming - Review naming conventions
- check_error_handling - Review error handling patterns
- check_concurrency - Review concurrency patterns
- check_testing - Review test code quality
- check_interfaces - Review interface design
Installation
Using go install
go install github.com/BrunoKrugel/go-review-mcp@latest
From source
git clone https://github.com/BrunoKrugel/go-review-mcp.git
cd go-review-mcp
make build
Configuration
Claude Desktop
Add to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"go-review": {
"command": "go-review-mcp",
"args": []
}
}
}
If installed from source, use the full path to the binary:
{
"mcpServers": {
"go-review": {
"command": "/path/to/go-review-mcp/bin/go-review-mcp",
"args": []
}
}
}
Cursor or VS Code Extension
{
"mcpServers": {
"go-review": {
"command": "go-review-mcp",
"args": []
}
}
}
Crush
{
"go-review-mcp": {
"type": "stdio",
"command": "go-review-mcp",
"timeout": 120,
"disabled": false
},
}
HTTP Mode (for testing with MCP Inspector)
# Start server in HTTP mode
go-review-mcp --transport http --port 8080
# Or with environment variable
TRANSPORT=http PORT=8080 go-review-mcp
Then use MCP Inspector to test:
npx @modelcontextprotocol/inspector http://localhost:8080/mcp
Usage
Basic Workflow
-
Fetch the latest guides:
Use the fetch_live_guide tool (no parameters needed)This fetches all style guides from Google and Uber in one operation.
-
Review your code:
Use the review_code prompt with your Go code -
Get specific guidance:
Use get_guide_topic for focused advice on topics like "naming" or "errors"Searches automatically across all fetched guides.
-
Search for patterns:
Use search_live_guide to find specific content across all guides
Example Interactions
Fetch all guides:
Claude, fetch the latest Go style guides
Comprehensive code review:
Please review this Go code:
[paste your code]
Check specific topics:
Check the naming conventions in this code
Search for guidelines:
Search the style guides for information about error wrapping
Get topic-specific content:
Show me all guidelines about concurrency from the style guides
Available Topics
The following topics are automatically indexed across all guides:
naming- Naming conventions and identifier ruleserrors- Error handling and error wrapping patternsconcurrency- Goroutines, channels, mutexes, context usagetesting- Test structure, table-driven tests, best practicesinterfaces- Interface design and usage patternsformatting- Code formatting and stylecomments- Documentation and comment conventionsimports- Import organization and groupingcontext- Context.Context usage and patterns
Configuration Options
The server supports configuration through environment variables:
TRANSPORT- Transport mode:stdio(default) orhttpPORT- HTTP port when using http transport (default: 8080)CACHE_TTL- Cache duration for fetched guides (default: 24h)LOG_LEVEL- Logging level: debug, info, warn, error (default: info)
Example:
CACHE_TTL=12h LOG_LEVEL=debug go-review-mcp
Development
Building
make build
Running tests
make test
Running locally
make run
How It Works
- Automatic Fetching: The server fetches all style guides (Google and Uber) concurrently and caches them for 24 hours
- Content Parsing: Guides are parsed into structured sections with automatic topic indexing
- Unified Search: All search and topic queries automatically scan across all fetched guides
- MCP Integration: Simple tools and prompts are exposed via the Model Context Protocol
Key Features
- Comprehensive Coverage: Always fetches and searches all available style guides
- Concurrent Fetching: All guides are fetched in parallel for fast initialization
- Smart Caching: 24-hour cache reduces network requests and improves performance
- Topic Indexing: Automatic categorization of content by topics (naming, errors, concurrency, etc.)
- No Configuration: Works out of the box - no need to choose which guides to use
Architecture
┌─────────────────┐
│ AI Assistant │
│ (Claude, etc.) │
└────────┬────────┘
│ MCP Protocol (stdio/http)
┌────────▼──────────────────────┐
│ Go Review MCP Server │
│ - 4 Tools │
│ - 6 Prompts │
│ - Concurrent HTTP Fetcher │
│ - 24h Cache (in-memory) │
│ - Content Parser │
│ - Topic Indexer │
└────────┬──────────────────────┘
│ HTTPS (parallel)
┌────────▼──────────────────────┐
│ Official Style Guide Sources │
│ ├─ Google Go Guide │
│ ├─ Google Go Decisions │
│ ├─ Google Go Best Practices │
│ └─ Uber Go Style Guide │
└───────────────────────────────┘
Data Flow
- Initialization:
fetch_live_guidefetches all 4 guides concurrently - Parsing: Each guide is parsed into sections with metadata
- Indexing: Sections are automatically categorized by topics
- Query: Search and topic tools scan all indexed content
- Caching: Results are cached for 24 hours to improve performance
Requirements
- Go 1.21 or later
- Internet connection for fetching live guides (embedded rules work offline)
License
MIT License - see LICENSE file for details
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
This tool aggregates content from:
- Google Go Style Guide - CC-BY-3.0
- Uber Go Style Guide - MIT
Related Servers
ClaudeKeep
Save and share AI conversations from Claude Desktop.
MoLing MCP Server
A local office automation assistant for file system operations, system command execution, and browser control.
Taiga MCP Bridge
Interact with the Taiga project management platform through an MCP bridge, allowing AI tools to manage project resources.
What Time Is It Now
Provides the current time in Japan Standard Time (JST).
Adobe Express
Integrate with Adobe Express using LLMs to streamline creative tasks and workflows.
Claude MCP Trello
Interact with Trello boards and cards via the Trello API, with built-in rate limiting and error handling.
MindmupGoogleDriveMcp
This server enables you to search, retrieve, and parse MindMup files stored in your Google Drive directly through the MCP interface.
Things
Interact with your task management data in the Things app.
PromptX
An AI capability enhancement system providing professional roles, memory management, and knowledge systems for applications like Claude and Cursor.
MD-PDF MCP Server
A server for converting Markdown files to PDF format. Requires pandoc and weasyprint.