Claude Context Local

v1.0.0Coding Agentsstable

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.

agentai-codingclaudeclaude-codecode-generation
Share:
231
Stars
0
Downloads
0
Weekly
0/5

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

Search code semantically using local embeddings.
Find code by meaning across 15+ file types.
Run 100% locally without API costs or cloud exposure.
FarhanAliRaza

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx claude-context-local

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 | bash
2

Register 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.py
3

Open 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.

4

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.

5

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/path

Claude 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.

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.

Quick Config Preview

{ "mcpServers": { "claude-context-local": { "command": "npx", "args": ["-y", "claude-context-local"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides