MCP Server
Mapnostics ships a native Model Context Protocol (MCP) server, hosted at mapnostics.com/api/mcp. Connect any MCP-compatible AI agent — Claude, Cursor, Zed — and it gets direct access to your codebase intelligence.
Connecting
First create a personal API key under Settings → API keys (keys look like mns_… and are shown once at creation). Clients with native streamable-HTTP support connect directly:
For clients that only speak stdio, use the bridge — it forwards stdio messages to the hosted endpoint using the API key in your environment:
Live demo
Watch the MCP server connect, expose its tools, then answer a natural language query about your codebase — all in real time.
Available MCP tools
- get_repo_health — health score, dead code count, and tech debt hours for a repository.
- get_dead_code — dead code entities with evidence, confidence, and uncertainty reasons.
- get_zombie_code — zombie code entities with call-chain reachability paths.
- get_impact — given a file, returns the full blast radius: affected files with evidence.
- get_dependencies — the file import graph, for the whole repo or a single file.
- resolve_operational_truth — full reasoning trace for a single entity: rules evaluated, conclusion, why.
- find_in_codebase — search file paths, API/page routes, and database tables by a substring.
- get_intent — the AI-recovered intent summary for the repo or any file.
- get_health_score — composite health score with the per-dimension breakdown (same formula as the dashboard).
- detect_secrets — hardcoded secret findings from the latest scan, filterable by severity.
- get_onboarding — the graph-grounded onboarding guide: entry points, learning path, gotchas.
- get_bus_factor — key-person risk: how many key people the codebase has, a risk band, and each contributor’s share of the lines and files.
- analyse_ticket — AI analysis for a ticket: related files, effort estimate, suggested approach, and impact warning.
- get_similar_fixes — past tickets analysed in similar files, for how comparable issues were resolved before.
- get_coupling — how many files import a given file and how many it imports, with the actual file lists.
Compatible clients
Claude Code & Claude Desktop
Claude Code connects natively: claude mcp add --transport http mapnostics https://mapnostics.com/api/mcp --header "Authorization: Bearer mns_...". Claude Desktop uses the stdio bridge — add npx mapnostics-mcp to your claude_desktop_config.json with MAPNOSTICS_API_KEY in its env.
Cursor
Configure the server in .cursor/mcp.json — either the URL with an Authorization header, or the npx mapnostics-mcp bridge. Cursor will call Mapnostics tools automatically when answering questions about your codebase.
Any MCP-compatible agent
The server implements MCP over streamable HTTP; the bridge covers stdio-only clients. Any client that follows the protocol can connect — including custom agents built with the Anthropic Claude SDK or open-source MCP libraries.
Authorization: Bearer mns_…). Create and revoke keys under Settings → API keys; revocation takes effect immediately.