Sponsored by Deepsite.site

CodeInteliMCP - Intelligent Code Analysis Server

Created By
rahulvgmail7 months ago
Advanced MCP server for code intelligence with multi-repository support, Tree-sitter parsing, DuckDB graph database, and ChromaDB vector search
Content

CodeInteliMCP - Intelligent Code Analysis Server

An advanced MCP (Model Context Protocol) server that combines Tree-sitter parsing with graph databases and vector search for lightning-fast code intelligence across multiple repositories.

๐Ÿš€ Features

  • Multi-Repository Support: Manage and analyze multiple codebases simultaneously
  • Instant Usage Search: Find where functions/classes are used in milliseconds
  • Semantic Code Search: Find similar code patterns using vector embeddings
  • Dependency Analysis: Visualize and query code dependencies
  • Impact Analysis: See what breaks when you change something
  • Auto-indexing: Smart incremental updates as you code
  • Multi-language Support: Python, JavaScript, TypeScript, Go, Rust, and more

๐Ÿ— Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Claude Code    โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚   MCP Server     โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚   Tree-sitter   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                               โ”‚                           โ”‚
                               โ–ผ                           โ–ผ
                        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                        โ”‚  DuckDB      โ”‚          โ”‚  ChromaDB      โ”‚
                        โ”‚  (Graph)     โ”‚          โ”‚  (Vectors)     โ”‚
                        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽฏ Core Capabilities

1. Graph Queries (via DuckDB)

  • Function call relationships
  • Import dependencies
  • Class inheritance trees
  • Variable usage tracking

2. Vector Search (via ChromaDB)

  • Semantic code similarity
  • Natural language code search
  • Pattern detection
  • Code duplication finding

3. Real-time Analysis (via Tree-sitter)

  • On-demand parsing
  • Syntax validation
  • Code structure analysis
  • AST manipulation

๐Ÿšฆ Quick Start

# Clone the repository
git clone https://github.com/rahulvgmail/CodeInteliMCP.git
cd CodeInteliMCP

# Run the setup script
python setup_for_claude.py

The setup script will:

  • Install all dependencies
  • Configure Claude Desktop/Code
  • Create data directories
  • Set up environment variables

Manual Setup

# Install dependencies
pip install mcp duckdb chromadb sentence-transformers aiofiles
pip install tree-sitter tree-sitter-python tree-sitter-javascript

# Add to Claude Desktop config (~/.config/claude/claude_desktop_config.json):
{
  "mcpServers": {
    "code-intelligence": {
      "command": "python",
      "args": ["/path/to/CodeInteliMCP/code_intelligence_mcp/server_minimal.py"],
      "env": {
        "CODE_INTEL_PROJECT_ROOT": "/path/to/your/project"
      }
    }
  }
}

๐Ÿ› ๏ธ Available Tools

This MCP server provides the following tools:

Repository Management

  • add_repository - Add a new repository to track

    • name (string, required): Repository name
    • path (string, required): Path to repository
    • description (string, optional): Repository description
    • make_active (boolean, optional): Set as active repository
  • list_repositories - List all tracked repositories

  • set_active_repository - Set the active repository for operations

    • name (string, required): Repository name to make active
  • index_repository - Index an entire repository

    • repository_name (string, required): Name of repository to index
    • include_patterns (string, optional): Comma-separated file patterns to include
    • exclude_patterns (string, optional): Comma-separated file patterns to exclude

Code Analysis

  • index_file - Index a single file into the code graph

    • file_path (string, required): Path to the file to index
  • find_symbol - Find a symbol by name

    • name (string, required): Symbol name to search for
    • file_path (string, optional): Limit search to specific file
  • find_usages - Find all usages of a symbol

    • name (string, required): Symbol name to find usages for
    • file_path (string, optional): Limit search to specific file
  • semantic_search - Search for code using semantic similarity

    • query (string, required): Natural language search query
    • limit (integer, optional): Maximum number of results (default: 10)
    • symbol_types (string, optional): Comma-separated list of symbol types to filter
  • find_similar_code - Find code similar to a given symbol

    • symbol_name (string, required): Reference symbol name
    • file_path (string, optional): File containing the reference symbol

System Tools

  • test_connection - Test that the server is working

  • get_index_stats - Get current index statistics

  • get_vector_stats - Get vector store statistics

๐Ÿ“– Usage Examples

Once configured, use these tools in Claude:

# Add a new repository
add_repository(name="my-app", path="/path/to/my-app", description="Main application")

# Index the repository
index_repository(repository_name="my-app", include_patterns="**/*.py,**/*.js")

# Search for authentication functions
semantic_search(query="authentication and login functions", limit=20)

# Find where a class is used
find_usages(name="UserService")

# Find similar implementations
find_similar_code(symbol_name="login_user")

๐Ÿ“š Documentation

๐Ÿ“Š Performance Targets

  • Initial indexing: < 1 minute for 100k LOC
  • Incremental updates: < 1 second per file
  • Usage queries: < 50ms
  • Semantic search: < 200ms
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Amap Maps้ซ˜ๅพทๅœฐๅ›พๅฎ˜ๆ–น MCP Server
WindsurfThe new purpose-built IDE to harness magic
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Playwright McpPlaywright MCP server
CursorThe AI Code Editor
Serper MCP ServerA Serper MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Baidu Map็™พๅบฆๅœฐๅ›พๆ ธๅฟƒAPI็Žฐๅทฒๅ…จ้ขๅ…ผๅฎนMCPๅ่ฎฎ๏ผŒๆ˜ฏๅ›ฝๅ†…้ฆ–ๅฎถๅ…ผๅฎนMCPๅ่ฎฎ็š„ๅœฐๅ›พๆœๅŠกๅ•†ใ€‚
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
ChatWiseThe second fastest AI chatbotโ„ข
Howtocook McpๅŸบไบŽAnduin2017 / HowToCook ๏ผˆ็จ‹ๅบๅ‘˜ๅœจๅฎถๅš้ฅญๆŒ‡ๅ—๏ผ‰็š„mcp server๏ผŒๅธฎไฝ ๆŽจ่่œ่ฐฑใ€่ง„ๅˆ’่†ณ้ฃŸ๏ผŒ่งฃๅ†ณโ€œไปŠๅคฉๅƒไป€ไนˆโ€œ็š„ไธ–็บช้šพ้ข˜๏ผ› Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Tavily Mcp
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
DeepChatYour AI Partner on Desktop