---
title: "MCP Server"
description: "Use OpenCap Stack's 29 MCP tools from Claude Code, Cursor, Windsurf, or any MCP-compatible agent"
canonical: "https://docs.ainative.studio/docs/opencapstack/mcp-server"
last-updated: "2026-10-03T21:47:10.764Z"
---

# MCP Server

Source: https://docs.ainative.studio/docs/opencapstack/mcp-server

> Use OpenCap Stack's 29 MCP tools from Claude Code, Cursor, Windsurf, or any MCP-compatible agent

# OpenCap Stack MCP Server

The `@opencapstack/mcp-server` gives any MCP-compatible AI agent direct access to your cap table — no REST calls, no boilerplate. Ask Claude to *"show me the cap table"* or *"issue 50,000 options to Jane Doe"* and it happens.

```bash
npm install -g @opencapstack/mcp-server
```

**29 tools** covering stakeholders, equity, SAFEs, valuations, documents, and analytics.

---

## Setup

### Claude Code

Add to `~/.claude.json` (global) or `.claude/settings.json` (project):

```json
{
  "mcpServers": {
    "opencap": {
      "command": "npx",
      "args": ["-y", "@opencapstack/mcp-server"],
      "env": {
        "OPENCAP_API_KEY": "your-api-key",
        "OPENCAP_BASE_URL": "https://api.opencapstack.com/api/v1"
      }
    }
  }
}
```

:::warning Base URL
Include `/api/v1` in `OPENCAP_BASE_URL`. Without it all requests will 404.
:::

### Cursor

Add to `.cursor/mcp.json` in your project root:

```json
{
  "mcpServers": {
    "opencap": {
      "command": "npx",
      "args": ["-y", "@opencapstack/mcp-server"],
      "env": {
        "OPENCAP_API_KEY": "your-api-key",
        "OPENCAP_BASE_URL": "https://api.opencapstack.com/api/v1"
      }
    }
  }
}
```

### Windsurf

Add to `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "opencap": {
      "command": "npx",
      "args": ["-y", "@opencapstack/mcp-server"],
      "env": {
        "OPENCAP_API_KEY": "your-api-key",
        "OPENCAP_BASE_URL": "https://api.opencapstack.com/api/v1"
      }
    }
  }
}
```

### Claude Desktop

Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):

```json
{
  "mcpServers": {
    "opencap": {
      "command": "npx",
      "args": ["-y", "@opencapstack/mcp-server"],
      "env": {
        "OPENCAP_API_KEY": "your-api-key",
        "OPENCAP_BASE_URL": "https://api.opencapstack.com/api/v1"
      }
    }
  }
}
```

---

## Getting Your API Key

**Option A — Agent onboarding (zero human steps):**
```bash
curl -X POST https://api.opencapstack.com/api/v1/agents/onboard \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "claude-mcp",
    "agent_name": "Claude MCP Agent",
    "capabilities": ["read:cap-table", "write:equity", "read:financials"]
  }'
```

Copy the `api_key` from the response and use it as `OPENCAP_API_KEY`.

**Option B — Login and use the JWT:**
```bash
curl -X POST https://api.opencapstack.com/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"yourpassword"}'
```

---

## All 29 Tools

### Stakeholders (5 tools)

| Tool | Description |
|------|-------------|
| `list_stakeholders` | List all stakeholders with ownership percentages |
| `get_stakeholder` | Get a specific stakeholder by ID |
| `create_stakeholder` | Add a new stakeholder (founder, investor, employee, advisor) |
| `update_stakeholder` | Update stakeholder details |
| `delete_stakeholder` | Remove a stakeholder |

### Share Classes (4 tools)

| Tool | Description |
|------|-------------|
| `list_share_classes` | List all share classes |
| `get_share_class` | Get a specific share class |
| `create_share_class` | Create a new share class (common, preferred, options pool) |
| `update_share_class` | Update share class terms |

### Equity Grants (4 tools)

| Tool | Description |
|------|-------------|
| `list_equity_grants` | List all equity grants |
| `get_equity_grant` | Get a grant with vesting schedule |
| `create_equity_grant` | Issue options, RSUs, or warrants |
| `update_equity_grant` | Update grant status or vesting |

### SAFE Notes (3 tools)

| Tool | Description |
|------|-------------|
| `list_safes` | List all SAFE instruments |
| `get_safe` | Get a SAFE by ID |
| `create_safe` | Create a new SAFE note |

### Cap Table (4 tools)

| Tool | Description |
|------|-------------|
| `cap_table_summary` | Full ownership breakdown by share class and stakeholder |
| `get_fully_diluted_shares` | Total share count including all options and warrants |
| `calculate_dilution` | Model ownership impact of a new fundraising round |
| `run_waterfall_analysis` | Liquidation waterfall for an exit scenario |

### Valuations (3 tools)

| Tool | Description |
|------|-------------|
| `get_latest_valuation` | Most recent 409A valuation |
| `get_valuation_history` | Historical valuation timeline |
| `create_valuation_request` | Trigger a new 409A valuation |

### Documents (2 tools)

| Tool | Description |
|------|-------------|
| `list_documents` | List documents with filtering |
| `get_document` | Get document metadata and download URL |

### Financial Reports (2 tools)

| Tool | Description |
|------|-------------|
| `list_financial_reports` | List generated reports |
| `create_financial_report` | Generate investor report, cap table summary, or equity ledger |

### Workflows (2 tools)

| Tool | Description |
|------|-------------|
| `list_workflows` | List pending approval workflows |
| `whoami` | Get current authenticated user and company context |

---

## Example Conversations

### Check ownership

```
You: What does the cap table look like?

Claude: Let me pull that up.
[calls cap_table_summary]

Here's the current cap table:
- Total issued shares: 12,500,000
- Jane Doe (Founder): 5,000,000 shares — 40%
- Acme Ventures (Series A): 4,500,000 shares — 36%
- Options Pool: 3,000,000 shares — 24%
```

### Issue equity

```
You: Issue 50,000 options to the new engineer, Alex Kim
     (alex@startup.com), standard 4-year cliff vesting,
     $0.10 strike price.

Claude: I'll create Alex as a stakeholder and issue the grant.
[calls create_stakeholder]
[calls create_equity_grant]

Done. Alex Kim has been added and granted 50,000 options
(Grant #GRANT-AK50000-2026) with a 4-year vest, 1-year cliff,
at $0.10 strike. Vesting starts today.
```

### Model a fundraising round

```
You: If we raise a $5M Series B at a $20M pre-money,
     what happens to everyone's ownership?

Claude: Running dilution analysis...
[calls calculate_dilution]

Series B dilution impact:
- New shares issued: 2,500,000
- Post-money fully diluted: 16,500,000

After dilution:
- Jane Doe: 40% → 30.3%
- Acme Ventures: 36% → 27.3%
- Series B investors: 0% → 15.2%
- Options Pool: 24% → 18.2% (undiluted)
```

### Run waterfall analysis

```
You: Model an exit at $30M. Who gets what?

Claude: Running liquidation waterfall...
[calls run_waterfall_analysis]

$30M exit waterfall:
1. Series A 1x liquidation preference: $4.5M → Acme Ventures
2. Remaining $25.5M distributed pro-rata:
   - Jane Doe (40%): $10.2M
   - Acme Ventures (36%): $9.2M
   - Options Pool (24%): $6.1M
Total proceeds: Founders $10.2M, Series A $13.7M
```

---

## AINative + OpenCap Stack (Combined Setup)

If you use both AINative ZeroDB and OpenCap Stack, configure both MCP servers together:

```json
{
  "mcpServers": {
    "zerodb": {
      "command": "python",
      "args": ["-m", "zerodb_mcp"],
      "env": {
        "ZERODB_API_KEY": "your-zerodb-key",
        "ZERODB_PROJECT_ID": "your-project-id"
      }
    },
    "opencap": {
      "command": "npx",
      "args": ["-y", "@opencapstack/mcp-server"],
      "env": {
        "OPENCAP_API_KEY": "your-opencap-key",
        "OPENCAP_BASE_URL": "https://api.opencapstack.com/api/v1"
      }
    }
  }
}
```

Now Claude can store memory in ZeroDB *and* manage your cap table in the same conversation.

---

## Self-Hosted MCP

If you're running OpenCap Stack on your own infrastructure, point the server at your instance:

```json
{
  "env": {
    "OPENCAP_API_KEY": "your-api-key",
    "OPENCAP_BASE_URL": "https://your-opencapstack.company.com/api/v1"
  }
}
```

See the [Self-Hosting guide](./self-hosting) for deployment instructions.
