# Agentic Treasury

Automate money movement with AI-powered agents.

Install Stripe’s [Model Context Protocol](https://docs.stripe.com/mcp.md) server so your AI agent can automate tasks across your financial account. After you connect Stripe’s MCP server, you can retrieve your Stripe balance or analyze your financial data directly in chatbots such as Claude or ChatGPT. To learn where this 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://docs.cursor.com/context/model-context-protocol).

```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, authenticate Stripe with OAuth.

```bash
claude /mcp
```

To authenticate with a restricted API key instead of OAuth, use the `--header` option:

```bash
claude mcp add --transport http stripe https://mcp.stripe.com/ --header 'Authorization: Bearer <<YOUR_SECRET_KEY>>'
```

For more information, see [Claude Code MCP documentation](https://docs.anthropic.com/en/docs/claude-code/mcp#configure-mcp-servers).

#### ChatGPT and Codex

### ChatGPT

With a ChatGPT Plus, Pro, Business, Enterprise, or Education account, you can [install the Stripe plugin in ChatGPT](https://chatgpt.com/plugins/plugin_connector_690ab09fa43c8191bca40280e4563238).

### Codex CLI

To use the Stripe MCP server with the Codex CLI, add it to your `~/.codex/config.toml` file. To learn more, see the OpenAI [Codex MCP documentation](https://learn.chatgpt.com/docs/extend/mcp).

```toml
[mcp_servers.stripe]
url = "https://mcp.stripe.com"
```

After you add the server, authenticate Stripe with OAuth.

```bash
codex mcp login stripe
```

To authenticate with a restricted API key instead of OAuth, set `bearer_token_env_var` to the name of an environment variable that holds your key. In this example, `STRIPE_API_KEY` is a placeholder, replace it with the actual name of your environment variable.

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

#### Other

### Install in 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/copilot/chat/mcp-servers) for more information.

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

### Install from another MCP client

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 a [restricted API key](https://docs.stripe.com/keys/restricted-api-keys.md) 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 <restricted_api_key>"
   }
 }
}
```

## Manage MCP access and sessions 

Stripe’s MCP server uses OAuth to authorize clients according to the [MCP specification](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization#2-1-1-oauth-grant-types). OAuth lets you grant and revoke access without sharing an API key with the client.

When you connect an MCP client, it opens Stripe’s OAuth consent page. Use this page to authorize the client to access your Stripe data. After you authorize an MCP client with OAuth, you can manage its session in the Stripe Dashboard.

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 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 and OAuth sessions. 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.

### Manage MCP access 

Administrators can [manage MCP access](https://dashboard.stripe.com/settings/mcp) in the Dashboard. Configure access separately for live mode and sandbox environments.

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

## Request access to private preview features 

You can extend the Stripe MCP server with more Treasury tools that let your AI agent move money, pay bills, and create and manage cards.

### Interested in agentic finance with Treasury?

Enter your email to request access.

```bash
curl https://docs.stripe.com/preview/register \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Referer: https://docs.stripe.com/treasury/agents" \
  -d '{"email": "EMAIL", "preview": "agentic_treasury_preview"}'
```
