indexLABSCO SUMMARY
Call graphs instead of grep, for the three languages it covers.
What calls this function is a structural question, and text search answers it badly. The graph comes from an index step, so it reflects the code as of when you indexed it: re-run the index after a substantial change.
What it is
A server that builds a graph of the entities in a repository, functions, classes and imports, and answers relationship queries against it.
What you get
- An index built over the directory you point it at
- Every entity defined in one file, by relative path (list_file_entities)
- The relationships of a named entity, given its file and name (list_entity_relationships)
- Relationships covering function calls, inheritance and implementations
- Python, JavaScript and Rust
Requirements
npx, and the directory to index passed as an argument: @cartographai/mcp-server-codegraph <YOUR_PATH_TO_DIRECTORY>.
Setup effort
One command — npx @cartographai/mcp-server-codegraph <YOUR_PATH_TO_DIRECTORY>
USE CASES
Finding out what would break if you change a function
Read the relationships of that entity and see what calls into it.
Getting oriented in an unfamiliar file
List the entities it defines before reading any of them.
Tracing how a class is used across the codebase
Follow its relationships, inheritance and implementations included.
Checking what a module actually provides
List its entities rather than trusting the imports elsewhere.
3 tools
Listed in project docs. Your client may show a different list.
list_file_entitieslist_entity_relationshipsBEFORE YOU INSTALL
What to know first
Tools you get
3 tools named in the project's documentation. Run index first; neither query tool returns anything until it has. The npx command also needs the project directory argument.
Requires
npx on PATH
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
npx @cartographai/mcp-server-codegraph <YOUR_PATH_TO_DIRECTORY>MCP Clients
Claude Desktop
{
"mcpServers": {
"codegraph": {
"command": "npx",
"args": [
"-y",
"@cartographai/mcp-server-codegraph",
"<YOUR_PATH_TO_DIRECTORY>"
]
}
}
}