A Model Context Protocol (MCP) server for integrating with the Brex API, enabling AI agents to interact with financial data and resources.
This MCP server provides a bridge between AI agents and the Brex financial platform, allowing agents to:
The server implements standardized resource handlers and tools following the MCP specification, enabling secure and efficient access to financial data.
brex://accounts
- List all accountsbrex://accounts/{id}
- Access specific account detailsbrex://expenses
- List all expenses with paginationbrex://expenses/{id}
- Access specific expense detailsbrex://expenses/card
- List all card expensesbrex://expenses/card/{id}
- Access specific card expense detailsNote: Expense resources automatically expand merchant and budget information to display human-readable names instead of IDs.
brex://budgets
- List all budgets with paginationbrex://budgets/{id}
- Access specific budget detailsbrex://spend_limits
- List all spend limitsbrex://spend_limits/{id}
- Access specific spend limit detailsbrex://budget_programs
- List all budget programsbrex://budget_programs/{id}
- Access specific budget program detailsbrex://users/me
- Get current user informationmatch_receipt
- Match a receipt with existing expensesupload_receipt
- Upload a receipt for a specific expenseupdate_expense
- Update details for a card expense (memo, category, etc.)get_all_expenses
- Get all expenses with filtering options and expanded merchant/budget informationget_all_card_expenses
- Get all card expenses with filtering options and expanded merchant/budget informationNote: For security reasons, tools that create, update, or delete budgets, spend limits, and budget programs are not implemented in this version.
git clone https://github.com/dennisonbertram/brex-mcp-server.git
cd brex-mcp-server
npm install
.env
file with your Brex API token:BREX_API_KEY=your_token_here
BREX_API_URL=https://platform.brexapis.com
PORT=3000
NODE_ENV=development
RATE_LIMIT_REQUESTS=1000
RATE_LIMIT_WINDOW_MS=60000
LOG_LEVEL=info
npm run build
To use with Claude Desktop, you need to add the server to Claude's configuration file:
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"brex-server": {
"command": "node",
"args": [\
"/path/to/brex-mcp-server/build/index.js"\
],
"env": {
"BREX_API_KEY": "your_brex_api_key_here",
"BREX_API_URL": "https://platform.brexapis.com",
"PORT": "3000",
"NODE_ENV": "development",
"RATE_LIMIT_REQUESTS": "1000",
"RATE_LIMIT_WINDOW_MS": "60000",
"LOG_LEVEL": "info"
}
}
}
}
Make sure to:
/path/to/brex-mcp-server
with the actual path where you installed the serveryour_brex_api_key_here
with your actual Brex API keyOnly the BREX_API_KEY
and BREX_API_URL
values are required; the other environment variables have sensible defaults but can be customized if needed.
For development with auto-rebuild:
npm run dev
Lint your code:
npm run lint
Run tests:
npm run test
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector for debugging.
This server implements several security measures:
For a detailed implementation plan and status of various features, see documentation/implementation_plan.md
.
This project is licensed under the MIT License - see the LICENSE file for details.
Dennison Bertram - [email protected]