Brex MCP Server
Enables interaction with Brex financial data including expenses, budgets, transactions, and accounts through read-only API access with support for pagination, filtering, and receipt management.
README
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
# 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-brex
Claude 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.js
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_budget - Spend Limits:
get_spend_limits,get_spend_limit - Budget Programs:
get_budget_programs,get_budget_program - Expenses (single page):
get_expenses - Expenses (paginated):
get_all_expenses,get_all_card_expenses - Expense by ID:
get_expense,get_card_expense - Card Statements:
get_card_statements_primary - Transactions:
get_card_transactions,get_cash_transactions(note: no date filter/expand on transactions) - Cash Statements:
get_cash_account_statements - Accounts:
get_all_accounts,get_account_details - Receipts (write):
match_receipt,upload_receipt - Updates (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_days - Status filtering:
statusarray for expenses/transactions - Amount filtering:
min_amount,max_amountfor expenses - Merchant filtering:
merchant_namefor expenses - Expand 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
- Default:
- 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。