Brex
STDIO用于Brex API集成的MCP服务器,使AI代理能操作财务数据
用于Brex API集成的MCP服务器,使AI代理能操作财务数据
A Model Context Protocol (MCP) server for the Brex API. Optimized for safe, small, read-only responses with projection and batching.
# 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
Add to your claude_desktop_config.json:
{ "mcpServers": { "brex": { "command": "npx", "args": ["mcp-brex"], "env": { "BREX_API_KEY": "your_brex_api_key" } } } }
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
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:
?summary_only=true&fields=id,status,... to control payload size.merchant and budget for readability.get_budgets, get_budgetget_spend_limits, get_spend_limitget_budget_programs, get_budget_programget_expensesget_all_expenses, get_all_card_expensesget_expense, get_card_expenseget_card_statements_primaryget_card_transactions, get_cash_transactionsget_cash_account_statementsget_all_accounts, get_account_detailsmatch_receipt, upload_receiptupdate_expenseAlways send parameters under arguments (not input). Keep payloads small with pagination and filtering.
Common parameters:
page_size (<=50), max_items (<=200 recommended)start_date, end_date, window_daysstatus array for expenses/transactionsmin_amount, max_amount for expensesmerchant_name for expensesexpand array 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, "posted_at_start": "2025-08-25T00:00:00Z" } }
{ "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"] } }
IMPORTANT: Use pagination, filtering, and sorting to control response sizes instead of relying on summaries.
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 expensesexpand parameter:
expand: [] returns lean objects (~500-1000 tokens each)expand: ["merchant", "budget"] returns full objects (~15K+ tokens each)merchant, budget, user, department, location, receiptsOnly build/, README.md, and LICENSE are published.
MIT — see LICENSE.