> ## Documentation Index
> Fetch the complete documentation index at: https://developer.9squid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Overview

> Use AI agents like Claude to interact with the 9squid platform through natural language via the Model Context Protocol.

The 9squid Platform MCP server exposes the Platform API as a set of structured tools that AI agents can call directly. Instead of writing curl commands or SDK calls, you describe what you want — "list my loans", "check the pool summary for deal X", "submit an IOI" — and the AI handles the API calls on your behalf.

***

## What is MCP?

[Model Context Protocol (MCP)](https://modelcontextprotocol.io) is an open standard that lets AI assistants (like Claude) call external tools and APIs in a structured, auditable way. The 9squid MCP server implements this protocol, bridging Claude to the Platform API Gateway.

***

## What you can do

53 tools are available across 11 domains. Access depends on your role.

### Originator tools

| Domain             | Tools | What it covers                                                           |
| ------------------ | ----- | ------------------------------------------------------------------------ |
| Loans              | 11    | Loan tape upload lifecycle, deal status, bulk ingest, approval           |
| Pools              | 5     | Pool listing, details, summary stats, stratification reports             |
| Analytics          | 2     | TCT Risk ALM analysis (duration, convexity, NII, EVE, VaR, stress tests) |
| Selection Criteria | 4     | SC run triggers, pass/fail/exception results                             |

### Investor tools

| Domain        | Tools | What it covers                                                                  |
| ------------- | ----- | ------------------------------------------------------------------------------- |
| Deals         | 7     | Deal browsing, pool data, tranches, documents, comparables, originator profiles |
| Portfolio     | 3     | Aggregate metrics, current positions, performance reports                       |
| Subscriptions | 4     | IOI submission, formal subscription, allocation details                         |

### Available to both roles

| Domain    | Tools | What it covers                                     |
| --------- | ----- | -------------------------------------------------- |
| Documents | 4     | Deal room document upload and retrieval            |
| Webhooks  | 9     | Webhook CRUD, delivery history, replay, global log |
| Alerts    | 3     | Notification read, filter, delete                  |
| Health    | 1     | Platform API Gateway health check                  |

***

## How it works

```
┌──────────────────────┐   MCP (HTTP)    ┌──────────────────────────┐   REST   ┌─────────────────────────┐
│  Claude Code or      │ ─────────────▶  │  9squid MCP Server       │ ───────▶ │  9squid Platform        │
│  Claude Desktop      │                 │  FastMCP / port 8013     │          │  API Gateway (NestJS)   │
└──────────────────────┘                 └──────────────────────────┘          └─────────────────────────┘
         │                                           │
         └─────  Authorization: Bearer <API key>  ───┘
                + ?role=originator | investor
```

1. You (or Claude) call an MCP tool.
2. The MCP server forwards the request to the Platform API Gateway with your bearer token.
3. The Platform API validates your Clerk API key and returns data.
4. Results come back to Claude as structured JSON for reasoning and display.

Your API key is never stored on the MCP server — it is forwarded per-request and validated by the Platform API.

***

## Role-based access

Two roles are available. You choose a role when registering the MCP server:

| Role         | Tools exposed                                                         |
| ------------ | --------------------------------------------------------------------- |
| `originator` | Originator tools + shared tools (documents, webhooks, alerts, health) |
| `investor`   | Investor tools + shared tools (documents, webhooks, alerts, health)   |

You can register both roles simultaneously under separate server names (e.g. `9squid-originator` and `9squid-investor`).

***

## Prerequisites

* A valid **Clerk API key** for the 9squid platform
* Access to the hosted 9squid MCP server at `https://mcp-stg.9squid.com`
* **Claude Code** CLI or **Claude Desktop**

***

## Next steps

* [Connect to Claude](/mcp-server/connect-to-claude) — register with Claude Code or Claude Desktop
* [Tools reference](/mcp-server/tools-reference) — full listing of all 53 tools
