The Brex MCP Server provides a bridge between AI agents and the Brex financial platform, allowing access to financial data like accounts, expenses, and budgets through the Model Context Protocol (MCP). This server enables AI models to securely retrieve and interact with your Brex financial information.
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, add the server to Claude's configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
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 pathyour_brex_api_key_here
with your Brex API keybrex://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 detailsbrex://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 optionsget_all_card_expenses
- Get all card expenses with filtering optionsTo access account information, you can ask Claude to retrieve data from the brex://accounts
resource.
To view recent expenses, ask Claude to access brex://expenses
with appropriate pagination parameters.
To upload a receipt for an expense, use the upload_receipt
tool and provide the expense ID and receipt image.
To update an expense memo or category, use the update_expense
tool with the appropriate parameters.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.