Claude Context Local
Provides semantic code search capabilities that run 100% locally using EmbeddingGemma embeddings. Enables finding code by meaning across 15 file extensions and 9+ programming languages without API costs or sending code to the cloud.
What is Claude Context Local?
Claude Context Local is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to provides semantic code search capabilities that run 100% locally using embeddinggemma embeddings. enables finding code by meaning across 15 file extensions and 9+ programming languages without api cos...
Provides semantic code search capabilities that run 100% locally using EmbeddingGemma embeddings. Enables finding code by meaning across 15 file extensions and 9+ programming languages without API costs or sending code to the cloud.
This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Provides semantic code search capabilities that run 100% loc
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx claude-context-localConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Claude Context Local
Claude Context Local is a 100% on-device semantic code search MCP server that uses Google's EmbeddingGemma model to index your codebase and find code by meaning rather than by keyword matching, supporting 9+ programming languages across 15 file extensions without sending a single byte to the cloud. It integrates directly with Claude Code via the MCP stdio protocol, reducing token usage by letting Claude search for relevant code locally instead of loading entire files into context. Privacy-conscious developers and teams working on proprietary codebases who want fast, cost-free semantic search will benefit most from this tool.
Prerequisites
- Python 3.12 or higher
- 1-2 GB of free disk space for the EmbeddingGemma model (~1.2-1.3 GB) and FAISS index
- curl or wget available in your terminal for the one-liner installer
- Claude Code as the MCP client (the primary supported integration)
- Optional: NVIDIA GPU (CUDA 11/12) or Apple Silicon for accelerated embedding and search
Run the one-liner installer
The installer handles everything: installs uv if missing, clones the repository to ~/.local/share/claude-context-local, installs Python dependencies, and downloads the EmbeddingGemma model (~1.2 GB). Re-running the same command later updates the installation while preserving your indexed projects.
curl -fsSL https://raw.githubusercontent.com/FarhanAliRaza/claude-context-local/main/scripts/install.sh | bashRegister the MCP server with Claude Code
Add the code-search server to Claude Code at user scope so it is available in all your projects. The server runs as a stdio process inside the uv environment created by the installer.
claude mcp add code-search --scope user -- uv run --directory ~/.local/share/claude-context-local python mcp_server/server.pyOpen Claude Code and index your codebase
Open Claude Code in your project directory and tell it to index the codebase. The server will chunk all supported files using AST-based and tree-sitter parsers, generate embeddings with EmbeddingGemma, and build a FAISS index. This step runs locally and may take a few minutes for large codebases.
Search your code using natural language
Once indexed, you can search your codebase by meaning directly from Claude Code chat. No function call syntax is needed — just describe what you're looking for.
Set a custom storage directory (optional)
By default, indices and embeddings are stored in ~/.claude_code_search. To use a different location, set the CODE_SEARCH_STORAGE environment variable before starting Claude Code.
export CODE_SEARCH_STORAGE=/your/preferred/pathClaude Context Local Examples
Client configuration
Claude Code MCP server registration command. After running this, the 'code-search' server is active for all projects under your user account.
{
"mcpServers": {
"code-search": {
"command": "uv",
"args": [
"run",
"--directory",
"~/.local/share/claude-context-local",
"python",
"mcp_server/server.py"
]
}
}
}Prompts to try
Natural language queries to use inside Claude Code after indexing your codebase.
- "Index this codebase."
- "Find all functions that handle authentication and token validation."
- "Search for code that processes webhook payloads from Stripe."
- "Show me where database connection pooling is configured."
- "Find error handling code related to network timeouts."
- "Where is the user permissions check implemented?"Troubleshooting Claude Context Local
The installer fails or the EmbeddingGemma model download times out
The model is approximately 1.2-1.3 GB and requires a stable internet connection. Re-run the installer — it detects an existing installation and only re-downloads missing components. If you are behind a proxy, ensure HTTP_PROXY and HTTPS_PROXY environment variables are set before running the install script.
Claude Code cannot find the 'code-search' MCP server after registration
Run 'claude mcp list' to verify the server was registered. If the uv binary is not in your PATH, the command may fail silently. Find the full path with 'which uv' and use it explicitly in the registration command. Also ensure ~/.local/share/claude-context-local exists and contains server.py.
Search returns irrelevant results after indexing
The FAISS index is built incrementally using a Merkle DAG to track changes. If you added new files after the initial index, tell Claude Code to re-index the codebase. The incremental indexer only reprocesses changed files, so subsequent runs are faster. Also make sure the file extensions you care about are among the 15 supported types (Python, JS, TS, Go, Java, Rust, C, C++, C#, JSX, TSX, Svelte, and others).
Frequently Asked Questions about Claude Context Local
What is Claude Context Local?
Claude Context Local is a Model Context Protocol (MCP) server that provides semantic code search capabilities that run 100% locally using embeddinggemma embeddings. enables finding code by meaning across 15 file extensions and 9+ programming languages without api costs or sending code to the cloud. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Claude Context Local?
Follow the installation instructions on the Claude Context Local GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Claude Context Local?
Claude Context Local works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Claude Context Local free to use?
Yes, Claude Context Local is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Claude Context Local Alternatives — Similar Coding Agents Servers
Looking for alternatives to Claude Context Local? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
Browse More Coding Agents MCP Servers
Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Claude Context Local in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Claude Context Local?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.