MetorialDocs

Set up Brex in Metorial for Claude, ChatGPT and Cursor

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'll 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

Sign-in methods

MethodTypeWhat a person provides
OAuth 2.0 (default)OAuthSigns in to Brex
API TokenAPI tokentoken

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:

ScopeNameWhat it allows
openidOpenIDRequired for OAuth authentication
offline_accessOffline AccessRequired for refresh tokens and webhook registration
usersUsersFull read and write access to user management
users.readonlyUsers (Read)Read-only access to user data
cardsCardsFull read and write access to card management
cards.readonlyCards (Read)Read-only access to card data
locationsLocationsManage company locations
departmentsDepartmentsManage company departments
vendorsVendorsManage vendors
transfersTransfersInitiate and manage payment transfers
transactions.card.readonlyCard TransactionsRead-only access to card transaction data
transactions.cash.readonlyCash TransactionsRead-only access to cash transaction data
accounts.cash.readonlyCash AccountsRead-only access to cash account data
budgetsBudgetsManage budgets and spend limits
expenses.cardExpensesFull read and write access to card expenses
expenses.card.readonlyExpenses (Read)Read-only access to card expense data
https://onboarding.brexapis.com/referralsReferralsCreate 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.

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.

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.

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

Open Shared Resources

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

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.

Limit the tools

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

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:

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

Employee: connect Brex

In the portal

Open Brex in the catalog

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

Authenticate

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

Confirm

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

With the CLI

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.

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.

Check it worked

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