DeepContext
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DeepContext search for the user login function"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DeepContext is an MCP server that adds symbol-aware semantic search to Codex CLI, Claude Code, and other agents, giving them more precise context of even the largest codebases. Currently supports Typescript and Python.
Quickstart
Visit the Wildcard DeepContext page
Click "Generate API Key"
Copy your API key
Paste installation command for your MCP client
Type
index this codebaseto index the current directory
Claude Code:
claude mcp add deepcontext \
-e WILDCARD_API_KEY=your-wildcard-api-key \
-- npx @wildcard-ai/deepcontext@latestCodex:
# Add to ~/.codex/config.toml
[mcp_servers.deepcontext]
command = "npx"
args = ["-y", "@wildcard-ai/deepcontext@latest"]
env = { "WILDCARD_API_KEY" = "your-wildcard-api-key" }Related MCP server: Semantica Search MCP
Demo
https://github.com/user-attachments/assets/9a2d418f-497b-42b9-bbb2-f875ef0007b4
Why DeepContext MCP?
Most coding agents use grep based search that match exact text, these searches miss semantically related code and fill context windows with irrelevant results. Large codebases amplify this problem, where text search returns hundreds of matches that quickly overwhelm conversation capacity. This leads to slow completions, more hallucinations, and lower success rates.
DeepContext provides agents with intelligent search that preserves context windows by finding only relevant code chunks.
Semantic accuracy: Matches code by meaning and relationships rather than text patterns, finding related functions across files that keyword search misses.
Reduced token usage: Returns precise code chunks instead of every file containing your search terms, preserving conversation context windows and reducing costs.
Search speed: Searches code immediately through pre-indexed data for instant file discovery.
MCP Tools
index_codebase
Creates a searchable index of your codebase for semantic search.
search_codebase
Finds relevant code using natural language or keyword queries.
get_indexing_status
Shows indexing status and file counts for your codebases.
clear_index
Removes all indexed data for a codebase.
Architecture
MCP Integration Flow
Coding Agent communicates with DeepContext through the Model Context Protocol
MCP server receives requests, validates parameters, and routes to appropriate core components
For long-running operations like indexing, spawns detached background processes to prevent timeouts
Background workers handle large codebases without blocking MCP channel // Reword
AST-Based Parsing
Tree-sitter parsers analyze source code to build Abstract Syntax Trees
Python, TypeScript, and JavaScript language grammars for accurate parsing
Semantic node identification for functions, classes, interfaces, and modules
Symbol extraction identifies functions, classes, interfaces, types, variables, and constants
Scope analysis determines local vs exported vs global visibility
Parameter and return type extraction for function signatures
Import/export analysis maps module dependencies and cross-file relationships
Creates chunks at semantic boundaries rather than arbitrary line or token splits
Large file handling through range-based parsing with overlapping windows
Hybrid Search with Reranking
Search operates in three stages
Hybrid search combines vector similarity and BM25 full-text search
Jina reranker-v2 for final relevance optimization
Vector similarity finds semantically related code using embeddings
Jina text embeddings generate 1024-dimension vectors for code chunks
BM25 performs traditional keyword matching for exact terms
Full-text indexing enables precise identifier and comment matching
Results fused using configurable weights, then reordered by Jina reranker
Incremental Indexing
Uses file modification times and content hashes to track changes
SHA-256 hashing detects content modifications at byte level
Only reprocesses files with different hashes during reindexing
Avoids unnecessary parsing and embedding generation for unchanged files
Content Filtering
Scores files based on extension patterns, path components, and content analysis
Language detection and file type classification for processing decisions
Excludes test files, generated code, minified files, and build outputs during indexing
Pattern matching against common test frameworks and build tool outputs
Filters documentation and configuration files to focus on source code
Self Hosting
Self-hosting requires code modifications to integrate directly with vector storage and embedding providers, as the current implementation uses the Wildcard API backend.
Prerequisites
Node.js 20+ for ES module support and performance optimizations
Turbopuffer API key for vector storage and hybrid search operations
Jina AI API key for text embeddings and reranking services
Setup
git clone https://github.com/Wildcard-Official/deepcontext-mcp.git
cd deepcontext
npm install
npm run buildIntegration
claude mcp add deepcontext-local \
-e TURBOPUFFER_API_KEY=your-turbopuffer-key \
-e JINA_API_KEY=your-jina-key \
-- node /path/to/deepcontext/dist/standalone-mcp-integration.jsContributing
Thanks for your interest! We’re currently not accepting external contributions as we’re an early-stage startup focused on rapid iteration. We may open things up in the future — feel free to ⭐ the repo to stay in the loop.
License
Licensed under the Apache License.
Available Tools
4 toolsclear_indexA
<when_to_use> Clear stale data before reindexing after major code changes Remove old indexed codebases no longer needed Fix corrupted index causing search issues </when_to_use>
Inputs: codebase_path.
get_indexing_statusA
<enhanced_features> Shows completion statistics for finished indexing (success rates, processing time, performance metrics) Displays batch processing details (successful/skipped batches) References log files for detailed debugging </enhanced_features>
<when_to_use> Before indexing to check if already done After indexing to see completion statistics and success rates Debug why search returned no results Confirm indexing completed successfully Get overview of all indexed codebases </when_to_use>
Enhanced indexing status with completion statistics when available
Inputs: codebase_path.
index_codebaseA
<when_to_use> Call this first before searching any new codebase Required prerequisite for search_codebase </when_to_use>
<parameter name="force_reindex" required="false">
<type>boolean</type>
<description>Force complete reindexing even if already indexed</description>
<default>false</default>
<when_to_use>Code has changed significantly or search results seem outdated</when_to_use>
</parameter>
Inputs: codebase_path (required), force_reindex.
search_codebaseA
<when_to_use> Find specific functions, classes, or code patterns Get context before making changes to understand dependencies Explore how existing systems work Locate examples of API usage or patterns </when_to_use>
<parameter name="codebase_path" required="true">
<type>string</type>
<description>ABSOLUTE path to the codebase directory to search</description>
<examples>
<valid>/Users/name/project</valid>
<valid>/home/user/code/repo</valid>
<invalid>.</invalid>
<invalid>../project</invalid>
<invalid>relative/path</invalid>
</examples>
<validation>Must be absolute path starting with / (Unix) or C:\ (Windows)</validation>
</parameter>
<parameter name="max_results" required="false">
<type>number</type>
<description>Maximum number of code chunks to return</description>
<default>5</default>
<best_practice>Keep at default 5 for focused results. Use multiple targeted searches rather than increasing this limit</best_practice>
</parameter>
<result_interpretation> Results ranked by semantic relevance, not code importance Implementation code often appears in results 2-5, not just #1 Look for actual code files (.ts, .js, .sql) over documentation (.md, .txt) </result_interpretation>
Code chunks with file paths, line numbers, relevance scores, symbol information, imports, and exports Codebase must be indexed first with index_codebase
Inputs: query (required), codebase_path (required), max_results.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: indexing, searching, checking status, and clearing. No overlap or ambiguity between them.
All tool names follow a consistent verb_noun snake_case pattern (index_codebase, search_codebase, get_indexing_status, clear_index), making them predictable and readable.
Four tools is well-scoped for a codebase indexing/search domain. Each tool earns its place and there is no unnecessary bloat.
The set covers the full lifecycle: index, search, check status, and clear. Force_reindex and optional path parameters provide flexibility, so no obvious gaps exist.
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Token-efficient search for coding agents over public and private documentation.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceFast semantic code search for AI agents — find symbols, references, and callers across any codebase.9Apache 2.0
- FlicenseAqualityDmaintenanceSemantic code search for Claude Code, enabling natural language codebase indexing and search using AI embeddings.81-
- AlicenseNot gradedqualityDmaintenanceAdds semantic code search to AI coding agents, enabling natural language queries across entire codebases to retrieve relevant code chunks, saving tokens and providing deep context.20 npm1MIT
- AlicenseAqualityDmaintenanceEnables LLMs to efficiently navigate large codebases by providing surgical access to specific code symbols via semantic search and call-graph queries.6MIT