← Back to Docs

MCP Integrations

Connect SourcePrep to your favorite AI editors using the Model Context Protocol.

What is MCP?

The Model Context Protocol (MCP) is an open standard that enables AI models to interact with external data and tools.

SourcePrep runs a local MCP server that exposes your indexed codebase as a set of tools. It supports both Stdio (recommended for local editors) and SSE (for remote/containerized setups). When you connect a CLI agent like Claude Code or Codex, or an IDE like Cursor or Windsurf, their internal AI agents gain the ability to:

  • Get Oriented: Call prep with no arguments for ambient context — module structures, hub files, focus areas, and immune-system alerts.
  • Search Semantically: Use prep_search to find code by meaning. The query intent is auto-classified (LOCATE, EXPLAIN, RATIONALE, TRACE, EXAMPLE, COMPARE, DISCOVER) so the right index gets queried.
  • Code Graph: Use prep_impact to see exact blast radius before editing — what depends on a file or symbol, with stdlib/external noise filtered out.
  • Audit Codebase: prep_audit is dual-mode — call with no args for structural findings (coupling, cycles, concept violations), or pass findings to enrich ruff/eslint/semgrep output with structural context. Accepts SARIF in/out. Learn more →
  • Persistent Memory: Use prep_observe to save cross-session notes that get automatically flagged as [STALE] when the underlying files change.
  • Business Rationale: Use prep_concepts to record and query the "why" behind code — design decisions, constraints, and architecture rules. Constraint concepts auto-generate antibodies that surface in ambient context when violated.

Tools Reference

ToolPurpose
prepAmbient context — module map, hub files, focus areas, immune-system alerts
prep_searchSemantic search with auto-classified intent (locate / explain / rationale / trace / example / compare / discover)
prep_impactBlast radius analysis — what depends on a file or symbol, with noise filtered
prep_auditStructural findings + lint enrichment (action = scan, antibodies, refactor, verify, report, advise)
prep_observeSave / retrieve cross-session notes with stale flags
prep_conceptsRecord / query design decisions and constraints; constraint concepts auto-derive antibodies
claude — my-project

What a prep call looks like in your editor — ambient context, no arguments.

Live Dashboard Preview

These are live, interactive previews of the SourcePrep dashboard panels your agents interact with.

Loading component preview…

Semantic Search Panel — find code by meaning, not keywords

Loading component preview…

Knowledge Status — real-time view of your codebase knowledge

Loading component preview…

Agent Operations Panel — the cross-cutting view of which MCP-aware agents are using your index right now.