Skip to main content
Glama

MCP Codebase Index

by NgoTaiCo

MCP Codebase Index Server

AI-powered semantic search for your codebase in Claude Desktop

A Model Context Protocol (MCP) server that enables Claude to search and understand your codebase using Google's Gemini embeddings and Qdrant Cloud vector storage.

✨ Features

  • šŸ” Semantic Search: Find code by meaning, not just keywords

  • šŸŽÆ Smart Chunking: Automatically splits code into logical functions/classes

  • šŸ”„ Real-time Watch: Monitors file changes and updates index automatically

  • 🌐 Multi-language: Supports 15+ programming languages

  • ā˜ļø Cloud Storage: Uses Qdrant Cloud for persistent vector storage

  • šŸ“¦ Simple Setup: Just 4 environment variables to get started

šŸš€ Quick Start

Prerequisites

  1. Gemini API Key: Get free at Google AI Studio

  2. Qdrant Cloud Account: Sign up free at cloud.qdrant.io

Installation

Add to your claude_desktop_config.json:

{ "mcpServers": { "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..." } } } }

All 4 variables are required:

Variable

Where to Get

Example

REPO_PATH

Absolute path to your project

/Users/you/Projects/myapp

GEMINI_API_KEY

Google AI Studio

AIzaSyC...

QDRANT_URL

Qdrant Cloud cluster URL

https://xxx.gcp.cloud.qdrant.io:6333

QDRANT_API_KEY

Qdrant Cloud API key

eyJhbGci...

Restart Claude Desktop

The server will automatically:

  1. Connect to your Qdrant Cloud cluster

  2. Create a collection (if needed)

  3. Index your entire codebase

  4. Watch for file changes

šŸ“– Usage

Ask Claude to search your codebase:

"Find the authentication logic" "Show me how database connections are handled" "Where is error logging implemented?" "Find all API endpoint definitions"

šŸŽ›ļø 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" } }

Variable

Default

Description

QDRANT_COLLECTION

codebase

Collection name in Qdrant

WATCH_MODE

true

Auto-update on file changes

BATCH_SIZE

50

Embedding batch size

šŸ”§ Setup Guides

šŸŒ Supported Languages

Python • TypeScript • JavaScript • Dart • Go • Rust • Java • Kotlin • Swift • Ruby • PHP • C • C++ • C# • Shell • SQL • HTML • CSS

šŸ“ How It Works

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │ Your Code │ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ │ ā–¼ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │ File Watcher │ Monitors changes ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ │ ā–¼ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │ Code Parser │ Splits into chunks ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ │ ā–¼ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │ Gemini API │ Creates embeddings ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ │ ā–¼ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │ Qdrant Cloud │ Stores vectors ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ │ ā–¼ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │ Claude Search │ Semantic queries ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

šŸ› Troubleshooting

Server not appearing in Claude?

Check Claude logs:

tail -f ~/Library/Logs/Claude/mcp*.log

Common issues:

  • āŒ REPO_PATH must be absolute path

  • āŒ All 4 env variables must be set

  • āŒ Qdrant URL must include :6333 port

  • āŒ Gemini API key must be valid

Can't connect to Qdrant?

Test connection:

curl -H "api-key: YOUR_KEY" \ https://YOUR_CLUSTER.gcp.cloud.qdrant.io:6333/collections

Should return JSON with collections list.

Indexing too slow?

  • Large repos (1000+ files) take 5-10 minutes initially

  • Reduce BATCH_SIZE if hitting rate limits

  • Check Gemini API quota: aistudio.google.com

šŸ“Š Performance

  • Embedding speed: ~100 chunks/minute (Gemini API)

  • Search latency: <100ms (Qdrant Cloud)

  • Storage: ~1KB per code chunk

  • Recommended: <10K chunks per collection

šŸ“„ License

MIT Ā© NgoTaiCo

šŸ¤ Contributing

Issues and PRs welcome at github.com/NgoTaiCo/mcp-codebase-index

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Enables semantic search across your codebase using Google's Gemini embeddings and Qdrant Cloud vector storage. Supports 15+ programming languages with smart code chunking and real-time file change monitoring.

  1. ✨ Features
    1. šŸš€ Quick Start
      1. Prerequisites
      2. Installation
      3. Restart Claude Desktop
    2. šŸ“– Usage
      1. šŸŽ›ļø Configuration
        1. Required Variables
        2. Optional Variables
      2. šŸ”§ Setup Guides
        1. šŸŒ Supported Languages
          1. šŸ“ How It Works
            1. šŸ› Troubleshooting
              1. Server not appearing in Claude?
              2. Can't connect to Qdrant?
              3. Indexing too slow?
            2. šŸ“Š Performance
              1. šŸ“„ License
                1. šŸ¤ Contributing

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/NgoTaiCo/mcp-codebase-index'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server