> ## Documentation Index
> Fetch the complete documentation index at: https://docs.preuve.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Use Preuve from Claude, Cursor, or any MCP client. Seven tools, stdio transport, two commands to set up.

The Preuve MCP server wraps the Agent API 1:1 over stdio. Once connected, your agent can start analyses, poll them, enrich, run deep modules, and export - all from conversation.

## Setup (Claude Code)

During early access the server script (`preuve-mcp-server.mjs`, a single Node file) is provided with your API key. Register it:

```bash theme={null}
claude mcp add preuve \
  --env PREUVE_AGENT_KEY=prv_... \
  --env PREUVE_AGENT_SECRET=prv_sk_... \
  -- node /path/to/preuve-mcp-server.mjs
```

Any MCP client that speaks stdio works the same way: run the script with the two environment variables set. An npm package is planned for general availability.

## Or let your agent install it

Paste this into Claude Code, Cursor, or Codex and let the agent do the setup:

```text theme={null}
Set up the Preuve MCP server for me.

1. I have three things from the Preuve early-access email: an API key (prv_...),
   a signing secret (prv_sk_...), and a file called preuve-mcp-server.mjs.
2. Ask me for the path to preuve-mcp-server.mjs. Do NOT ask me to paste the
   secret into chat - tell me where to put it as an environment variable, or
   register it directly in the MCP client config.
3. Register the server (Claude Code example):
   claude mcp add preuve \
     --env PREUVE_AGENT_KEY=<key> \
     --env PREUVE_AGENT_SECRET=<secret> \
     -- node <path>/preuve-mcp-server.mjs
4. Verify: list the MCP tools and confirm the seven preuve tools appear
   (start_analysis, get_analysis, enrich_analysis, export_analysis,
   create_batch, get_batch, export_batch).
5. Run a smoke test with a STARTER scan only (scanType: "starter" - it costs
   nothing): start_analysis on the idea "test idea for MCP setup", poll it
   with get_analysis, and show me the viability score when it completes.

Reference docs: https://docs.preuve.ai/mcp-server.md and
https://docs.preuve.ai/for-ai-agents.md
```

## Tools

| Tool              | What it does                                                                                                                      |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `start_analysis`  | Create one run. Requires explicit `scanType` (`free`/`deep`) so agents never spend paid quota by accident.                        |
| `get_analysis`    | Poll a run: status, `readyForExport`, enrichment progress, per-module statuses, report/share URLs.                                |
| `enrich_analysis` | Idempotently generate missing core sections; optionally start deep modules (`proofOfDemand`, `founderFit`, `playbook`, `trends`). |
| `export_analysis` | Structured `ideas-json` export (schemaVersion 2) for one completed run.                                                           |
| `create_batch`    | Up to 10 runs in one batch, idempotent on the batch `clientRunId`.                                                                |
| `get_batch`       | Per-item statuses for a batch.                                                                                                    |
| `export_batch`    | Batch export with `counts.exported/omitted` and per-item omission reasons.                                                        |

## Example prompts

```text theme={null}
Validate this idea with a starter scan: "AI bookkeeping for solo lawyers in France"

Run a deep scan on my top idea, then generate the launch playbook
and proof of demand once it completes.

Batch-score these 12 ideas and rank them by viability score.
```

<Note>
  Deep scans and deep modules consume your account quota exactly like the web app - the MCP server
  adds no billing of its own. See [Quotas and billing](/quotas-and-billing).
</Note>
