> ## 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.

# Connect to Claude

> Register the 9squid MCP server with Claude Code or Claude Desktop.

Register the hosted 9squid MCP server with your AI client. Each registration is scoped to a role (`originator` or `investor`) — you can register both at the same time under different names.

***

## Authentication

You supply your **Clerk API key** when registering. It is sent as a bearer token on every request and forwarded by the MCP server to the Platform API for validation. The key is never stored on the MCP server.

***

## Claude Code

### Register via CLI

Run these commands from your terminal. Replace `<your-api-key>` with your 9squid API key.

**Originator**

```bash theme={null}
claude mcp add-json 9squid-originator '{
  "type": "https",
  "url": "https://mcp-stg.9squid.com/mcp?role=originator",
  "headers": {
    "Authorization": "Bearer <your-api-key>",
    "x-9squid-role": "originator"
  }
}'
```

**Investor**

```bash theme={null}
claude mcp add-json 9squid-investor '{
  "type": "https",
  "url": "https://mcp-stg.9squid.com/mcp?role=investor",
  "headers": {
    "Authorization": "Bearer <your-api-key>",
    "x-9squid-role": "investor"
  }
}'
```

> The `add-json` command stores the bearer token in your Claude Code MCP configuration. Do not commit generated MCP config files that contain real tokens.

### Register via project config file

Create or edit `.mcp.json` in your project root. Use an environment variable so the key is not committed to source control.

```json theme={null}
{
  "mcpServers": {
    "9squid-originator": {
      "type": "https",
      "url": "https://mcp-stg.9squid.com/mcp?role=originator",
      "headers": {
        "Authorization": "Bearer ${NINE_SQUID_API_KEY}",
        "x-9squid-role": "originator"
      }
    },
    "9squid-investor": {
      "type": "https",
      "url": "https://mcp-stg.9squid.com/mcp?role=investor",
      "headers": {
        "Authorization": "Bearer ${NINE_SQUID_API_KEY}",
        "x-9squid-role": "investor"
      }
    }
  }
}
```

### Verify the connection

List configured servers:

```bash theme={null}
claude mcp list
```

Inside a Claude Code session, check tool availability:

```text theme={null}
/mcp
```

You should see `9squid-originator` and/or `9squid-investor` listed as connected, with tool counts matching the [Tools Reference](/mcp-server/tools-reference).

### Remove a registration

```bash theme={null}
claude mcp remove 9squid-originator
claude mcp remove 9squid-investor
```

***

## Claude Desktop

Open your Claude Desktop configuration file:

* **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
* **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

Add the 9squid MCP servers under `mcpServers`:

```json theme={null}
{
  "mcpServers": {
    "9squid-originator": {
      "type": "https",
      "url": "https://mcp-stg.9squid.com/mcp?role=originator",
      "headers": {
        "Authorization": "Bearer <your-api-key>",
        "x-9squid-role": "originator"
      }
    },
    "9squid-investor": {
      "type": "https",
      "url": "https://mcp-stg.9squid.com/mcp?role=investor",
      "headers": {
        "Authorization": "Bearer <your-api-key>",
        "x-9squid-role": "investor"
      }
    }
  }
}
```

Save the file and restart Claude Desktop. The 9squid tools will appear in the tools panel.

***

## What tools you get per role

| Registration      | Tools available                                                                                                                  |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `role=originator` | Loans (11), Pools (5), Analytics (2), Selection Criteria (4), Documents (4), Webhooks (9), Alerts (3), Health (1) — **39 tools** |
| `role=investor`   | Deals (7), Portfolio (3), Subscriptions (4), Documents (4), Webhooks (9), Alerts (3), Health (1) — **31 tools**                  |

See the [Tools Reference](/mcp-server/tools-reference) for a complete listing with parameters.

***

## Troubleshooting

**No tools visible after connecting**

The role is missing or invalid. Verify the URL includes `?role=originator` or `?role=investor` exactly, and the `x-9squid-role` header matches. Missing or unrecognized roles intentionally expose zero tools.

**Authentication error**

Confirm the `Authorization: Bearer <your-api-key>` header is present. The MCP server only checks that a token exists — the Platform API validates whether the key is authorized.

**Server not responding**

Check the health endpoint:

```bash theme={null}
curl https://mcp-stg.9squid.com/health
```
