Skip to main content
Glama
Wildcard-Official

DeepContext

Official

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

  1. Visit the Wildcard DeepContext page

  2. Click "Generate API Key"

  3. Copy your API key

  4. Paste installation command for your MCP client

  5. Type index this codebase to index the current directory

Claude Code:

claude mcp add deepcontext \
  -e WILDCARD_API_KEY=your-wildcard-api-key \
  -- npx @wildcard-ai/deepcontext@latest

Codex:

# 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 build

Integration

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

Contributing

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 tools
clear_indexA
ParametersJSON Schema
NameRequiredDescriptionDefault
codebase_pathNo

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully bears the burden of disclosing behavior. It explicitly warns 'Destructive operation. All search capabilities lost until reindexing' and notes that omitting the parameter clears ALL indexed codebases. This is excellent transparency for a destructive action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, when_to_use, parameters, warnings). It is front-loaded with the core purpose, and every sentence serves a purpose—including examples and warnings are directly actionable. No fluff or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-optional-parameter tool with no output schema, the description covers all needed aspects: purpose, usage scenarios, parameter semantics, and safety warnings. It also implicitly differentiates from siblings. Nothing important is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate completely. It does: it provides the parameter type (string), validation (absolute path starting with / or C:\), valid/invalid examples, and optional behavior ('Omit to clear ALL indexed codebases'). This adds far more meaning than the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Permanently removes all indexed data for a codebase', using a specific verb ('removes'), a resource ('indexed data'), and a scope ('for a codebase'). This distinguishes it from siblings like index_codebase (adds data) and search_codebase (reads data).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'when_to_use' section provides three concrete scenarios: clearing stale data before reindexing, removing old codebases, and fixing corrupted indexes. While it doesn't explicitly name alternatives or give when-not-to-use, the scenarios give clear context relative to sibling tools. A slightly higher score would require explicit exclusionary guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_indexing_statusA

Enhanced indexing status with completion statistics when available

ParametersJSON Schema
NameRequiredDescriptionDefault
codebase_pathNo

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses behavioral traits by stating it 'Shows completion statistics', 'Displays batch processing details', and 'References log files for detailed debugging.' It implicitly indicates a read-only status operation, though it does not explicitly confirm side-effect-free behavior, which is a minor gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, enhanced features, when_to_use, parameters, returns). It is somewhat verbose but every section adds value. The XML-like markup improves readability, though a more concise summary could achieve the same clarity in fewer words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has one optional parameter and no output schema, the description covers all necessary context: purpose, usage scenarios, parameter details, and return information. It even includes enhanced features and debugging references, making it complete for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema only defines 'codebase_path' as a string with no description, but the tool description fully compensates by providing detailed parameter semantics: absolute path requirement, valid/invalid examples, validation rules, and optional behavior when omitted. This greatly exceeds the schema's bare definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Check if codebases are indexed and get their status information.' It also lists specific features like completion statistics and batch processing details. This verb+resource description distinguishes it from siblings like index_codebase and search_codebase.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The '<when_to_use>' section provides explicit scenarios, such as 'Before indexing to check if already done' and 'Debug why search returned no results.' It also includes parameter guidance with optional behavior. However, it does not explicitly mention when not to use this tool or name alternative tools, so it earns a 4 rather than 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

index_codebaseA
<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>
ParametersJSON Schema
NameRequiredDescriptionDefault
codebase_pathYes
force_reindexNo

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the main effect (creating a searchable index) and the behavior of force_reindex ('Force complete reindexing even if already indexed'). However, it does not mention potential side effects, permissions, resource usage, or what happens to existing indexes besides the default skip implied by force_reindex.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with purpose, when-to-use, and parameters sections, and the most critical info is front-loaded. However, there is slight redundancy between 'Call this first before searching any new codebase' and 'Required prerequisite for search_codebase,' which say essentially the same thing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with two parameters, no output schema, and no annotations, the description covers purpose, when to use, and parameter semantics thoroughly. It lacks some contextual details like return values or side effects, but it is sufficient for selection and basic invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description compensates fully. It defines both parameters in detail: codebase_path requires an absolute path with examples of valid/invalid inputs and validation logic; force_reindex includes a description, default value, and when to use it. This adds significant meaning beyond the raw schema types.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Prepares a codebase for intelligent search by creating a searchable index.' It uses a specific verb ('prepares', 'creating') and resource ('codebase', 'searchable index'), and it distinguishes itself from siblings by being the 'Required prerequisite for search_codebase'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to use: 'Call this first before searching any new codebase' and 'Required prerequisite for search_codebase.' It does not mention when not to use or explicitly compare to alternative sibling tools, but the prerequisite framing provides clear guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_codebaseA
<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>

Code chunks with file paths, line numbers, relevance scores, symbol information, imports, and exports Codebase must be indexed first with index_codebase

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
max_resultsNo
codebase_pathYes

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full responsibility. It discloses that results are ranked by semantic relevance, may miss type definitions, exclude filtered content, and require prior indexing. This goes far beyond the minimal safety/behavior hint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-structured with clearly labeled sections. Some repetition exists (e.g., Grep appears multiple times), but each section serves a purpose and the front-loaded purpose statement makes it easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the description covers everything needed: return format, prerequisites, limitations, result interpretation, and workflow. It is complete enough for an agent to use correctly without external documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, but the tool description compensates thoroughly. Each parameter includes type, meaning, examples, validation rules (e.g., absolute path), and best practices (e.g., keeping max_results at 5).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource statement: 'Finds relevant code in an indexed codebase using natural language or keyword queries.' This clearly distinguishes the tool from siblings like index_codebase and clear_index, which have different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

A dedicated 'when_to_use' section lists concrete scenarios, and the workflow explicitly recommends alternatives like Grep for exact matches and test-file searches. Limitations with solutions further clarify when not to use the tool and what to use instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv0.1.15
    • First observedclear_index
    • First observedget_indexing_status
    • First observedindex_codebase
    • First observedsearch_codebase

TDQS

A4.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: indexing, searching, checking status, and clearing. No overlap or ambiguity between them.

Naming Consistency5/5

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.

Tool Count5/5

Four tools is well-scoped for a codebase indexing/search domain. Each tool earns its place and there is no unnecessary bloat.

Completeness5/5

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

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Fast semantic code search for AI agents — find symbols, references, and callers across any codebase.
    9
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Adds 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.
    48
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables LLMs to efficiently navigate large codebases by providing surgical access to specific code symbols via semantic search and call-graph queries.
    6
    MIT

Latest Blog Posts

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/Wildcard-Official/deepcontext-mcp'

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