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

# MCP Server

> AI agents — Claude Desktop, Cursor, ChatGPT, Windsurf — that score pitch decks, manage deal flow, and read venture-capital pipelines through Caplia.

**Caplia is an MCP server for venture-capital pitch-deck scoring and deal-flow management.** AI agents — Claude Desktop, Cursor, ChatGPT, Windsurf, or any custom MCP client — submit pitch decks, get back CRI quality scores and thesis-fit scores, list companies in the caller's pipeline, pull data-room contents, and poll async jobs as they complete.

Built for VC funds, accelerators, angel networks, and corporate-development teams who want to drive their Caplia pipeline from inside the AI tools they already use, without copy-pasting between tabs.

## What you can do

Concrete scenarios where Caplia MCP pays for itself:

<CardGroup cols={2}>
  <Card title="Score a pitch deck" icon="file-pdf">
    Drop a PDF into Claude Desktop, ask the agent to submit it to Caplia. The deck flows through Caplia's CRI scoring + thesis matching; the agent polls until results land and summarises them.
  </Card>

  <Card title="Triage your deal flow" icon="filter">
    "What's at the top of my pipeline this week?" — the agent calls `caplia_list_companies` and `caplia_get_company_scores` and ranks deals by CRI + thesis fit.
  </Card>

  <Card title="Compare against a thesis" icon="bullseye">
    "How well does this company fit our Climate Series A thesis?" — the agent fetches scores and walks through each scoring domain.
  </Card>

  <Card title="Generate an IC memo" icon="file-lines">
    The agent pulls company profile, traction metrics, data-room documents, and thesis scores into a structured memo, with citations back to Caplia.
  </Card>

  <Card title="Pull data-room files" icon="folder-open">
    "Open the Tesla data room and find any term sheets." — the agent calls `caplia_list_company_documents`, identifies the term sheet, and fetches a signed download URL.
  </Card>

  <Card title="Bulk submission from a CRM" icon="upload">
    Forward decks from your inbox to a small script that calls `caplia_submit_deck` per deck. Decks land in your pipeline pre-tagged with the company name your CRM already knows.
  </Card>
</CardGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Does Caplia have an MCP server for rating or scoring pitch decks?" icon="square-question">
    Yes. The `caplia_submit_deck` tool accepts a PDF (base64-encoded), runs it through Caplia's intake pipeline — text extraction → company profile → **CRI quality score** + **thesis-fit scores** — and returns a `job_id`. Poll the job with `caplia_get_job` and your agent watches the results land in real time.

    Endpoint: `https://mcp.venture.caplia.ai/` (production) or `https://mcp-sandbox.venture.caplia.ai/` (sandbox).
  </Accordion>

  <Accordion title="What's CRI?" icon="square-question">
    CRI (Caplia Readiness Index) is Caplia's proprietary 0-100 quality score for a company. It rolls up signals across team, market, product, traction, financials, defensibility, and execution, with per-domain breakdowns. The MCP server returns the full structure — overall score, per-domain scores, and the individual signals that drove each domain — so agents can explain *why* a deck scored the way it did, not just *that* it scored.
  </Accordion>

  <Accordion title="Can I use this from ChatGPT?" icon="square-question">
    Yes. ChatGPT supports remote MCP servers via custom GPT actions and through the ChatGPT desktop MCP integration. Point it at `https://mcp.venture.caplia.ai/` with an `Authorization: Bearer cap_inv_live_*` header. See [Configure your MCP client](#configure-your-mcp-client) for the analogous config — same JSON shape, just different settings UI.
  </Accordion>

  <Accordion title="What about Claude Desktop, Cursor, or Windsurf?" icon="square-question">
    All three work the same way — they're MCP clients that accept a remote MCP server URL plus an Authorization header. Setup snippets for each are below in [Configure your MCP client](#configure-your-mcp-client).
  </Accordion>

  <Accordion title="Is this for VCs only, or also accelerators and angels?" icon="square-question">
    Both. Caplia is used by venture funds, accelerator programmes, angel networks, and corporate-development teams. The MCP server reflects whatever pipeline structure your Caplia account has — your views, your theses, your stages. There's nothing VC-specific in the protocol itself.
  </Accordion>

  <Accordion title="What does it cost?" icon="square-question">
    Caplia's MCP server is free for any Caplia customer — there's no separate "API tier" or per-call charge in v1. Rate limits are enforced organically (a key that abuses the API gets revoked); we'll add explicit usage tiers if and when there's a real need.
  </Accordion>

  <Accordion title="How is this different from analysing a PDF directly in an LLM?" icon="square-question">
    Two big differences. **First, scoring is consistent and explainable.** CRI uses the same scoring rubric across every deck, with traceable per-domain signals — not the LLM's mood that day. **Second, it lives in your pipeline.** Scored companies show up in your existing Caplia views, theses, and team dashboards. They're not one-off chat outputs that disappear after the conversation ends.
  </Accordion>

  <Accordion title="Is data isolated between customers and environments?" icon="square-question">
    Yes. Every MCP request runs under the calling user's row-level security in Postgres — same isolation as the web app. Cross-tenant access is structurally impossible. There's also a **sandbox environment** (`mcp-sandbox.venture.caplia.ai`, `cap_inv_test_*` keys) with isolated test data, so integrators can develop without touching production.
  </Accordion>

  <Accordion title="Can I integrate without an AI agent — just programmatically?" icon="square-question">
    Yes, use the [REST API](/api-reference/introduction) directly: `POST /v1/decks` for submission, `GET /v1/jobs/{id}` for polling. The MCP server wraps these same endpoints. Same keys, same scopes, same data.
  </Accordion>

  <Accordion title="Where do API keys come from?" icon="square-question">
    Mint them yourself: **Caplia portal → Settings → API Keys → Create new key**. Pick `read` for read-only integrations or `write` if you need to submit decks. Keys are shown once at creation; copy to a secret manager. See [Authentication](/authentication) for the full key format and security guidance.
  </Accordion>
</AccordionGroup>

## Endpoints

```
Production:    https://mcp.venture.caplia.ai/
Sandbox:       https://mcp-sandbox.venture.caplia.ai/
```

Transport: **Streamable HTTP** (single POST endpoint, JSON-RPC 2.0). Protocol version `2024-11-05`.

## Authentication

Bearer-token, same model as the REST API:

```
Authorization: Bearer cap_inv_live_<32 chars>   # production
Authorization: Bearer cap_inv_test_<32 chars>   # sandbox
```

Mint a key in **Settings → API Keys** inside Caplia. See [Authentication](/authentication) for full details on key format, scopes, and security best practices.

## Tools

13 tools that map 1:1 to REST endpoints. All tools inherit row-level security — you only see data your account already has access to in the web app.

### Read tools (require `read` scope)

| Tool                            | What an agent asks for it                                                     |
| ------------------------------- | ----------------------------------------------------------------------------- |
| `caplia_search`                 | "Find any companies in my pipeline named Tesla"                               |
| `caplia_list_companies`         | "Show me companies at the seed stage"                                         |
| `caplia_get_company`            | "Tell me everything about company X"                                          |
| `caplia_get_company_scores`     | "What's the CRI score and thesis fit for company X?"                          |
| `caplia_get_company_metrics`    | "Show me traction metrics for company X"                                      |
| `caplia_list_company_documents` | "What's in company X's data room?"                                            |
| `caplia_get_document_url`       | "Download the pitch deck for company X"                                       |
| `caplia_list_theses`            | "What investment theses does my team have?"                                   |
| `caplia_list_properties`        | "What custom properties (e.g. award categories) can I tag a submission with?" |
| `caplia_list_views`             | "What pipeline views are configured?"                                         |
| `caplia_get_view_companies`     | "Show me everything in the Monday screening view"                             |
| `caplia_get_job`                | "What's the status of the deck I just submitted?"                             |

### Write tools (require `write` scope)

| Tool                 | What an agent asks for it                                                                |
| -------------------- | ---------------------------------------------------------------------------------------- |
| `caplia_submit_deck` | "Submit this PDF as a new deal, tagged Climate Tech, with the founder's contact details" |

Max 50 MB per deck (base64-encoded). Other write endpoints (create company shell, attach documents, add notes) exist on the REST API and will be wrapped as MCP tools as customer demand surfaces.

## Configure your MCP client

<Warning>
  **Using Claude in the browser or on mobile?** Caplia isn't in Anthropic's connector directory yet, and the **Settings → Connectors → Add custom connector** flow on claude.ai currently only completes for OAuth-based servers. Caplia authenticates with a static API key, so adding `https://mcp.venture.caplia.ai/` there fails — typically with *"Couldn't register with sign-in service"*. Connect through [Claude Desktop](#claude-desktop) or [Claude Code](#claude-code) below instead; both send your API key with every request.
</Warning>

### Claude Desktop

Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows). Claude Desktop reaches remote servers through the `mcp-remote` helper, which needs [Node.js](https://nodejs.org):

```json theme={null}
{
  "mcpServers": {
    "caplia": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.venture.caplia.ai/",
        "--header",
        "Authorization: Bearer cap_inv_live_YOUR_KEY_HERE"
      ]
    }
  }
}
```

Quit Claude Desktop completely and reopen it (not just the window). The Caplia tools appear under the plug icon at the bottom-left of any chat.

### Cursor

In Cursor settings → **Features → MCP → Add new MCP server**:

* **Name**: `caplia`
* **Type**: `sse` (streamable HTTP)
* **URL**: `https://mcp.venture.caplia.ai/`
* **Header**: `Authorization: Bearer cap_inv_live_YOUR_KEY_HERE`

### Claude Code

One command, no file editing:

```bash theme={null}
claude mcp add --transport http caplia https://mcp.venture.caplia.ai/ \
  --header "Authorization: Bearer cap_inv_live_YOUR_KEY_HERE"
```

Run `/mcp` inside Claude Code (or `claude mcp list`) to confirm. Add `--scope user` to enable it in every project.

### Codex

Codex connects to remote MCP servers natively, reading the key from a named environment variable:

```bash theme={null}
export CAPLIA_API_KEY="cap_inv_live_YOUR_KEY_HERE"
codex mcp add caplia --url https://mcp.venture.caplia.ai/ --bearer-token-env-var CAPLIA_API_KEY
```

Run `/mcp` in the Codex TUI (or `codex mcp list`) to confirm.

### Windsurf, Cody, ChatGPT, generic clients

Most MCP clients accept the same three things:

1. URL: `https://mcp.venture.caplia.ai/`
2. `Authorization` header: `Bearer cap_inv_(live|test)_<key>`
3. (Optional) Server name: `caplia`

Refer to your client's MCP documentation for the exact config-file location.

## Quick test from the terminal

If you want to verify the server works before wiring it into an agent:

```bash theme={null}
# Liveness + protocol check (no auth) — a real MCP server answers `initialize`
curl -X POST https://mcp.venture.caplia.ai/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'
# → {"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"serverInfo":{"name":"caplia-api","version":"1.0.0"}}}

# List tools (no auth)
curl -X POST https://mcp.venture.caplia.ai/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

# Submit a pitch deck (requires write scope)
B64=$(base64 -i deck.pdf | tr -d '\n')
curl -X POST https://mcp.venture.caplia.ai/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer cap_inv_live_..." \
  -d "$(jq -n --arg b64 "$B64" '{
    jsonrpc:"2.0", id:1, method:"tools/call",
    params:{
      name:"caplia_submit_deck",
      arguments:{file_b64:$b64, filename:"deck.pdf"}
    }
  }')"
```

## Troubleshooting

| Symptom                                                                                | Likely cause                                                                                                                                                          | Fix                                                                                                                       |
| -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| *"Couldn't register with sign-in service"* when adding a custom connector on claude.ai | claude.ai custom connectors require OAuth; Caplia uses API keys                                                                                                       | Use the [Claude Desktop](#claude-desktop) or [Claude Code](#claude-code) setup above                                      |
| Tools are listed, but every call returns `Missing Authorization header`                | Your client connected without sending the key — `initialize` and `tools/list` don't require auth, so setup can look successful even with a missing or mistyped header | Re-check the `Authorization` header (or `--header` line) in your config, then restart the client                          |
| `401` / invalid key, even though the key looks right                                   | Key and host environments don't match                                                                                                                                 | `cap_inv_test_*` keys only work on `mcp-sandbox.venture.caplia.ai`; `cap_inv_live_*` keys only on `mcp.venture.caplia.ai` |
| No Caplia tools in Claude Desktop after editing the config                             | App not fully quit, a JSON syntax error, or Node.js missing (`mcp-remote` needs it)                                                                                   | Validate the JSON, install [Node.js](https://nodejs.org), then quit Claude Desktop completely and reopen it               |
| Tool calls fail with a permissions error on writes                                     | Key has `read` scope only                                                                                                                                             | Mint a `write`-scoped key in **Settings → API Keys**                                                                      |

## Limitations

* **One write tool today** (`caplia_submit_deck`). Other REST write endpoints (create company shell, attach documents, add notes) will be wrapped as MCP tools as customer demand surfaces.
* **No streaming responses.** Each tool call is a single request-response. Long-running operations (deck processing) are polled via `caplia_get_job`.
* **50 MB max deck size**, base64-encoded.
* **JSON output only.** Each tool returns raw JSON from the REST endpoint, serialised as a text content block. Agents parse it normally.

## Source

Implementation: [`supabase/functions/mcp-v1/`](https://github.com/Caplia-Tech/caplia-api/tree/main/supabase/functions/mcp-v1). Tool definitions are inline in `index.ts`. Open a PR there to propose new tools or refine existing ones.
