Semantic code search and indexing
## Codebase MCP Server: Intelligent Code Navigation and Analysis The **Codebase MCP Server** provides deep codebase understanding and navigation capabilities within Google Antigravity, enabling developers to explore, understand, and work with complex codebases efficiently through AI-powered analysis. ### Why Codebase MCP? - **Semantic Code Search**: Find code by meaning, not just text matching, using advanced semantic understanding of your codebase - **Dependency Mapping**: Visualize and understand complex dependency relationships between modules, classes, and functions - **Impact Analysis**: Predict the ripple effects of code changes before making modifications to critical components - **Architecture Discovery**: Automatically discover and document the architecture patterns used in unfamiliar codebases - **Cross-Reference Navigation**: Jump between definitions, usages, and implementations across your entire project instantly ### Key Features #### 1. Semantic Code Search ```python from anthropic import Anthropic client = Anthropic() response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Find all functions that handle user authentication and session management in the codebase" }] ) ``` #### 2. Dependency Analysis ```python # Map code dependencies response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Show all dependencies of the PaymentProcessor class and identify potential circular dependencies" }] ) ``` #### 3. Code Flow Tracing ```python # Trace execution paths response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Trace the code flow from HTTP request to database write for the order creation endpoint" }] ) ``` #### 4. Architecture Documentation ```python # Generate architecture docs response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Generate architecture documentation for the microservices in the services/ directory" }] ) ``` ### Configuration ```json { "mcpServers": { "codebase": { "command": "npx", "args": ["-y", "@anthropic/mcp-server-codebase"], "env": { "CODEBASE_ROOT": "/path/to/your/project", "CODEBASE_LANGUAGES": "typescript,python,go" } } } } ``` ### Use Cases **Onboarding Acceleration**: Help new team members understand complex codebases quickly by providing contextual explanations and guided navigation. **Refactoring Planning**: Analyze impact of proposed refactoring changes and identify all affected code paths before beginning modifications. **Code Review Enhancement**: Understand the full context of changes by exploring related code, dependencies, and potential side effects. **Legacy Code Migration**: Map legacy system architectures and dependencies to plan incremental modernization strategies effectively. The Codebase MCP Server transforms how developers interact with large codebases, making exploration intuitive and understanding deep, regardless of project complexity or unfamiliarity.
{
"mcpServers": {
"codebase": {
"mcpServers": {
"codebase": {
"args": [
"-y",
"@anthropic/mcp-server-codebase",
"/path/to/your/project"
],
"command": "npx"
}
}
}
}
}