Labsco
BrunoKrugel logo

go-review-mcp

โ˜… 2

from BrunoKrugel

Code reviewing following the Go style guides directly from official and recommended sources.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

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

Features

Tools

  • search_live_guide - Search through all live-fetched Go style guide content for specific patterns (auto-fetches guides on first use)
  • 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

Development

Building

make build

Running tests

make test

Running locally

make run

How It Works

  1. Lazy Fetching: Style guides are automatically fetched on first tool use (no manual initialization needed)
  2. Content Parsing: Guides are parsed into structured sections with automatic topic indexing
  3. Unified Search: All search and topic queries automatically scan across all fetched guides
  4. MCP Integration: Simple tools and prompts are exposed via the Model Context Protocol

Key Features

  • Auto-Fetch on Demand: Guides are fetched lazily on first use โ€” no manual fetch step required
  • 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         โ”‚
โ”‚  - 3 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

  1. On-Demand Fetch: First tool call triggers concurrent fetch of all 4 guides
  2. Parsing: Each guide is parsed into sections with metadata
  3. Indexing: Sections are automatically categorized by topics
  4. Query: Search and topic tools scan all indexed content
  5. Caching: Results are cached for 24 hours to improve performance