Brex MCP server

Provides secure access to Brex financial platform data, enabling account information retrieval, transaction analysis, and budget monitoring through read-only operations with proper rate limiting.
Back to servers
Provider
Dennison Bertram
Release date
Mar 21, 2025
Language
TypeScript
Stats
2 stars

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.

Installation

Prerequisites

  • Node.js v18 or higher
  • Brex API access token

Setup

  1. Clone the repository:
git clone https://github.com/dennisonbertram/brex-mcp-server.git
cd brex-mcp-server
  1. Install dependencies:
npm install
  1. Create a .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
  1. Build the server:
npm run build

Configuration with Claude

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

  1. Open Claude for Desktop and go to settings
  2. Click on "Developer" in the sidebar, then "Edit Config"
  3. Update the configuration file:
{
  "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:

  • Replace /path/to/brex-mcp-server with the actual path
  • Replace your_brex_api_key_here with your Brex API key
  • Use absolute paths for the server location
  1. Save the file and restart Claude for Desktop
  2. Verify the server is working by checking for the hammer icon in the bottom right of the input box

Available Resources

Account Resources

  • brex://accounts - List all accounts
  • brex://accounts/{id} - Access specific account details

Expense Resources

  • brex://expenses - List all expenses with pagination
  • brex://expenses/{id} - Access specific expense details
  • brex://expenses/card - List all card expenses
  • brex://expenses/card/{id} - Access specific card expense details

Budget Resources

  • brex://budgets - List all budgets with pagination
  • brex://budgets/{id} - Access specific budget details
  • brex://spend_limits - List all spend limits
  • brex://spend_limits/{id} - Access specific spend limit details
  • brex://budget_programs - List all budget programs
  • brex://budget_programs/{id} - Access specific budget program details

Team Resources

  • brex://users/me - Get current user information

Available Tools

Receipt Management

  • match_receipt - Match a receipt with existing expenses
  • upload_receipt - Upload a receipt for a specific expense

Expense Management

  • update_expense - Update details for a card expense (memo, category, etc.)
  • get_all_expenses - Get all expenses with filtering options
  • get_all_card_expenses - Get all card expenses with filtering options

Usage Examples

Retrieving Account Information

To access account information, you can ask Claude to retrieve data from the brex://accounts resource.

Managing Expenses

To view recent expenses, ask Claude to access brex://expenses with appropriate pagination parameters.

Working with Receipts

To upload a receipt for an expense, use the upload_receipt tool and provide the expense ID and receipt image.

Updating Expense Details

To update an expense memo or category, use the update_expense tool with the appropriate parameters.

How to add this MCP server to Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later