← Back to Docs

Getting Started

From zero to structural code intelligence in under 10 minutes.

The "Trust Loop"

SourcePrep runs locally. You don't need to create an account or upload code to the cloud to see it work.

1. Install

Download SourcePrep from sourceprep.io/download and install the desktop app. macOS and Windows are supported today; Linux is planned post-MVP.

See the full Installation Guide for step-by-step instructions.

2. Launch the App

Open SourcePrep from your Applications folder (macOS) or Start Menu (Windows). The app automatically starts the background daemon that manages the Rust indexer and MCP server.

claude — my-project

Alternatively, power users can run prep serve from a terminal.

3. Add Your Repo

In the SourcePrep dashboard, click the + button in the sidebar and select your project folder. SourcePrep will immediately start indexing (semantics + structure).

Or via CLI: prep add ~/my-project --name "My Project"

You'll see indexing progress in the dashboard. For a 50k file repo, the Rust trace index takes less than a second once semantic indexing wraps up.

Loading component preview…

What the dashboard looks like once your first project is indexed and serving structural context.

4. Connect Your Editor

SourcePrep works best when connected to an AI code editor via MCP.

Both editors use stdio (recommended). The MCP config tells your editor to spawn prep mcp as a subprocess — no URLs to configure.

Advanced: For remote/containerized setups, SourcePrep also supports SSE at http://localhost:8400/mcp/sse. See the MCP reference for details.

5. Verify

Open your editor's AI chat (e.g. Cursor Agent or Windsurf Cascade) and call:

"prep"

The prep tool returns an ambient project baseline: index status, trace coverage, your selected focus areas, and hub files tailored to your codebase. It's the best first step after connecting.

Then try a deeper explicit query:

"Graph the callers of [Function X] and find where it's used."

You should see the agent call prep_search with structural tracing and return an expanded graph analysis.

Note: Graph expansion requires a trace build. The file watcher rebuilds the trace automatically on file changes. To trigger a manual rebuild, open the dashboard's Graph Scope panel.

6. Run a Codebase Audit

Once your index is built, try an architectural audit:

"Audit my codebase"

The prep_audit tool analyzes your trace graph for architectural issues, tech debt, test coverage gaps, and more — using 11 built-in analyzers. No LLM required. Results include severity-tagged findings like ARCH-1, QUAL-3, etc.

To fix a finding, just say "fix ARCH-1" — the AI will call prep_audit with action="refactor" to get trace context and an action plan for the affected files.

See the full Codebase Audit Guide for details on all analyzers and the refactor workflow.

claude — my-project

Next Steps