Provides read-only access to Brex financial data including expenses, budgets, spend limits, transactions, card statements, and accounts, with tools for receipt management and expense updates. Supports pagination, filtering, and field projection for controlled data retrieval.
Brex MCP Server
A Model Context Protocol (MCP) server for the Brex API. Optimized for safe, small, read-only responses with projection and batching.
What’s New (0.3.2)
Fix: Tools now include a permissive
inputSchemain the tools list so clients like Claude Code properly display and allow calling tools. No behavior changes to handlers.
Installation
Claude Code
Claude Desktop
Add to your claude_desktop_config.json:
Manual Setup (Development)
Resources
brex://expenses|brex://expenses/{id}|brex://expenses/card|brex://expenses/card/{id}brex://budgets|brex://budgets/{id}brex://spend_limits|brex://spend_limits/{id}brex://budget_programs|brex://budget_programs/{id}brex://transactions/card/primary|brex://transactions/cash/{id}brex://docs/usage(compact usage guide for agents)
Notes:
Resources accept
?summary_only=true&fields=id,status,...to control payload size.Expenses resources auto-expand
merchantandbudgetfor readability.
Tools (read-only unless noted)
Budgets:
get_budgets,get_budgetSpend Limits:
get_spend_limits,get_spend_limitBudget Programs:
get_budget_programs,get_budget_programExpenses (single page):
get_expensesExpenses (paginated):
get_all_expenses,get_all_card_expensesExpense by ID:
get_expense,get_card_expenseCard Statements:
get_card_statements_primaryTransactions:
get_card_transactions,get_cash_transactions(note: no date filter/expand on transactions)Cash Statements:
get_cash_account_statementsAccounts:
get_all_accounts,get_account_detailsReceipts (write):
match_receipt,upload_receiptUpdates (write):
update_expense
How to call tools
Always send parameters under arguments (not input). Keep payloads small with pagination and filtering.
Common parameters:
Pagination:
page_size(<=50),max_items(<=200 recommended)Date filtering:
start_date,end_date,window_daysStatus filtering:
statusarray for expenses/transactionsAmount filtering:
min_amount,max_amountfor expensesMerchant filtering:
merchant_namefor expensesExpand control:
expandarray to include nested objects (e.g.,["merchant", "budget"])
Recommended examples:
Pagination and Filtering Best Practices
IMPORTANT: Use pagination, filtering, and sorting to control response sizes instead of relying on summaries.
Key Parameters for Data Control:
page_size: number— Items per page (recommended: ≤50)max_items: number— Maximum total items across all pages (recommended: ≤200)start_date/end_date: string— ISO date range filteringwindow_days: number— Split large date ranges into smaller batchesstatus: string[]— Filter by status (e.g., ["APPROVED", "PENDING"])min_amount/max_amount: number— Amount-based filtering for expenses
Best Practices:
Always use date ranges for bulk requests to avoid huge responses
Use small page sizes (≤50) and reasonable max_items (≤200)
Apply status filters to get only the data you need
Use window_days (e.g., 7) to batch large date ranges
Control nested object expansion with the
expandparameter:Default:
expand: []returns lean objects (~500-1000 tokens each)With expansion:
expand: ["merchant", "budget"]returns full objects (~15K+ tokens each)Available expand options:
merchant,budget,user,department,location,receipts
Test with small limits first before scaling up
Cash endpoints require additional Brex scopes; handle 403s gracefully
Note: Brex transactions endpoints (card and cash) do not support posted_at_start or expand. Retrieve transactions and, if needed, filter client-side by posted_at/posted_at_date.
Money & Units
All amounts from Brex are in cents. This server annotates money fields in tool outputs by default to prevent unit mistakes:
amount_cents: integer (e.g., 100000)
amount_dollars: number in dollars (e.g., 1000.0)
amount_formatted: human-friendly string (e.g., "$1,000.00")
Example (expense purchased_amount):
Controls:
format_amounts:"cents" | "dollars" | "both"(default:"both")include_formatted: boolean (default: true)include_summary: boolean (default: true) addsmeta.summarytotals/averages
Publishing
Only build/, README.md, and LICENSE are published.
License
MIT — see LICENSE.