# Treasury for agents

Automate financial operations with AI agents.

Install Stripe’s [Model Context Protocol](https://docs.stripe.com/mcp.md) server to automate everyday financial tasks with AI agents. Ask your agent to analyze your data, set up recipients, transfer funds—all while approving sensitive money movement actions. To learn where Treasury is available, see [Availability](https://stripe.com/money-management/availability#explore).

If your MCP client doesn’t support [agent plugins](https://docs.stripe.com/agents/plugin.md) for Stripe, or you prefer to configure the Stripe MCP server and install the skills manually, follow these instructions:

#### Cursor

[Install in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=stripe&config=eyJ1cmwiOiJodHRwczovL21jcC5zdHJpcGUuY29tIn0%3D)

Select **Install in Cursor** to open Cursor and add the Stripe MCP server. To configure it manually, add the following configuration to `~/.cursor/mcp.json`.

For more information, see [Cursor’s MCP documentation](https://cursor.com/docs/mcp).

```json
{
 "mcpServers": {
   "stripe": {
     "url": "https://mcp.stripe.com"
   }
 }
}
```

#### Claude Code

Run the following command to add the Stripe MCP server to Claude Code:

```bash
claude mcp add --transport http stripe https://mcp.stripe.com/
```

After you add the server, start Claude Code and run the `/mcp` command to authenticate Stripe with OAuth.

To authenticate with an [agent API key](https://docs.stripe.com/keys.md#agent-keys) instead of OAuth, add the server to your project’s `.mcp.json` file and reference an environment variable that holds your agent API key, rather than passing the key on the command line. In this example, `${AGENT_API_KEY}` is a placeholder; replace `AGENT_API_KEY` with the actual name of your environment variable, and set that environment variable in your shell before running Claude Code.

```json
{
  "mcpServers": {
    "stripe": {
      "type": "http",
      "url": "https://mcp.stripe.com",
      "headers": {
        "Authorization": "Bearer ${AGENT_API_KEY}"
      }
    }
  }
}
```

For more information, see the [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp).

#### Claude Desktop

You can [install the official Stripe connector in Claude](https://claude.ai/directory/de127013-63f1-43d0-8dd2-b6cb5b4e5d1b) on the web and in Claude Desktop.

1. Select **Connect to Claude** and add the connector to your account or workspace.
2. Sign in to your Stripe account and grant permissions to Claude using the OAuth window when prompted.
3. In a conversation, select the plus icon, select **Connectors**, and enable Stripe.

For Team and Enterprise accounts, an owner must add the connector to the workspace before members can connect their Stripe accounts.

#### Codex

Run the following command to add the Stripe MCP server to Codex:

```bash
codex mcp add stripe --url https://mcp.stripe.com
```

The ChatGPT desktop app, Codex CLI, and Codex IDE extension support MCP servers and share the same configuration on your computer. To learn more, see the OpenAI [Codex MCP documentation](https://learn.chatgpt.com/docs/extend/mcp).

After you authenticate, you can switch between the ChatGPT desktop app, Codex CLI, and Codex IDE extension without configuring the Stripe MCP server again.

To authenticate with an [agent API key](https://docs.stripe.com/keys.md#agent-keys) instead of OAuth, set `bearer_token_env_var` to the name of an environment variable that holds your agent API key. In this example, `AGENT_API_KEY` is a placeholder; replace it with the actual name of your environment variable, not the name of the variable wrapped in braces.

```toml
[mcp_servers.stripe]
url = "https://mcp.stripe.com"
bearer_token_env_var = "AGENT_API_KEY" # Replace with the name of your environment variable
```

#### ChatGPT

You can [install the official Stripe plugin in ChatGPT](https://chatgpt.com/plugins/plugin_connector_690ab09fa43c8191bca40280e4563238). Connect your Stripe account and grant permissions to ChatGPT in the OAuth window when prompted.

To learn more, see the OpenAI [MCP documentation](https://learn.chatgpt.com/docs/extend/mcp).

#### VS Code

[Install in VS Code](https://vscode.dev/redirect/mcp/install?name=stripe&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.stripe.com%22%7D)

Select **Install in VS Code** to open VS Code and add the Stripe MCP server. To configure it manually, add the following configuration to `.vscode/mcp.json` in your workspace.

See the [VS Code MCP documentation](https://code.visualstudio.com/docs/agent-customization/mcp-servers) for more information.

```json
{
 "servers": {
   "stripe": {
     "type": "http",
     "url": "https://mcp.stripe.com"
   }
 }
}
```

#### Other

MCP is an open protocol supported by many clients. Follow your client’s MCP setup instructions and use `https://mcp.stripe.com` as the server URL.

Use OAuth when your client supports it. If your client doesn’t support OAuth, use an [agent API key](https://docs.stripe.com/keys.md#agent-keys) as a bearer token in the `Authorization` header. For example, if your client accepts a `headers` property, use the following configuration:

```json
{
 "stripe": {
   "url": "https://mcp.stripe.com",
   "headers": {
     "Authorization": "Bearer {{AGENT_API_KEY}}"
   }
 }
}
```

## Manage MCP access and sessions 

Stripe’s MCP server supports two authentication methods:

1. **OAuth**: Use OAuth when a client accesses Stripe on behalf of your Stripe user account.
2. **Agent API keys**: Use an [agent API key](https://docs.stripe.com/keys.md#agent-keys) when an AI application needs independent, persistent access to Stripe.

When you connect an MCP client with OAuth, the client opens Stripe’s OAuth consent page. You can grant access to one or more live mode accounts or sandboxes and set different permissions for each environment. See the [MCP authorization specification](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization) for details.

If your organization manages your device or network, your IT administrator might block connections to external MCP servers. When the Stripe MCP server doesn’t connect in a managed environment, ask your IT department to allow `mcp.stripe.com`.

### Manage MCP access for all team members 

If you’re an administrator, you can [enable or disable MCP access](https://dashboard.stripe.com/settings/mcp-and-cli-access) for your entire team in the Dashboard. Configure access separately for live mode and sandbox environments.

### Manage your sessions 

Your authorized MCP clients appear under **OAuth sessions** in your [user settings](https://dashboard.stripe.com/settings/user). To revoke a session:

1. Find the client in the **OAuth sessions** list.
2. Click the overflow menu (⋯).
3. Select **Revoke access**.

### Manage sessions as an administrator 

To view or revoke another user’s sessions, your role must include permissions to manage team members. The **Administrator** role includes these permissions.

1. Open [Team and security](https://dashboard.stripe.com/settings/team) in the Dashboard.
2. Select the team member you want to manage.
3. Find the **OAuth sessions** table.
4. To revoke one session, click its overflow menu and select **Revoke access**. To revoke every listed session, select **Revoke all**.

Session management applies only to the account or organization and environment—live mode or a sandbox—that you’re currently viewing. Revoking a session removes access only within that scope. The session remains active for accounts outside your current scope.

When you view an organization, the **Accounts** column shows the accounts associated with each session.

## Supported tools 

In addition to our [other MCP tools](https://docs.stripe.com/mcp.md#tools), we support the following Treasury-specific tools:

| Tool | Description | Required permissions |
| --- | --- | --- |
| `get_balance_summary` (Public preview) | Displays an interactive balance summary across the Stripe balance and Treasury accounts | - **Balance: Read**
- **Money Management Financial Accounts: Read** |
| `convert_currency` (Private preview) | Converts funds between currencies within a Treasury account | - **Currency Conversions: Write** |
| `send_money` (Private preview) | Sends money from a Treasury account to a recipient | - **Money Management Outbound Payments: Write** |
| `setup_recipient` (Private preview) | Sets up a recipient account for sending money from a Treasury account | - **Recipient Configuration: Write** |
| `transfer_money` (Private preview) | Transfers money between supported Stripe balances | - **Money Management Outbound Transfers: Write**
- **Payouts: Write** |

When setting up Stripe’s MCP server, you can decide what level of permissions to grant your agent for each capability. By default, you need to review and approve any action that your agent takes that results in live money movement.
