Skip to main content
Glama
CodeCompass

CodeCompass

by nandanpabolu

🧭 CodeCompass

A powerful Model Context Protocol (MCP) server that transforms your local codebase into an intelligent, searchable knowledge base. Built for developers who want to understand, explore, and analyze their code with natural language queries.

✨ Key Features

  • πŸ” Intelligent Code Search - Text, regex, and semantic search across your entire codebase

  • πŸ“– Smart Code Explanation - Get instant explanations of functions, classes, and code blocks

  • πŸ“ TODO Detection - Find and track all TODO, FIXME, and technical debt comments

  • πŸ”’ Safe & Secure - Runs entirely locally with no cloud dependencies

  • πŸš€ Claude Desktop Ready - Seamless integration with Claude Desktop and other MCP clients

  • 🌐 Web Dashboard - Beautiful Streamlit interface for team collaboration

  • πŸ’° Completely Free - Zero ongoing costs, no API fees, no subscriptions

Related MCP server: code-rag-mcp

🎯 Perfect For

  • Code Reviews - Quickly understand unfamiliar codebases

  • Onboarding - Help new team members navigate complex projects

  • Documentation - Generate explanations and insights automatically

  • Technical Debt - Track and prioritize TODO items across projects

  • Code Analysis - Identify patterns, risks, and improvement opportunities

πŸš€ Quick Start

Prerequisites

  • Python 3.12+

  • Git

Installation

# Clone the repository
git clone https://github.com/nandanpabolu/CodeCompass.git
cd CodeCompass

# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Test the backend (optional)
python test_backend.py

# Run MCP Server
python src/simple_mcp_server.py

# Or run the web dashboard
streamlit run src/streamlit_app.py

Claude Desktop Integration

  1. Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "codecompass": {
      "command": "python",
      "args": ["/path/to/CodeCompass/src/mcp_server.py"],
      "env": {
        "REPO_ROOT": "/path/to/your/codebase"
      }
    }
  }
}

πŸ”§ Tech Stack

  • Python 3.12+ with async/await

  • MCP Protocol for AI client integration

  • Streamlit for web interface

  • Local AI support via Ollama (optional)

  • Semantic Search with sentence-transformers

  • Zero Dependencies on external services

πŸ“ Project Structure

CodeCompass/
β”œβ”€β”€ src/                    # Source code
β”‚   β”œβ”€β”€ mcp_server.py      # MCP protocol server
β”‚   β”œβ”€β”€ streamlit_app.py   # Streamlit dashboard
β”‚   β”œβ”€β”€ core/              # Core analysis engine
β”‚   └── tools/             # MCP tool implementations
β”œβ”€β”€ config/                # Configuration files
β”œβ”€β”€ tests/                 # Test suite
β”œβ”€β”€ docs/                  # Documentation
β”œβ”€β”€ examples/              # Usage examples
└── scripts/               # Utility scripts

πŸ› οΈ Available Tools

Core Tools

  • search_code - Search code with text or regex

  • read_file - Read file contents with pagination

  • list_todos - Find TODO/FIXME comments

  • explain_range - Explain code blocks

  • get_file_info - Get file metadata

Advanced Tools

  • semantic_search - Semantic code search

  • analyze_complexity - Code complexity analysis

  • find_references - Find function/variable usage

  • code_metrics - Calculate code metrics

🌐 Web Dashboard

Access the Streamlit dashboard at http://localhost:8501 for:

  • Interactive code search

  • File explorer

  • Code analysis results

  • Configuration management

  • Team collaboration

πŸ”’ Security Features

  • Path traversal protection

  • File size limits

  • Whitelisted repository roots

  • Ignore pattern support

  • Safe file access controls

πŸ“Š Performance

  • File reading: < 100ms for files < 1MB

  • Text search: < 500ms for 10,000 files

  • Semantic search: < 1s for 1,000 code chunks

  • Memory usage: < 500MB for typical codebase

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Add tests

  5. Submit a pull request

πŸ“„ License

MIT License - see LICENSE for details.

πŸ™ Acknowledgments


Transform your codebase into an intelligent assistant. Start exploring your code like never before! πŸš€

Python License MCP Streamlit

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides semantic code intelligence to help users search, navigate, and analyze entire codebases using plain English. It enables Claude to perform architectural overviews, bug detection, and refactor suggestions through local semantic search and keyword indexing.
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables semantic search over codebases using natural language queries, returning relevant code snippets with source locations. Integrates with Claude Code for automatic codebase exploration.
      1
      1
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI IDEs to chat with, search, explain, refactor, and audit a local codebase without uploading source code, returning answers backed by file-and-line source citations, confidence scores, and severity labels, plus audit and board-ready strategic reports. Runs locally and standalone as an MCP server compatible with Claude, Cursor, Windsurf, and DeepSeek Harness.
      629 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Gives Claude a full local toolkit to search, read, edit, move, and analyze codebases, including dependency mapping, impact analysis, security auditing, and git snapshots, alongside a persistent knowledge graph that remembers decisions and links code to context. Everything runs locally against a single SQLite database with no external services.
      1
      MIT