CodeNav MCP
March 30, 2025 ยท View on GitHub
Model Context Protocol server that provides code navigation capabilities using Tree-Sitter Stack Graphs.
Configuration
Add to your MCP settings:
{
"mcpServers": {
"codenav": {
"command": "/path/to/bin/deno",
"args": ["run", "-A", "/path/to/server.ts"],
"env": {},
"disabled": false,
"alwaysAllow": []
}
}
}
Available Tools
query_definition
- Description: Find definitions for references at a specific position
- Parameters:
source_path: Path to the source fileline: Line number of the referencecolumn: Column number of the referencesource_dir: (optional) Source directory path to create index if database doesn't exist
Development
Installation:
# Install dependencies
deno cache server.ts
# Run the server
deno run -A server.ts
Run tests:
deno test -A server.ts