Connect Cursor / MCP
Wire RepoPilot into Cursor, Claude Desktop, or any MCP client so agents can search, trace dependencies, and run impact analysis on your indexed repo.
Analyze a public repo or connect GitHub first — the config fills in your repository ID automatically.
MCP server config
{
"mcpServers": {
"repopilot": {
"command": "yarn",
"args": [
"workspace",
"@repopilot/api",
"mcp"
],
"env": {
"DATABASE_URL": "<same as api/.env DATABASE_URL>",
"MCP_REPO_SLUG": "owner/repo"
}
}
}
}Run from your RepoPilot monorepo root. Works with Cursor, Claude Desktop, and other MCP clients that accept the same JSON shape.
Setup
Index the repository
RepoPilot MCP reads from your indexed Postgres data. Open a repo in the dashboard and wait until indexing finishes before connecting an agent.
Add the MCP server to Cursor
In your RepoPilot checkout, copy .cursor/mcp.json.example to .cursor/mcp.json (or merge the repopilot block into Cursor Settings → MCP).
Set environment variables
Point DATABASE_URL at the same Neon database as api/.env. Set MCP_REPOSITORY_ID (from the dashboard URL) or MCP_REPO_SLUG (owner/repo). Optionally set MCP_API_KEY and pass apiKey in tool calls.
Reload MCP in your editor
Restart Cursor or run “MCP: Reload servers”. You should see repopilot with search, impact, dependency, history, ask, and context tools.
Available tools
- search_codebaseLexical + semantic code search with citations
search_codebase({ query: "auth middleware", repositoryId: "REPO_ID" }) - find_impactBlast radius for a file change
find_impact({ filePath: "src/auth.ts", repositoryId: "REPO_ID" }) - trace_dependenciesModule dependency traversal from a file
trace_dependencies({ filePath: "src/auth.ts", repositoryId: "REPO_ID" }) - search_historyGit history search across indexed commits
search_history({ query: "migrate auth", repositoryId: "REPO_ID" }) - ask_repositoryNatural-language Q&A with evidence
ask_repository({ query: "How does login work?", repositoryId: "REPO_ID" }) - get_context_packStructured context bundle for agent tasks
get_context_pack({ filePath: "src/auth.ts", question: "what breaks if this changes?", repositoryId: "REPO_ID" })