Skip to content

zavora-ai/mcp-code-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Search MCP Server

Crates.io License ADK-Rust Enterprise Registry Ready

Semantic code search, symbol lookup, call graphs, dependency graphs, ownership maps, and context pack generation for ADK-Rust Enterprise agents. Provides 8 MCP tools that work against any local workspace.

Architecture

Code Search MCP Architecture

Key Principles

  • Workspace-local — searches your actual codebase on disk, not a remote index.
  • Multi-language — supports Rust, TypeScript, Python, Go, Java, JavaScript.
  • Structural awareness — understands symbols, call graphs, dependencies, and ownership.
  • Context packs — gather related files, deps, and tests for LLM context windows.
  • Zero config — point at a directory and search. No indexing step required.
  • Registry-ready — ships with mcp-server.toml for ADK-Rust Enterprise onboarding.

Tools (8)

Tool Purpose Risk Class
semantic_code_search Find code by meaning — regex search with language filtering Read-only
symbol_lookup Look up symbol definitions (fn, struct, trait, class, def) Read-only
find_references Find all references to a symbol across the codebase Read-only
get_call_graph Get callers and callees for a function Read-only
get_dependency_graph Parse Cargo.toml/package.json for dependency tree Read-only
get_codeowners Get CODEOWNERS for a file or directory Read-only
build_context_pack Gather related files, dependencies, and tests Read-only
explain_symbol Definition, signature, doc comments, usage count, location Read-only

Verified Output

Tested against the mcp-a2a codebase:

> semantic_code_search(query: "resolve_card", language: "rust", limit: 5)

{ "query": "resolve_card", "count": 5, "results": [
  { "file": "src/store.rs", "line": 30, "text": "pub async fn resolve_card(&self, base_url: &str) -> Result<A..." },
  { "file": "src/server.rs", "line": 64, "text": "match self.store.resolve_card(&i.base_url).await {" }
]}

> symbol_lookup(symbol: "A2aStore", kind: "struct")

{ "symbol": "A2aStore", "kind": "struct", "definitions": [
  { "file": "src/store.rs", "line": 10 }
], "count": 1 }

> get_dependency_graph(path: ".")

{ "path": ".", "count": 15, "dependencies": [
  { "name": "adk-mcp-sdk", "version": "0.1.0" },
  { "name": "rmcp", "version": "1.7" },
  { "name": "tokio", "version": "1.43" },
  { "name": "serde", "version": "1.0" },
  { "name": "reqwest", "version": "0.12" }
]}

> find_references(symbol: "send_message")

{ "symbol": "send_message", "count": 20, "references": [...] }

> explain_symbol(symbol: "AgentCard")

{ "symbol": "AgentCard", "definition_count": 7, "reference_count": 20 }

Installation

Build from source

git clone https://github.com/zavora-ai/mcp-code-search
cd mcp-code-search
cargo build --release

The binary is at target/release/mcp-code-search.

Configuration

export CODE_SEARCH_WORKSPACE=/path/to/your/project

If not set, defaults to the current working directory.

Claude Desktop

{
  "mcpServers": {
    "code-search": {
      "command": "/path/to/mcp-code-search",
      "env": { "CODE_SEARCH_WORKSPACE": "/path/to/project" }
    }
  }
}

Kiro

{
  "mcpServers": {
    "code-search": {
      "command": "/path/to/mcp-code-search",
      "env": { "CODE_SEARCH_WORKSPACE": "/path/to/project" }
    }
  }
}

Cursor

{
  "mcpServers": {
    "code-search": {
      "command": "/path/to/mcp-code-search",
      "env": { "CODE_SEARCH_WORKSPACE": "/path/to/project" }
    }
  }
}

Windsurf

{
  "mcpServers": {
    "code-search": {
      "command": "/path/to/mcp-code-search",
      "env": { "CODE_SEARCH_WORKSPACE": "/path/to/project" }
    }
  }
}

Supported Languages

Language Extensions Symbol Patterns
Rust .rs fn, struct, trait, enum, type, const
TypeScript .ts, .tsx function, class, interface, type, const
Python .py def, class
Go .go func, type, const
Java .java class, interface
JavaScript .js function, class, const

MCP Server Manifest

server_id = "mcp_code_search"
display_name = "Code Search MCP"
version = "1.0.0"
domain = "developer"
risk_level = "low"
writes_allowed = "none"
transports = ["stdio"]
governance_gates = []

Contributors


James Karanja Maina

License

Apache-2.0 — see LICENSE for details.


Part of the ADK-Rust Enterprise MCP server ecosystem.

Registry Compliance

This server implements the ADK MCP SDK contract:

  • HealthCheck — async health probe for registry monitoring
  • mcp-server.toml — manifest declaring tools, risk classes, and credentials
  • Structured tracingRUST_LOG env-filter for observability

About

Code Search MCP — semantic search, symbol lookup, call graphs, dependency graphs, ownership maps, context packs

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages