Skip to main content

MCP server for comprehensive GitHub repository analysis using Gemini AI

Project description

CodeGlance MCP Server

An MCP (Model Context Protocol) server that analyzes GitHub repositories using Gemini AI and generates comprehensive documentation — project overviews, architecture guides, file insights, and more.

Works with any MCP-compatible client: Claude Code, Claude Desktop, Cursor, Windsurf, etc.

Quick Start

1. Get a Gemini API Key

Get a free API key from Google AI Studio.

2. Install & Configure

Claude Code

claude mcp add codeglance -e GEMINI_API_KEY=your_key_here -- uvx codeglance-mcp

That's it. Verify with:

claude mcp list

Claude Desktop / Cursor / Other MCP Clients

Add to your MCP config file (claude_desktop_config.json, .cursor/mcp.json, etc.):

{
  "mcpServers": {
    "codeglance": {
      "command": "uvx",
      "args": ["codeglance-mcp"],
      "env": {
        "GEMINI_API_KEY": "your_gemini_api_key_here"
      }
    }
  }
}

Alternative: Install via pip

pip install codeglance-mcp

Then configure your MCP client to run codeglance-mcp as the command instead of uvx codeglance-mcp.

What It Does

When you ask your AI assistant to analyze a repository, CodeGlance:

  1. Clones the repository (shallow clone for speed)
  2. Reads key files (README, package.json, config files, entry points)
  3. Sends the context to Gemini AI with specialized analysis prompts
  4. Generates 6 documentation files in codeglance-analysis/guide/

Generated Documentation

File Description
01-overview.md 5-minute project overview
02-tree.md Annotated directory structure
03-file-insights.md Key files and their purposes
04-architecture.md System architecture deep-dive
05-quick-start.md Getting started guide
06-master-analysis.md Comprehensive technical analysis

MCP Tools

Tool Description
analyze_repository Run full analysis on a GitHub repo
get_repository_info Check if a repo is already cloned
list_generated_guides List generated documentation files

MCP Prompts

Prompt Description
comprehensive_analysis Full analysis workflow
quick_overview Fast overview only
architecture_review Architecture-focused analysis
security_audit Security-focused review

Configuration

All settings can be customized via environment variables in your MCP config:

Variable Default Description
GEMINI_API_KEY (required) Your Google Gemini API key
MAX_FILE_SIZE 5000 Max characters per file to analyze
MAX_FILES_PER_ANALYSIS 50 Max files to include in analysis
TIMEOUT_SECONDS 120 API request timeout
MAX_CONCURRENT_REQUESTS 3 Concurrent Gemini API calls
CACHE_TTL_SECONDS 3600 In-memory cache TTL

Example with custom settings:

{
  "mcpServers": {
    "codeglance": {
      "command": "uvx",
      "args": ["codeglance-mcp"],
      "env": {
        "GEMINI_API_KEY": "your_key",
        "TIMEOUT_SECONDS": "180",
        "MAX_CONCURRENT_REQUESTS": "5"
      }
    }
  }
}

Requirements

  • Python 3.11+
  • Git (for cloning repositories)
  • A Gemini API key (free tier works)

Development

git clone https://github.com/harshil/codeglance-mcp.git
cd codeglance-mcp
uv sync

# Run locally
GEMINI_API_KEY=your_key uv run codeglance-mcp

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codeglance_mcp-0.1.0.tar.gz (72.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codeglance_mcp-0.1.0-py3-none-any.whl (44.8 kB view details)

Uploaded Python 3

File details

Details for the file codeglance_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: codeglance_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 72.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.12

File hashes

Hashes for codeglance_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 357993d95ae365123b22031ebfeaffe1cbc129f4675a9b82c8887e5c790bbd1a
MD5 aa7592c64bc6b2da8eb4648fce6371a9
BLAKE2b-256 ef24c7e3f211eacf5df3b308962249be686e58cf1a9d07f0759819ca0d1d7559

See more details on using hashes here.

File details

Details for the file codeglance_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for codeglance_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4dcf97d9f682ccc40a80132a8b0355c31379b3362b7e06d91c4e12d82e2ed0c9
MD5 940e9583d94eac0e337c9344580e46e9
BLAKE2b-256 1968a0114727074d87e81065c38ff9af64151f5317d7240aa7a4d52f90f906ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page