MCP Hub
Back to servers

PEX MCP Server

Enables AI assistants to interact with the PEX Card External API to manage business accounts, cards, and transactions. It provides 72 tools for retrieving account balances, managing spending rules, and tracking business expenses through natural language.

Stars
1
Updated
Feb 19, 2026

PEX MCP Server

A Model Context Protocol (MCP) server that provides access to the PEX Card External API. Use this server to let AI assistants like Claude interact with your PEX business account, cards, transactions, and more.

Getting Your PEX API Token

To use the PEX MCP Server, you need a PEX API token. Follow these steps to generate one:

  1. Log in to the PEX Dashboard using your credentials.
  2. Navigate to Profile > Authorized Apps (or go directly to /account/authorized-apps).
  3. Find the PEX MCP Server application and click on it.
  4. Click Generate Token and copy the token value.

Note: Keep your API token secure. Do not commit it to version control or share it publicly.

Configuration

Set the following environment variables:

VariableRequiredDescription
PEX_API_URLYesPEX API base URL (e.g., https://coreapi.pexcard.com/v4)
PEX_API_TOKENYesYour PEX API token (see Getting Your PEX API Token)

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "pex": {
      "command": "npx",
      "args": ["-y", "@pexcard_engineering/mcp"],
      "env": {
        "PEX_API_URL": "https://coreapi.pexcard.com/v4",
        "PEX_API_TOKEN": "your-api-token-here"
      }
    }
  }
}

Config file locations

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Usage with Claude Code (CLI)

Add the MCP server using the Claude Code CLI:

claude mcp add pex -e PEX_API_URL=https://coreapi.pexcard.com/v4 -e PEX_API_TOKEN=your-api-token-here -- npx -y @pexcard_engineering/mcp

Or add it manually to your .claude/settings.json:

{
  "mcpServers": {
    "pex": {
      "command": "npx",
      "args": ["-y", "@pexcard_engineering/mcp"],
      "env": {
        "PEX_API_URL": "https://coreapi.pexcard.com/v4",
        "PEX_API_TOKEN": "your-api-token-here"
      }
    }
  }
}

Usage with GitHub Copilot

VS Code

Add the following to your VS Code settings (.vscode/settings.json or user settings):

{
  "github.copilot.chat.mcpServers": {
    "pex": {
      "command": "npx",
      "args": ["-y", "@pexcard_engineering/mcp"],
      "env": {
        "PEX_API_URL": "https://coreapi.pexcard.com/v4",
        "PEX_API_TOKEN": "your-api-token-here"
      }
    }
  }
}

Alternatively, create an .mcp.json file in your project root:

{
  "servers": {
    "pex": {
      "command": "npx",
      "args": ["-y", "@pexcard_engineering/mcp"],
      "env": {
        "PEX_API_URL": "https://coreapi.pexcard.com/v4",
        "PEX_API_TOKEN": "your-api-token-here"
      }
    }
  }
}

Tip: When using .mcp.json, add it to your .gitignore if it contains your actual token, or use environment variable references to keep secrets out of source control.

Available Tools (72 total)

Business (12 tools)

ToolDescription
pex_get_business_profileGet business profile details including name, address, phone, and status
pex_get_business_balanceGet business account balance
pex_get_business_adminsGet list of all business administrators
pex_get_business_adminGet a specific business administrator by ID
pex_get_business_tagsGet all business tags
pex_get_business_tagGet a specific business tag by ID
pex_get_business_linkedGet linked businesses
pex_get_business_bank_accountGet business bank account details
pex_get_business_one_time_transferGet business one-time transfer details
pex_get_business_my_profileGet the current user's business profile
pex_get_business_billingGet business billing information for a specific month
pex_get_business_settingsGet business settings

Cards (7 tools)

ToolDescription
pex_get_cardGet card profile/details by card account ID
pex_get_card_spend_rulesGet spending rules for a specific card
pex_get_card_advanced_spend_rulesGet advanced spending rules for a specific card
pex_get_card_load_limit_remainingGet remaining card load limit for a specific card
pex_get_card_scheduled_funding_rulesGet scheduled funding rules for a specific card
pex_get_card_orderGet a specific card order by ID
pex_get_card_ordersGet card orders within an optional date range

Transactions (10 tools)

ToolDescription
pex_get_business_transactionsGet paginated business transactions with filters
pex_get_business_transactionGet a specific business transaction by ID
pex_get_cardholder_transactionsGet paginated cardholder transactions
pex_get_cardholder_transactionGet a specific cardholder transaction by ID
pex_get_cardholder_purchasesGet paginated cardholder purchases
pex_get_cardholder_purchaseGet a specific cardholder purchase by ID
pex_get_cardholder_declinesGet paginated cardholder declines
pex_get_transaction_attachmentsGet all attachments for a transaction
pex_get_transaction_attachmentGet a specific attachment for a transaction
pex_get_transaction_tagsGet tags for a specific transaction

Account Details (10 tools)

ToolDescription
pex_get_account_detailsGet cardholder account details by ID
pex_get_advanced_account_detailsGet advanced cardholder account details by ID
pex_get_all_account_detailsGet all cardholder account details for the business
pex_get_account_balanceGet account balance for a specific cardholder
pex_get_account_remaining_limitsGet remaining spending limits for a cardholder
pex_get_network_transactionsGet network transactions for the business
pex_get_cardholder_network_transactionsGet network transactions for a specific cardholder
pex_get_transaction_detailGet transaction details for a specific transaction
pex_get_transaction_detailsGet transaction details for the business
pex_get_all_cardholder_transactionsGet all cardholder transactions within a date range

Spending Rulesets (7 tools)

ToolDescription
pex_list_spending_rulesetsGet all spending rulesets for the business
pex_get_spending_rulesetGet a specific spending ruleset by ID
pex_get_spending_ruleset_cardsGet cards assigned to a spending ruleset
pex_list_advanced_spending_rulesetsGet all advanced spending rulesets
pex_get_advanced_spending_rulesetGet a specific advanced spending ruleset by ID
pex_get_advanced_spending_ruleset_cardsGet cards assigned to an advanced spending ruleset
pex_get_mcc_categoriesGet Merchant Category Code (MCC) categories

Bills (4 tools)

ToolDescription
pex_get_billGet bill payment details by bill ID
pex_get_bill_paymentsGet payments for a specific bill
pex_get_bill_payment_requestGet a specific bill payment request by ID
pex_search_billsSearch bills with optional filters

Vendors (3 tools)

ToolDescription
pex_list_vendorsGet paginated list of vendors with filters
pex_get_vendorGet a specific vendor by ID
pex_get_vendor_card_orderGet vendor card order details by order ID

Payments (3 tools)

ToolDescription
pex_get_paymentsGet paginated list of business payments
pex_get_payment_transferGet a specific payment transfer by ID
pex_get_payment_requestGet a specific payment request by ID

Credit & Invoices (4 tools)

ToolDescription
pex_get_credit_linesGet credit line information for the business
pex_get_invoicesGet business invoices starting from a given date
pex_get_invoice_allocationsGet allocations for a specific invoice
pex_get_invoice_paymentsGet payments for a specific invoice

Groups (2 tools)

ToolDescription
pex_list_groupsGet all cardholder groups for the business
pex_get_group_cardholdersGet cardholders belonging to a specific group

Tokens (6 tools)

ToolDescription
pex_get_current_tokenGet details of the current authentication token
pex_list_tokensGet all tokens for the authenticated user
pex_get_auth_tokensGet basic token details for the authenticated user
pex_get_token_provisioning_modeGet the business token provisioning mode
pex_get_cardholder_provisioning_modeGet token provisioning mode for a cardholder
pex_get_issued_tokensGet issued tokens for a specific cardholder

Callbacks (3 tools)

ToolDescription
pex_get_callback_typesGet available callback subscription types
pex_list_callback_subscriptionsGet all callback subscriptions for the business
pex_get_callback_subscriptionGet a specific callback subscription by ID

Partner (1 tool)

ToolDescription
pex_get_partnerGet partner details for the current business

Features

  • Full API Coverage: 72 tools covering all GET endpoints of the PEX External API
  • Input Validation: All parameters validated with clear error messages
  • Retry Logic: Automatic retries with exponential backoff on 502/503/504 errors
  • Request Timeout: 30-second timeout prevents hanging requests
  • Structured Logging: JSON logs to stderr for debugging (stdout reserved for MCP)
  • Rich Documentation: All tool parameters include descriptions, valid values, and constraints

Example Queries

Once connected, you can ask Claude things like:

  • "What's my business account balance?"
  • "Show me all transactions from last week over $100"
  • "List all cards with their spending limits"
  • "What are the spending rules for card 12345?"
  • "Show me pending payments"

License

MIT

Reviews

No reviews yet

Sign in to write a review