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

# AI agents (MCP)

> Let Claude, ChatGPT, Cursor or your own agent run your workspace through the Enterprise MCP server.

The Enterprise MCP server puts the whole [Enterprise API](https://docs.pocketsflow.com/api-reference/enterprise.md)
in front of AI agents as tools. An agent can list your sellers, check a
withdrawal and approve it, read a buyer's purchases or change your withdrawal
fee, all scoped to your workspace like the API.

| | |
| - | - |
| URL | `https://api.pocketsflow.com/v1/enterprise/mcp` |
| Transport | Streamable HTTP (JSON-RPC 2.0, `POST`) |
| Auth | `Authorization: Bearer ek_live_...` (an [enterprise API key](https://docs.pocketsflow.com/enterprise/developers.md#authenticate)) |

> [!WARNING]
>
> An agent with your key can do anything the key can: approve withdrawals,
> pause sellers, change settings. Make a separate key for each agent, name it
> after the agent, and revoke it in **Settings > API keys** when you're done.
> Every call is in your audit log under that key.

## Connect

> [tab] Claude Code
>
> ```bash theme={"system"}
> claude mcp add --transport http pocketsflow-enterprise \
>   https://api.pocketsflow.com/v1/enterprise/mcp \
>   --header "Authorization: Bearer ek_live_..."
> ```

> [tab] Cursor
>
> In `.cursor/mcp.json`:
>
> ```json theme={"system"}
> {
>   "mcpServers": {
>     "pocketsflow-enterprise": {
>       "url": "https://api.pocketsflow.com/v1/enterprise/mcp",
>       "headers": { "Authorization": "Bearer ek_live_..." }
>     }
>   }
> }
> ```

> [tab] Claude Desktop
>
> Through the `mcp-remote` bridge, in `claude_desktop_config.json`:
>
> ```json theme={"system"}
> {
>   "mcpServers": {
>     "pocketsflow-enterprise": {
>       "command": "npx",
>       "args": [
>         "-y", "mcp-remote",
>         "https://api.pocketsflow.com/v1/enterprise/mcp",
>         "--header", "Authorization: Bearer ${PF_ENTERPRISE_KEY}"
>       ],
>       "env": { "PF_ENTERPRISE_KEY": "ek_live_..." }
>     }
>   }
> }
> ```

> [tab] Your own agent
>
> Any MCP client that speaks Streamable HTTP and can send a header. With the
> Claude API's MCP connector:
>
> ```json theme={"system"}
> "mcp_servers": [{
>   "type": "url",
>   "url": "https://api.pocketsflow.com/v1/enterprise/mcp",
>   "name": "pocketsflow-enterprise",
>   "authorization_token": "ek_live_..."
> }]
> ```

Then ask in plain words: *"Which withdrawals are waiting for me? Approve the
ones under \$200 from verified sellers."*

## Tools

Every Enterprise API endpoint is a tool, except the CSV exports and the
payments partner pass-through.

| Area | Tools |
| - | - |
| Workspace | `get_workspace`, `get_overview`, `list_audit_log` |
| Sellers | `list_subaccounts`, `get_subaccount`, `list_subaccount_products`, `get_subaccount_balance`, `list_subaccount_payouts`, `pause_subaccount`, `unpause_subaccount`, `hold_subaccount_payouts`, `release_subaccount_payouts`, `set_subaccount_withdrawal_approval` |
| Sales and buyers | `list_transactions`, `get_transaction`, `list_customers`, `get_customer` |
| Withdrawals | `list_withdrawals`, `get_withdrawal`, `approve_withdrawal`, `reject_withdrawal` |
| Earnings | `list_earnings` |
| Settings | `get_brand`, `update_brand`, `get_seo`, `update_seo`, `get_features`, `update_features`, `get_fees`, `set_fees`, `get_payout_settings`, `update_payout_settings`, `get_design_settings`, `update_design_settings`, `get_domains`, `get_sign_in_settings` |
| Webhooks | `list_webhooks`, `create_webhook`, `get_webhook`, `update_webhook`, `delete_webhook`, `test_webhook`, `rotate_webhook_secret`, `list_webhook_deliveries`, `redeliver_webhook` |

Reads are marked read-only, so clients run them without asking. Tools that
move money or affect sellers (`approve_withdrawal`, `reject_withdrawal`,
`pause_subaccount`, `hold_subaccount_payouts`, `delete_webhook`,
`rotate_webhook_secret`) are marked destructive, so clients ask you first.

## Try it with curl

```bash theme={"system"}
curl https://api.pocketsflow.com/v1/enterprise/mcp \
  -H "Authorization: Bearer ek_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call",
        "params": { "name": "list_withdrawals", "arguments": { "status": "pending" } } }'
```

A tool answers the same JSON as its endpoint. An API error comes back as a
tool error with the HTTP status and message, so the agent can explain it.

## Limits

Tool calls count against the Enterprise API's limits (200 requests a minute).
Creator keys (`pk_live_...`) are refused: the creator MCP server is at
`https://www.pocketsflow.com/mcp`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.