Package Exports
- @ngotaico/mcp-codebase-index
- @ngotaico/mcp-codebase-index/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ngotaico/mcp-codebase-index) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
MCP Codebase Index Server
AI-powered semantic search for your codebase in GitHub Copilot
A Model Context Protocol (MCP) server that enables GitHub Copilot to search and understand your codebase using Google's Gemini embeddings and Qdrant vector storage.
π Quick Navigation
π Getting Started
- π Full Documentation - Complete documentation
- βοΈ Setup Guide - Installation and configuration
- β‘ Quick Reference - Command cheat sheet
- πΊοΈ Navigation Guide - Find any doc quickly
π» For Developers
- Source Code Structure - Code organization
- MCP Server Guide - Build your own MCP server
- Roadmap - Future plans
π§ Resources
- Qdrant Setup - Get Qdrant credentials
- Testing Guide - Test search functionality
- Changelog - Version history
β¨ Features
- π Semantic Search - Find code by meaning, not just keywords
- π― Smart Chunking - Automatically splits code into logical functions/classes
- π Incremental Indexing - Only re-indexes changed files (90%+ time savings)
- πΎ Auto-save Checkpoints - Saves progress every 10 files, resume anytime
- π Real-time Progress - Track indexing with ETA and performance metrics
- β‘ Parallel Processing - 25x faster indexing with batch execution
- π Real-time Watch - Auto-updates index on file changes
- π Multi-language - Supports 15+ programming languages
- βοΈ Vector Storage - Uses Qdrant for persistent storage
- π€ Prompt Enhancement - AI-powered query improvement (optional)
- π¦ Simple Setup - Just 4 environment variables
π Quick Start
Prerequisites
- Gemini API Key - Get free at Google AI Studio
- Qdrant Cloud Account - Sign up free at cloud.qdrant.io
Installation
Step 1: Open MCP Configuration in VS Code
- Open GitHub Copilot Chat (
Ctrl+Alt+I/Cmd+Alt+I) - Click Settings icon β MCP Servers β MCP Configuration (JSON)
Step 2: Add this configuration to mcp.json:
{
"servers": {
"codebase": {
"command": "npx",
"args": ["-y", "@ngotaico/mcp-codebase-index"],
"env": {
"REPO_PATH": "/absolute/path/to/your/project",
"GEMINI_API_KEY": "AIzaSyC...",
"QDRANT_URL": "https://your-cluster.gcp.cloud.qdrant.io:6333",
"QDRANT_API_KEY": "eyJhbGci..."
},
"type": "stdio"
}
}
}Step 3: Restart VS Code
The server will automatically:
- Connect to Qdrant Cloud
- Index your codebase
- Watch for file changes
π Detailed instructions: Setup Guide
π Usage
Search Your Codebase
Ask GitHub Copilot:
"Find the authentication logic"
"Show me how database connections are handled"
"Where is error logging implemented?"Check Indexing Status
"Check indexing status"
"Show me detailed indexing progress"Enhance Queries (Optional)
If you enabled PROMPT_ENHANCEMENT=true:
"Enhance and search for: authentication"
"Enhance this query: error handling"π More examples: Testing Guide
ποΈ Configuration
Required Variables
{
"env": {
"REPO_PATH": "/Users/you/Projects/myapp",
"GEMINI_API_KEY": "AIzaSyC...",
"QDRANT_URL": "https://xxx.gcp.cloud.qdrant.io:6333",
"QDRANT_API_KEY": "eyJhbGci..."
}
}Optional Variables
{
"env": {
"QDRANT_COLLECTION": "my_project",
"WATCH_MODE": "true",
"BATCH_SIZE": "50",
"EMBEDDING_MODEL": "text-embedding-004",
"PROMPT_ENHANCEMENT": "true"
}
}π Full configuration guide: Setup Guide
π Supported Languages
Python β’ TypeScript β’ JavaScript β’ Dart β’ Go β’ Rust β’ Java β’ Kotlin β’ Swift β’ Ruby β’ PHP β’ C β’ C++ β’ C# β’ Shell β’ SQL β’ HTML β’ CSS
π Performance
| Metric | Value |
|---|---|
| Indexing Speed | ~25 files/min |
| Search Latency | <100ms |
| Incremental Savings | 90%+ time reduction |
| Parallel Processing | 25 chunks/sec |
π Performance details: Main Documentation
π Troubleshooting
Server not appearing?
- Check Copilot Chat β Settings β MCP Servers β Show Output
- Verify all 4 env variables are set
- Ensure
REPO_PATHis absolute path
Can't connect to Qdrant?
curl -H "api-key: YOUR_KEY" \
https://YOUR_CLUSTER.gcp.cloud.qdrant.io:6333/collectionsIndexing too slow?
- Large repos take 5-10 minutes initially
- Subsequent runs only index changed files (90%+ faster)
π More troubleshooting: Main Documentation
π Project Structure
mcp-codebase-index/
βββ docs/ # All documentation
β βββ README.md # Main documentation
β βββ SETUP.md # Setup guide
β βββ NAVIGATION.md # Navigation guide
β βββ guides/ # Detailed guides
β βββ planning/ # Development planning
β
βββ src/ # Source code
β βββ core/ # Core business logic
β βββ storage/ # Data persistence
β βββ enhancement/ # Prompt enhancement
β βββ mcp/ # MCP server
β βββ types/ # Type definitions
β βββ index.ts # Entry point
β
βββ config/ # Configuration files
βββ .data/ # Runtime data (gitignored)
βββ package.json
βββ README.md # This fileπ Detailed structure: Source Code Structure
π§ Development
Build
npm run buildRun Locally
npm run devTest
npm testπ Development guide: Source Code Structure
π€ Contributing
Contributions welcome! Check out:
- Improvement Plan - Roadmap
- Issues - Detailed feature docs
- Source Code - Code structure
π License
MIT Β© NgoTaiCo
π Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: ngotaico.flutter@gmail.com
β If you find this useful, please star the repo!