Madar — Claude Code MCP server: repo graph before the search
Indexes a TypeScript or Node.js project into a local graph, then hands the agent a small task-focused context pack: files, symbols, routes. No more rediscovering the repo each time.
claude mcp add madar -- npx -y @lubab/madarWhat Madar does
Madar walks the source tree and records files, symbols, imports, calls, routes, handlers and framework metadata. Ask it a question and you get a narrow slice built for that task instead of the whole project. Each answer carries signals about how fresh the graph is, how much it covers, and whether a targeted look at the code is still needed.
Indexing happens on your machine, so sources stay where they are. Once a profile is installed, it watches the workspace and rebuilds graph-backed context after changes. Setup runs per agent: madar claude install, madar codex install, madar cursor install and so on.
Node.js 20 or newer is required. Static analysis cannot see live runtime behaviour, and heavy dynamic patterns that never make it into the graph weaken the answers. A stale graph or skipped files leaves holes in what the agent sees, so check the reported state before trusting a result.
What it helps with
- pick likely entrypoints for a task before any broad file search
- explain how a project handles authentication
- trace why an endpoint answers with 403
- estimate the blast radius of changing one service
- package context for a different coding agent to pick up
Example prompts for the agent
- Madar, how does authentication work in this repo?
- Why does this endpoint return 403? Show me the path from the graph.
- What breaks if I change this service?
How to install Madar
Platform CLI
claude mcp add madar -- npx -y @lubab/madarPlatform CLI
codex mcp add madar -- npx -y @lubab/madarConfig file
{
"mcpServers": {
"madar": {
"command": "npx",
"args": [
"-y",
"@lubab/madar"
]
}
}
}Config file
{
"servers": {
"madar": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@lubab/madar"
]
}
}
}Platform CLI
gemini mcp add madar npx -y @lubab/madarStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Madar
How do I install Madar in Claude Code?
Run claude mcp add madar -- npx -y @lubab/madar, then confirm it with madar doctor and madar status.
What does Madar do?
It indexes a TypeScript or Node.js repository into a local graph and answers agent questions with a bounded context pack — files, symbols, calls, routes — plus hints on freshness and coverage.
What has to be installed first?
Node.js 20 or newer. Madar itself ships as the npm package @lubab/madar, and an agent is wired up with a command like madar claude install.