JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 94
  • Score
    100M100P100Q90806F
  • License MIT

Blaze payments SDK, CLI, and MCP server — payments infrastructure for modern businesses

Package Exports

  • @blaze-money/cli
  • @blaze-money/cli/agent
  • @blaze-money/cli/mcp

Readme

Blaze — AI Agent Payments

@blaze-money/cli

Payments infrastructure for modern businesses. SDK, CLI, MCP server, and AI agent — all in one package.

npm version License: MIT Node >= 18 TypeScript


TypeScript SDK
Type-safe client for every Blaze API endpoint
CLI
Manage payments, customers, and transfers from your terminal
AI-Native
72-tool MCP server for Claude, Cursor, and any MCP client


Quick Start

npm install -g @blaze-money/cli
blaze auth
# Opens browser for authentication
blaze balance
{
  "object": "balance",
  "available": 10250.00,
  "pending": 500.00,
  "currency": "USD"
}

SDK

Use Blaze programmatically in any Node.js or TypeScript project.

import { BlazeClient } from "@blaze-money/cli"

const client = new BlazeClient({ apiKey: "sk_test_..." })

// Check balance
const balance = await client.getBalance()

// Create a customer
const customer = await client.createCustomer({
  email: "maria@example.com",
  first_name: "Maria",
  last_name: "Santos",
})

// Send a transfer
const transfer = await client.createTransfer({
  amount: 500,
  currency: "USD",
  customer_id: customer.id,
})

// Get an FX quote
const quote = await client.createFxQuote({
  from_currency: "USD",
  to_currency: "MXN",
  amount: 500,
})

Every method returns typed responses. Errors throw typed exceptions (BlazeAuthenticationError, BlazeValidationError, etc.) so you always know what went wrong.

See docs/sdk.md for the full SDK reference.


CLI

A complete command-line interface for your Blaze account.

Command Description
blaze auth Authenticate via browser (recommended)
blaze auth login --api-key <key> Authenticate with API key (legacy)
blaze auth whoami Show current authentication status
blaze auth logout Log out and clear credentials
blaze balance Check account balance
blaze customers list|get|create|update|archive Manage customers
blaze transfers list|get|create Manage transfers
blaze withdrawals list|get|create Manage withdrawals
blaze payment-links list|get|create|update|cancel Payment links
blaze accounts list|create|delete External accounts
blaze recipients list|add|remove Manage recipients
blaze transactions list|get View transactions
blaze api-keys list|create|update|revoke Manage API keys
blaze team list|invite|update-role|remove Manage team members
blaze webhooks list|get|create|update|delete Webhook endpoints
blaze analytics overview Transaction analytics
blaze disputes list|get|submit-evidence|close Manage disputes
blaze invoices list|get|create|send|mark-paid|void Invoices
blaze subscriptions list|get|create|cancel|pause|resume Subscriptions
blaze fx rates|quote FX rates and quotes
blaze agent "<command>" Natural language agent

Global Flags

--api-key     Override the API key for a single command
--base-url    Point to a different Blaze API environment
--format      Output format: json | table (default: json)

See docs/cli.md for detailed usage and examples.


AI-Native Payments

Give Claude, Cursor, or any MCP-compatible AI assistant the ability to manage payments, customers, and transfers.

Setup for Claude Desktop

Add this to your Claude Desktop configuration:

{
  "mcpServers": {
    "blaze": {
      "command": "npx",
      "args": ["-y", "@blaze-money/cli", "mcp"],
      "env": {
        "BLAZE_API_KEY": "sk_test_..."
      }
    }
  }
}

That's it. Your AI assistant now has full access to the Blaze API.

Setup for Claude Code

claude mcp add blaze -- npx -y @blaze-money/cli mcp

Then set your API key as an environment variable:

export BLAZE_API_KEY="sk_test_..."

Or add the server to your project's .claude/settings.json:

{
  "mcpServers": {
    "blaze": {
      "command": "npx",
      "args": ["-y", "@blaze-money/cli", "mcp"],
      "env": {
        "BLAZE_API_KEY": "sk_test_..."
      }
    }
  }
}

Setup for Codex

BLAZE_API_KEY="sk_test_..." codex --full-auto \
  --mcp-config '{"blaze":{"command":"npx","args":["-y","@blaze-money/cli","mcp"]}}'

Or create an mcp.json file in your project root:

{
  "blaze": {
    "command": "npx",
    "args": ["-y", "@blaze-money/cli", "mcp"],
    "env": {
      "BLAZE_API_KEY": "sk_test_..."
    }
  }
}

Then reference it when running Codex:

codex --full-auto --mcp-config mcp.json

72 Tools Available

Balanceblaze_get_balance, blaze_whoami

Customersblaze_list_customers, blaze_get_customer, blaze_create_customer, blaze_update_customer, blaze_archive_customer

External Accountsblaze_list_external_accounts, blaze_create_external_account, blaze_delete_external_account

Transfersblaze_list_transfers, blaze_get_transfer, blaze_create_transfer

Withdrawalsblaze_list_withdrawals, blaze_get_withdrawal, blaze_create_withdrawal

Payment Linksblaze_list_payment_links, blaze_get_payment_link, blaze_create_payment_link, blaze_update_payment_link, blaze_cancel_payment_link

Virtual Accountsblaze_list_virtual_accounts, blaze_get_virtual_account, blaze_create_virtual_account

Transactionsblaze_list_transactions, blaze_get_transaction

Team Membersblaze_list_team_members, blaze_list_pending_invitations, blaze_invite_team_member, blaze_update_member_role

Webhooksblaze_list_webhooks, blaze_get_webhook, blaze_create_webhook, blaze_update_webhook, blaze_delete_webhook

Analyticsblaze_get_analytics_overview

Disputesblaze_list_disputes, blaze_get_dispute, blaze_submit_dispute_evidence, blaze_close_dispute

Invoicesblaze_list_invoices, blaze_get_invoice, blaze_create_invoice, blaze_send_invoice, blaze_mark_invoice_paid, blaze_void_invoice

Subscriptionsblaze_list_subscriptions, blaze_get_subscription, blaze_create_subscription, blaze_cancel_subscription, blaze_pause_subscription, blaze_resume_subscription

FXblaze_get_fx_rates, blaze_create_fx_quote

Insightsblaze_get_spending_summary, blaze_list_bank_transactions, blaze_get_bank_balances

Bills (AP Automation)blaze_list_bills, blaze_get_bill, blaze_create_bill, blaze_update_bill, blaze_approve_bill, blaze_reject_bill, blaze_quote_bill_payment, blaze_pay_bill, blaze_list_bills_activity_log, blaze_list_connected_accounts, blaze_connect_bank_account, blaze_connect_gmail, blaze_disconnect_gmail, blaze_list_extracted_invoices, blaze_create_bill_from_invoice, blaze_get_bill_payment_methods, blaze_set_bill_payment_policy

Convenienceblaze_send_money

How It Works

Your AI Assistant  <-->  stdio  <-->  Blaze MCP Server  <-->  Blaze REST API

The MCP server communicates over standard input/output using the Model Context Protocol, giving any compatible AI client structured access to the full Blaze API surface.

See docs/mcp.md for integration guides and advanced configuration.


Agent Mode

Natural language interface for common payment operations.

blaze agent "send $500 to maria@example.com"
[>>>] Looking up customer: maria@example.com
[ ->] Customer found: Maria Santos (cust_abc123)
[>>>] Checking external accounts...
[ ->] Using account: us_bank ending in 4567
[>>>] Creating transfer: $500.00 USD
[ OK] Transfer created!
{
  "id": "txn_xyz789",
  "status": "pending_approval",
  "amount": 500,
  "currency": "USD"
}

Works for any operation:

blaze agent "check balance"
blaze agent "list transactions 5"

See docs/agent.md for supported commands and customization.


Authentication

Three methods, in order of precedence:

Priority Method Example
1 --api-key flag blaze balance --api-key sk_test_...
2 Environment variable export BLAZE_API_KEY=sk_test_...
3 Config file ~/.blaze/config.json

Test mode — Keys starting with sk_test_ hit the sandbox environment. No real money moves.

Live mode — Keys starting with sk_live_ hit the production API. Handle with care.

See docs/authentication.md for setup instructions.


Supported Currencies

Code Currency
USD US Dollar
MXN Mexican Peso
EUR Euro
GBP British Pound
BRL Brazilian Real
COP Colombian Peso
PEN Peruvian Sol
ARS Argentine Peso

Error Handling

All errors are typed and predictable.

import { BlazeClient, BlazeValidationError } from "@blaze-money/cli"

try {
  await client.createCustomer({ email: "invalid" })
} catch (err) {
  if (err instanceof BlazeValidationError) {
    console.error(err.errors) // { email: ["Invalid email format"] }
  }
}
Error Class HTTP Status When
BlazeError Base class for all errors
BlazeAuthenticationError 401 Invalid or missing API key
BlazePermissionError 403 Insufficient permissions
BlazeNotFoundError 404 Resource does not exist
BlazeValidationError 400 Invalid request parameters
BlazeRateLimitError 429 Too many requests

Contributing

We welcome contributions. Please see CONTRIBUTING.md for guidelines on how to get started.


License

MIT — see LICENSE for details.