- Home
- MCP servers
- Brex
Brex
- javascript
2
GitHub Stars
javascript
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"crazyrabbitltc-mcp-brex-server": {
"command": "claude",
"args": [
"mcp",
"add",
"brex",
"--env",
"BREX_API_KEY=your_key",
"--",
"node",
"build/index.js"
],
"env": {
"BREX_API_KEY": "YOUR_BREX_API_KEY"
}
}
}
}You can run a Brex Model Context Protocol (MCP) server that exposes read-only Brex data with safe projection and batching. It lets you query resources like expenses, budgets, spend limits, budget programs, and transactions through MCP-compatible calls while keeping responses compact and efficient.
How to use
Start by choosing a local or remote MCP client setup. You will run one or more stdio MCP servers that accept a standard set of read-only methods. Your client can request data with pagination, date ranges, filters, and optional nested expansions to retrieve just the fields you need.
Use the provided MCP endpoints to fetch budgets, spend limits, budget programs, expenses, transactions, and card/cash statements. Control payload size with pagination and filtering, and use the expand parameter to include related objects when you need them.
How to install
Prerequisites: you need Node.js and npm installed on your machine.
# Install the Brex MCP package globally
npm install -g mcp-brex
# Add Brex MCP to Claude Code with your API key
claude mcp add brex --env BREX_API_KEY=your_brex_api_key -- npx mcp-brex
Configuration and running tips
You can run the MCP server in different ways depending on your workflow. The following options are demonstrated in setup examples:
# Option 1: run via npx (CLI-driven workflow)
npx mcp-brex
# Option 2: run via a dedicated node script (development flow)
node build/index.js
Note: When you run via a local development flow, ensure you provide the API key as an environment variable BREX_API_KEY.
## Notes and best practices
- Resources support query optimization using `?summary_only=true&fields=...` to reduce payloads. Expenses auto-expand `merchant` and `budget` for readability.
- Use pagination and filtering to keep responses small. Prefer date ranges, small page sizes, and reasonable maximum item limits. Batch large date ranges with windowing (e.g., 7 days) to avoid oversized responses.
## What you can query (high-level)
The MCP server exposes read-only endpoints for Budgets, Spend Limits, Budget Programs, Expenses, Card/ Cash Transactions, Card Statements, and Accounts. You can also match or upload receipts and update expenses if needed.
## Available tools
### get\_budgets
Retrieve a list of budgets with optional pagination and filtering.
### get\_budget
Fetch a single budget by its ID.
### get\_spend\_limits
Obtain all spend limits for the Brex account.
### get\_spend\_limit
Get details of a specific spend limit by ID.
### get\_budget\_programs
List budget programs and their metadata.
### get\_budget\_program
Get details for a single budget program.
### get\_expenses
Retrieve expenses with optional filters, supports single-page or paginated requests.
### get\_all\_expenses
Fetch all expenses with pagination controls across multiple pages.
### get\_all\_card\_expenses
Retrieve all card-related expenses with pagination and filtering.
### get\_expense
Get a single expense by its ID for card expenses.
### get\_card\_expense
Fetch a specific card expense by ID.
### get\_card\_transactions
List card transactions with optional date filters and pagination.
### get\_cash\_transactions
List cash transactions with optional date filters and pagination.
### get\_transactions
Query transactions for a specific account with paging.
### get\_cash\_account\_statements
Retrieve cash account statements for auditing and reconciliation.
### get\_card\_statements\_primary
Access primary card statements for quick review.
### get\_all\_accounts
List all accounts with status filtering and pagination.
### get\_account\_details
Get detailed information for a specific Brex account.
### match\_receipt
Submit a receipt for matching to an expense (write operation).
### upload\_receipt
Upload a receipt image or file and associate it with an expense (write operation).
### update\_expense
Update fields on an existing expense (write operation).