Connect Brex to Claude Code
Read expenses, card and cash transactions, cards, users, departments, budgets and spend limits. Add Toolspoke to Claude Code once and it can use 20 Brex actions. Your Brex credential stays in Toolspoke, and you choose which actions Claude Code may call.
Set it up in Claude Code
Three steps, the first one once for every toolkit you will ever add.
Add Toolspoke to Claude Code
Run it in your project, then /mcp to sign in
claude mcp add --transport http toolspoke https://toolspoke.com/mcpThe sign-in opens in your browser, and Toolspoke asks you to approve it.
Install Brex and connect it
Add Brex to a project in your Toolspoke workspace.
User token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- User token
- Brex → Settings → Developer → Create token (an account admin or card admin must have accepted the Developer API agreement first). Grant the read-only scopes for Expenses, Transactions, Team and Budgets; add the Cards write scope only if lock_card, unlock_card or terminate_card should work, and Expenses write for update_expense_memo.
Choose what Claude Code may do
All 20 actions start on. Switch off any of the 4 actions that change something in Brex, and Claude Code gets a refusal if it tries.
What you can ask Claude Code for
A few of the Brex actions that only read, so they are safe to try first.
- Retrieve the Brex company, legal name, mailing address and account type
- Retrieve the Brex user this token belongs to
- List the company's Brex users with their department, location, manager and status
- Retrieve one Brex user by id
What Claude Code can do in Brex
16 actions read, 3 write and one deletes or permanently changes something.
Reads
Get company
Retrieve the Brex company, legal name, mailing address and account type.
Get me
Retrieve the Brex user this token belongs to.
List users
List the company's Brex users with their department, location, manager and status. name does a fuzzy match on first name, last name and email.
Get user
Retrieve one Brex user by id.
List departments
List the company's departments, optionally filtered by name.
List locations
List the company's locations, optionally filtered by name.
List expenses
List expenses of every type, card, bill pay and reimbursement, with their status, amount, merchant, memo and receipt compliance. Narrow by purchase date and status first; Brex caps a page at 100. Pass expand (e.g. merchant, user, department) to inline related records instead of ids.
Get expense
Retrieve one expense by id, of any type.
List card transactions
List settled card transactions across all card accounts, newest first. Use posted_at_start to bound the window.
List card accounts
List the company's card accounts with current balance, available balance, limit and the current statement period.
List cash accounts
List the company's Brex business (cash) accounts with their balances. Account and routing numbers are masked in the audit log.
List cash transactions
List the transactions on one Brex business (cash) account.
List cards
List cards, optionally only one user's, with status, limit type, spend controls and last four digits. The card number itself is never returned here.
Get card
Retrieve one card by id, with its owner, status and spend controls.
List budgets
List the company's budgets with their owners, periods and amounts.
List spend limits
List spend limits, optionally only those a given user is a member of, with their amounts, periods and policies.
Writes
Update expense memo
Set the memo on a card expense. A write rather than destructive: it changes the expense's description only, and the memo can be set again. Admins and bookkeepers can update any expense; other users only their own.
Lock card
Lock a card so it declines new purchases. A write rather than destructive: unlock_card reverses it. Brex requires a reason.
Unlock card
Unlock a card that lock_card locked, so it can be used again.
Deletes or permanently changes
Terminate card
Terminate a card permanently. Destructive because it cannot be undone: a terminated card can never be unlocked, and its holder needs a new card. Use lock_card for anything temporary.
Brex in Claude Code: questions
Does Claude Code see my Brex credential?
No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.
Can I stop Claude Code from changing things in Brex?
Yes. Each of the 20 actions can be switched off for a project. Turn off the 4 that change something and Claude Code can only read.
Will 20 actions crowd Claude Code's context?
No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Brex action it needs when it needs it. Adding more toolkits does not add more tools to its list.
Can I add it once for every project?
Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.
What does it cost?
Tool calls are free on every plan, and a Brex call does not run in a sandbox, so it bills nothing.
Brex in your other apps
Try Brex in Claude Code
Free to start, and tool calls cost nothing on any plan.