mcpField
B
Brex MCP Server

Brex MCP Server

Local
github.com/crazyrabbitLTCFinance4Updated 61w ago

About Brex MCP Server

Brex MCP Server connects MCP clients to Brex expense and finance data through read-focused tools and resources, with selected receipt and expense write operations. It supports projection, filtering, and pagination to keep responses controlled.

Key features

  1. 01Read budgets and spend limits
  2. 02Query expenses and transactions
  3. 03Access accounts and statements
  4. 04Match and upload receipts
  5. 05Update expenses
  6. 06Filter, project, and paginate data

Use cases

  1. 01Review expenses by date or status
  2. 02Retrieve budget and spend-limit details
  3. 03Inspect card and cash transactions
  4. 04Match receipts or update expenses

MCP support

Exposes Brex resources for expenses, budgets, spend limits, programs, and transactions, alongside tools for querying and selected write operations. MCP clients can filter, paginate, and limit returned fields.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"brex-server": {
"command": "npx",
"args": [
"-y",
"mcp-brex"
],
"env": {
"BREX_API_KEY": "<BREX_API_KEY>"
}
}
}
}
Run commandnpx -y mcp-brex
Environment variables to set
BREX_API_KEYSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmmcp-brex

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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.

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 merchant and budget for 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
  • 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: status array for expenses/transactions
  • Amount filtering: min_amount, max_amount for expenses
  • Merchant filtering: merchant_name for expenses
  • Expand control: expand 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"]
  }
}

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 filtering
  • window_days: number — Split large date ranges into smaller batches
  • status: 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 expand parameter:
    • 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

Publishing

Only build/, README.md, and LICENSE are published.

License

MIT — see LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.