Structural codebase indexer for querying functions, classes, imports, dependency graphs and change impact.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add codebase-index --env PROJECT_ROOT='<PROJECT_ROOT>' -- uvx mcp-codebase-index~/.codex/config.toml
[mcp_servers.codebase-index]
command = "uvx"
args = ["mcp-codebase-index"]
env = { PROJECT_ROOT = "<PROJECT_ROOT>" }
# codex mcp add codebase-index --env PROJECT_ROOT='<PROJECT_ROOT>' -- uvx mcp-codebase-index~/.cursor/mcp.json
{
"mcpServers": {
"codebase-index": {
"command": "uvx",
"args": [
"mcp-codebase-index"
],
"env": {
"PROJECT_ROOT": "<PROJECT_ROOT>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"codebase-index": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-codebase-index"
],
"env": {
"PROJECT_ROOT": "<PROJECT_ROOT>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"codebase-index": {
"command": "uvx",
"args": [
"mcp-codebase-index"
],
"env": {
"PROJECT_ROOT": "<PROJECT_ROOT>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"codebase-index": {
"command": "uvx",
"args": [
"mcp-codebase-index"
],
"env": {
"PROJECT_ROOT": "<PROJECT_ROOT>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"codebase-index": {
"command": "uvx",
"args": [
"mcp-codebase-index"
],
"env": {
"PROJECT_ROOT": "<PROJECT_ROOT>"
}
}
}
}Environment variables
PROJECT_ROOT
Replace the placeholders with your own credentials and keep them out of version control.