> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Brex in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/brex
Last updated: 2026-11-24

Share Brex with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or API token sign-in, 18 tools (12 read-only).

---

To give your team Brex in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Brex integration in a Metorial portal, and each person signs in to Brex with their own account. Agents can read and manage Brex users, cards, vendors, budgets and spend limits. The integration has 18 tools, 12 read-only, 5 write and 1 destructive, plus 1 trigger.

**What you will learn**

- How an admin shares Brex in a portal and how each person connects
- The 17 OAuth scopes Brex can request, and what each one allows
- How to keep the 12 read-only tools and reject the other 6

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account with Brex for each person who connects
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in methods

| Method | Type | What a person provides |
| --- | --- | --- |
| **OAuth 2.0** (default) | OAuth | Signs in to Brex |
| **API Token** | API token | `token` |

Also available: **OAuth 2.0 (Read Only)**.

The portal and `metorial setup` use **OAuth 2.0** unless someone picks another method.

### OAuth 2.0

People sign in to Brex and approve the scopes you allow. The integration can request:

| Scope | Name | What it allows |
| --- | --- | --- |
| `openid` | OpenID | Required for OAuth authentication |
| `offline_access` | Offline Access | Required for refresh tokens and webhook registration |
| `users` | Users | Full read and write access to user management |
| `users.readonly` | Users (Read) | Read-only access to user data |
| `cards` | Cards | Full read and write access to card management |
| `cards.readonly` | Cards (Read) | Read-only access to card data |
| `locations` | Locations | Manage company locations |
| `departments` | Departments | Manage company departments |
| `vendors` | Vendors | Manage vendors |
| `transfers` | Transfers | Initiate and manage payment transfers |
| `transactions.card.readonly` | Card Transactions | Read-only access to card transaction data |
| `transactions.cash.readonly` | Cash Transactions | Read-only access to cash transaction data |
| `accounts.cash.readonly` | Cash Accounts | Read-only access to cash account data |
| `budgets` | Budgets | Manage budgets and spend limits |
| `expenses.card` | Expenses | Full read and write access to card expenses |
| `expenses.card.readonly` | Expenses (Read) | Read-only access to card expense data |
| `https://onboarding.brexapis.com/referrals` | Referrals | Create and manage referrals |

### API Token

To connect, a person enters:

- `token`: Brex API token generated from the Developer page in your Brex account dashboard

## Use your own Brex OAuth app

With your own OAuth app, people see your company's name on the Brex consent screen, and the client ID and secret belong to you.

1. **Start the credentials in Metorial**

   In the dashboard, select **Settings**, then **Organization Settings**. Under **Integrations and MCP**, select **Provider Auth**, then **Create Auth Credentials**. Choose Brex and copy the **Redirect URI**.

2. **Register the app with Brex**

   Create an OAuth app or client in Brex and add the redirect URI from Metorial as its redirect or callback URL. The vendor documents this in [OAuth documentation](https://developer.brex.com/guides/partner_authentication).

3. **Finish in Metorial**

   Copy the app's client ID and client secret. Back in Metorial, enter a **Name**, the **Client ID** and the **Client Secret**, review **Scopes**, and select **Create**. Then pick these credentials for the Brex integration.

## Admin: share Brex in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose Brex. Under **Auth Method**, keep **OAuth 2.0** or pick another. For how members connect, choose **Each person connects**, so everyone signs in to Brex as themselves.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from Brex.

4. **Choose who gets it**

   Add the access groups that should see Brex. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user Brex integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search brex
```

## Employee: connect Brex

### In the portal

1. **Open Brex in the catalog**

   Sign in to your portal and open Brex. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. A Brex sign-in tab opens. Sign in and approve the permissions listed.

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search brex
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. `metorial setup` uses **OAuth 2.0**. To connect with **API Token** instead, find its ID with `metorial catalog get <catalog-item-id>` and add `--auth-method <auth-method-id>`.

### Add it to your AI client

`metorial install` adds your Brex connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list brex
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Open the integration's **Tool Filters** and set the write and destructive groups to **Reject**. Agents keep the 12 read-only tools, such as `list_cards` and `list_users`, and lose the 5 write tools, such as `manage_card` or `manage_user`, and the destructive tool `create_transfer`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list brex
metorial tools <integration-id>
metorial call <integration-id> list_transactions -d '{"source":"card"}'
```

`metorial tools` lists the 18 tools, minus any you rejected. `list_transactions` needs `source`, so replace the placeholders. It lists settled transactions from Brex card or cash accounts.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (12)

- `list_transfers`: List payment transfers (ACH, wire, check) from your Brex cash accounts.
- `list_users`: List users in your Brex account.
- `list_vendors`: List vendors in your Brex account.
- `list_expenses`: List card expenses in your Brex account.
- `list_budgets`: List budgets or spend limits in your Brex account.
- `list_cards`: List cards in your Brex account.
- `list_accounts`: List Brex card and cash accounts.
- `list_transactions`: List settled transactions from Brex card or cash accounts. Needs `source`.
- `list_departments_locations`: List departments and/or locations in your Brex account.
- `download_expense_receipt`: Download an exact receipt file for an expense.
- `get_current_user`: Get the actual user associated with the Brex token.
- `get_resource`: Read an exact user, card, vendor, transfer, budget, spend limit or cash account.

### Write tools (5)

- `update_expense`: Update a card expense in Brex. Needs `expenseId`.
- `manage_vendor`: Create, update, or delete a vendor in Brex.
- `manage_user`: Invite a new user or update an existing user in Brex.
- `manage_card`: Create a new virtual or physical card, or update an existing card's settings.
- `manage_budget`: Create, update, or archive a budget in Brex.

### Destructive tools (1)

- `create_transfer`: Initiate a vendor payment transfer from a Brex cash account. Needs `amount`, `counterpartyType`, `paymentInstrumentId` and `description`.

## Triggers

Brex has 1 trigger, which fire on events in Brex:

- `brex_events`: Receives real-time webhook notifications from Brex for expense payments, transfers, user updates, referrals, and accounting records.

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Brex there
- [Create custom OAuth credentials](https://metorial.com/docs/platform/integrations/create-custom-oauth-credentials): the Provider Auth screens in more detail
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Brex on metorial.com](https://metorial.com/integrations/brex): the integration overview