---
title: "OpenAI AgentKit: Connect Your Bank via MCP | BankBridge"
description: "Give your OpenAI AgentKit agents live bank data. One URL plus a header in MCPServerStreamableHttp, and they can total last month's spending."
url: "https://bankbridge.money/docs/agentkit"
---
[← All integrations](https://bankbridge.money/docs)

OpenAI AgentKit

# MCPServerStreamableHttp.

The OpenAI Agents SDK has first-class MCP support. Agent Builder’s visual flow also exposes an MCP node. Both paths take the same URL + header combo.

Step 01

## Pass BankBridge to your agent.

TypeScript (openai-agents SDK)

```
import { Agent, MCPServerStreamableHttp } from "openai-agents";

const bankbridge = new MCPServerStreamableHttp({
  url: "https://bankbridge.money/api/mcp",
  headers: {
    Authorization: `Bearer ${process.env.BANKBRIDGE_API_KEY}`,
  },
});

const agent = new Agent({
  model: "gpt-4.1",
  mcpServers: [bankbridge],
});

const result = await agent.run("How is my spending trending?");

// export BANKBRIDGE_API_KEY="bbk_your_api_key_here"
```

Step 02

## Or in the visual Agent Builder.

Drag an **MCP** node onto the canvas. Set URL to `https://bankbridge.money/api/mcp`. In the auth panel, add a custom header `Authorization` with value `Bearer bbk_your_api_key_here`. Save.

Step 03

## Verify it works.

Run your agent. Expected tool call:

expected

```
get_spending_summary({ group_by: "month", start_date: "2025-11-01", end_date: "2026-04-30" })
```

Where do I get a token?

Grab one from [your dashboard](https://bankbridge.money/dashboard) . It starts with `bbk_`. Store it in a secret manager (Vercel/Fly env vars, AWS Secrets Manager, etc.), never in your client bundle. Requires an active BankBridge subscription.

Troubleshooting

401 Unauthorized on every call.

The API key is missing, typo'd, or got revoked. Check the Authorization header starts with \`Bearer \` (note the space) and ends in a key you still own.

**Fix:** Paste a fresh key from [Settings](https://bankbridge.money/dashboard/settings).

Tools return setup\_required.

Your BankBridge account has no active subscription yet, or it was canceled or is past due. The connection itself works; each tool answers with the link that finishes setup.

**Fix:** Visit [Settings](https://bankbridge.money/dashboard/settings) to start or restore your subscription, then connect a bank.

Tools return a NO\_CONNECTIONS warning.

You haven't linked a bank yet.

**Fix:** Visit [Connect a bank](https://bankbridge.money/dashboard/connect) . The bank-connect flow opens automatically, ~30 seconds.

Problems? Email [hello@bankbridge.money](mailto:hello@bankbridge.money).
