Brex MCP Server
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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Brex MCP Server show me my approved expenses from last week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: Monarch Money MCP Server
Installation
Claude Code
# Install the package
npm install -g mcp-brex
# Add to Claude Code with your API key
claude mcp add brex --env BREX_API_KEY=your_brex_api_key -- npx mcp-brexClaude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"brex": {
"command": "npx",
"args": ["mcp-brex"],
"env": {
"BREX_API_KEY": "your_brex_api_key"
}
}
}
}Manual Setup (Development)
git clone https://github.com/dennisonbertram/mcp-brex.git
cd mcp-brex
npm install
npm run build
claude mcp add brex --env BREX_API_KEY=your_key -- node build/index.jsResources
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:
{
"name": "get_all_card_expenses",
"arguments": {
"page_size": 10,
"max_items": 20,
"start_date": "2025-08-25T00:00:00Z",
"end_date": "2025-08-26T00:00:00Z",
"status": ["APPROVED"],
"min_amount": 100
}
}{
"name": "get_expenses",
"arguments": {
"limit": 5,
"status": "APPROVED"
}
}{
"name": "get_card_transactions",
"arguments": {
"limit": 10,
"summary_only": true,
"fields": ["id", "posted_at", "amount.amount", "amount.currency", "merchant.raw_descriptor"]
}
}{
"name": "get_all_accounts",
"arguments": {
"page_size": 10,
"max_items": 20,
"status": "ACTIVE"
}
}{
"name": "get_transactions",
"arguments": {
"accountId": "acc_123456789",
"limit": 10
}
}{
"name": "get_expenses",
"arguments": {
"limit": 5,
"expand": ["merchant", "user"]
}
}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):
{
"purchased_amount": {
"amount_cents": 100000,
"amount_dollars": 1000.0,
"amount_formatted": "$1,000.00",
"currency": "USD"
}
}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.
Available Tools
21 toolsget_account_detailsA
Retrieve detailed information for a specific Brex account by account ID. Returns complete account details including current balance, available balance, type, currency, and status.
Inputs: accountId (required).
get_all_accountsA
Fetch all Brex accounts (card and cash) with automatic pagination. Supports status filtering. Returns account details including balances, type, currency, and status. Includes money annotation on balance fields.
Inputs: page_size, max_items, status.
get_all_card_expensesB
Fetch all card expenses across multiple pages (similar to get_all_expenses but card-specific endpoint). Supports pagination, date filtering, merchant search, and amount filters. Returns complete expense objects with money annotation and summaries.
Inputs: page_size, max_items, status, payment_status, +7 more.
get_all_expensesA
Fetch all expenses across multiple pages with automatic pagination handling. Supports date range filtering, amount filtering, status filtering, and merchant search. Returns aggregated results with summary statistics. Use window_days to batch large date ranges.
Inputs: page_size, max_items, expense_type, status, +7 more.
get_budgetA
Retrieve a single budget by its unique ID. Returns complete budget details including spending limits, period configuration, and current status.
Inputs: budget_id (required).
get_budget_programA
Retrieve a single budget program by its unique ID. Returns complete program configuration including budget blueprints, employee filters, and automation settings.
Inputs: id (required).
get_budget_programsB
List budget program configurations that define automated budget assignment rules. Supports filtering by status and pagination. Returns program details including budget blueprints and employee filters.
Inputs: cursor, limit, budget_program_status.
get_budgetsA
List budget allocations with spending limits and current status. Supports filtering by parent budget and status. Returns paginated budget list with amount details (amount, period, recurrence, limit type).
Inputs: cursor, limit, parent_budget_id, spend_budget_status.
get_card_expenseA
Retrieve a single card expense by its unique ID. Supports expansion of nested objects. Returns complete card expense details with money annotation. (Deprecated - use get_expense instead)
Inputs: expense_id (required), expand.
get_card_statements_primaryA
List all finalized statements for the primary card account. Supports cursor-based pagination. Returns complete statement objects with period dates, balances, and payment information.
Inputs: cursor, limit.
get_card_transactionsA
List settled transactions for all card accounts (primary card endpoint). Supports pagination and user filtering. NOTE: Does not support posted_at_start or expand parameters - filter client-side by posted_at_date if needed. Returns transactions with money annotation.
Inputs: cursor, limit, user_ids.
get_cash_account_statementsA
List finalized statements for a specific cash account by account ID. Requires cash account scopes. Supports cursor-based pagination. Returns complete statement objects with period details and transaction summaries.
Inputs: account_id (required), cursor, limit.
get_cash_transactionsA
List settled transactions for a specific cash account. Requires cash account scopes. Supports pagination. NOTE: Does not support posted_at_start or expand parameters - filter client-side by posted_at_date if needed. Returns transactions with money annotation.
Inputs: account_id (required), cursor, limit.
get_expenseA
Retrieve a single expense by its unique ID. Supports expansion of nested objects (merchant, budget, user, department, location, receipts). Returns complete expense details with money annotation.
Inputs: expense_id (required), expand.
get_expensesB
Retrieve a paginated list of expenses with optional filters for status, type, and amount. Supports expansion of related objects like merchant and budget details. Returns expenses with automatic money annotation (cents, dollars, formatted).
Inputs: expense_type, status, payment_status, limit, +1 more.
get_spend_limitA
Retrieve a single spend limit by its unique ID. Returns complete spend limit configuration including authorization settings, period recurrence, merchant controls, and current balance.
Inputs: id (required).
get_spend_limitsA
List spend limit policies with authorization settings and spending controls. Supports filtering by member user and pagination. Returns detailed limit configurations including base limits, buffer percentages, and merchant category controls.
Inputs: cursor, limit, member_user_id, parent_budget_id, +1 more.
get_transactionsC
Retrieve transactions for a specific Brex account by account ID. Legacy endpoint for general transaction retrieval. Returns transaction list with money annotation.
Inputs: accountId (required), limit.
match_receiptA
Create a pre-signed S3 URL for uploading a receipt that will be automatically matched with existing expenses. Returns upload URL and receipt matching details. Receipt matching expires after 30 minutes. NOTE: This is a write operation.
Inputs: receipt_name (required), receipt_type, notify_email.
update_expenseA
Update metadata for an existing card expense (memo, category, budget, department, location, custom fields). Returns updated expense object. NOTE: This is a write operation - use cautiously.
Inputs: expense_id (required), memo, category, budget_id, +3 more.
upload_receiptA
Upload a receipt image (base64-encoded) to a specific card expense. Creates a pre-signed S3 URL, uploads the receipt, and associates it with the expense. Returns upload confirmation. NOTE: This is a write operation.
Inputs: receipt_data (required), receipt_name (required), content_type (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
There is significant overlap between tools, such as get_all_expenses and get_all_card_expenses, get_expense and get_card_expense, and multiple transaction retrieval tools (get_card_transactions, get_cash_transactions, get_transactions), which could confuse agents about which to use. However, descriptions clarify some distinctions, like card-specific vs. general endpoints, preventing complete ambiguity.
Tool names follow a highly consistent verb_noun pattern throughout, with all tools using snake_case and clear prefixes like 'get_', 'match_', 'update_', and 'upload_'. This predictability makes it easy for agents to infer functionality from names alone.
With 21 tools, the count is borderline high for a financial management server, potentially overwhelming agents. While Brex's domain (accounts, expenses, budgets, transactions) is broad, the tool set feels heavy, suggesting some consolidation might improve usability without sacrificing coverage.
The server provides comprehensive coverage for Brex's financial operations, including CRUD-like actions for accounts, expenses, budgets, and transactions, plus utilities like receipt matching and uploading. Minor gaps exist, such as no explicit tools for creating or deleting budgets or accounts, but agents can likely work around these with available read and update operations.
Related MCP Connectors
Read-only personal finance for AI agents: budgets, receipts, net worth, bills. OAuth 2.1.
Read-only access to your Finch finances: accounts, transactions, spending, net worth, goals.
Read-only access to your bank, investment, and crypto accounts: balances, transactions, holdings.
Read-only access to your own bank, card and brokerage accounts for Claude, ChatGPT and other AI agents: balances, transactions, spending, subscriptions, cashflow and investment holdings. It can never move money.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceEnables AI agents to interact with the Brex financial platform, allowing access to account information, transactions, expenses, receipts, budgets, and spend limits through the Brex API.92 npm-
- AlicenseNot gradedqualityDmaintenanceProvides read-only access to Monarch Money financial data, enabling AI assistants to analyze transactions, budgets, and cashflow.4MIT
- AlicenseAqualityBmaintenanceEnables interaction with the Bokio accounting API for managing journal entries, invoices, customers, items, and more, with read-only mode by default for safety.3788 npm2MIT
- AlicenseNot gradedqualityDmaintenanceProxies requests to a personal expense tracker API using an API key, enabling AI-driven financial management like viewing transactions and budgets.ISC