MCP Hub
Back to servers

github-codemunch-mcp

A token-efficient MCP server for exploring GitHub repositories using tree-sitter AST parsing to extract symbol signatures and summaries. It enables users to search and retrieve specific code components while significantly reducing token consumption compared to raw file dumps.

Updated
Feb 9, 2026

github-codemunch-mcp

Token-efficient MCP server for GitHub source code exploration via tree-sitter AST parsing.

Overview

github-codemunch-mcp pre-indexes repository source code using tree-sitter AST parsing, extracting a structured catalog of every symbol (function, class, method, constant, type). Each symbol stores only its signature + one-line summary, with the ability to retrieve full source on demand.

Token Savings

ScenarioRaw dumpcodemunchSavings
Explore 500-file repo structure~200,000 tokens~2,000 tokens99%
Find a specific function~40,000 tokens~200 tokens99.5%
Read one function body~40,000 tokens~500 tokens98.7%

Quick Start

Installation

pip install github-codemunch-mcp

Configure MCP

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "github-codemunch": {
      "command": "github-codemunch-mcp",
      "env": {
        "GITHUB_TOKEN": "your_github_token",
        "ANTHROPIC_API_KEY": "your_anthropic_key"
      }
    }
  }
}

Usage

  1. Index a repository:

    index_repo: { "url": "owner/repo" }
    
  2. Search for symbols:

    search_symbols: { "repo": "owner/repo", "query": "authenticate" }
    
  3. Get file outline:

    get_file_outline: { "repo": "owner/repo", "file_path": "src/main.py" }
    
  4. Read symbol source:

    get_symbol: { "repo": "owner/repo", "symbol_id": "src-main-py::MyClass.login" }
    

Supported Languages

  • Python (.py)
  • JavaScript (.js, .jsx)
  • TypeScript (.ts, .tsx)
  • Go (.go)
  • Rust (.rs)
  • Java (.java)

Tools

ToolPurpose
index_repoIndex a repository's source code
list_reposList indexed repositories
get_file_treeGet repository file structure
get_file_outlineGet symbols in a file
get_symbolGet full source of a symbol
get_symbolsBatch retrieve multiple symbols
search_symbolsSearch across all symbols

Environment Variables

VariablePurposeRequired
GITHUB_TOKENGitHub API authenticationNo
ANTHROPIC_API_KEYAI summarizationNo
CODE_INDEX_PATHCustom storage pathNo

License

MIT

Reviews

No reviews yet

Sign in to write a review