mcpField
M
mcp-asaas

mcp-asaas

Local
github.com/codesparFinance275Updated 4w ago

About mcp-asaas

mcp-asaas is an MCP server for the Asaas billing platform, covering Pix, boleto, credit card payments and subscriptions. It suits developers who want AI agents to handle charges and recurring billing. A demo mode returns fixture responses so tools can be tested without an API key.

Key features

  1. 01Covers Pix, boleto and credit card payments
  2. 02Supports credit card installments and schedule previews
  3. 03Manages customers, subscriptions and webhook notifications
  4. 04Queries balance and transfers, and issues refunds
  5. 05Demo mode returns fixed data without credentials

Use cases

  1. 01Having an agent generate Pix QR codes or boletos for customers
  2. 02Creating and cancelling recurring subscriptions
  3. 03Testing payment flows in the Asaas sandbox

MCP support

This project is an MCP server that exposes 24 Asaas tools to MCP clients, such as create_payment, get_pix_qrcode and create_subscription.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-asaas": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-asaas"
],
"env": {
"ASAAS_API_KEY": "<ASAAS_API_KEY>"
}
}
}
}
Run commandnpx -y @codespar/mcp-asaas
Environment variables to set
ASAAS_API_KEYSecretAPI key for asaas

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-asaas0.2.1

Tools

24

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
valuenumberYesTotal amount in BRL
dueDatestringYesDue date of the first installment (YYYY-MM-DD)
customerstringYesCustomer ID (cus_xxx)
billingTypeenumYesPayment methodBOLETO | CREDIT_CARD | PIX
descriptionstringNoPayment description
installmentsnumberNoNumber of equal installments (>=2). Only valid with billingType: CREDIT_CARD.

Details

From the project README

@codespar/mcp-asaas

MCP server for Asaas — billing automation with Pix, boleto, and credit card payments

npm License: MIT

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "asaas": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-asaas"],
      "env": {
        "ASAAS_API_KEY": "your-key",
        "ASAAS_SANDBOX": "true"
      }
    }
  }
}
Claude Code
claude mcp add asaas -- npx @codespar/mcp-asaas
Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

{
  "servers": {
    "asaas": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-asaas"],
      "env": {
        "ASAAS_API_KEY": "your-key",
        "ASAAS_SANDBOX": "true"
      }
    }
  }
}

Tools (24)

ToolPurpose
create_paymentCreate a payment in Asaas (Pix, boleto, or credit card); pass installments (>=2) with billingType: CREDIT_CARD to split into equal monthly installments
get_paymentGet payment details by ID
list_paymentsList payments with optional filters
get_pix_qrcodeGet Pix QR code for a payment (returns payload and image)
get_boletoGet boleto digitable line and barcode for a payment
create_customerCreate a customer in Asaas
list_customersList customers with optional filters
create_subscriptionCreate a recurring subscription
get_balanceGet current account balance
list_subscriptionsList subscriptions with optional filters
cancel_subscriptionCancel a subscription by ID
get_webhook_eventsList webhook events (payment confirmations, transfers, etc.)
create_subaccountCreate a subaccount for payment splitting
get_installmentsGet installment details for an existing payment by id, OR preview a hypothetical schedule by passing value + installments without an id
create_transferCreate a bank transfer (Pix out or TED)
create_pix_qrcodeGenerate a static PIX QR code for receiving payments
list_transfersList transfers with optional filters
create_notificationCreate a webhook notification configuration
list_notificationsList webhook notification configurations
get_customerGet customer details by ID
update_paymentUpdate a pending payment
delete_paymentDelete a payment by ID
refund_paymentRefund a received payment
get_subscriptionGet subscription details by ID

Authentication

Asaas uses an API key passed via the access_token header. You can generate your key from the Asaas dashboard.

Sandbox / Testing

Asaas provides a full sandbox environment at sandbox.asaas.com. Set ASAAS_SANDBOX=true to use it.

Get your credentials
  1. Go to Asaas
  2. Create an account or sign up for sandbox at sandbox.asaas.com
  3. Navigate to Integracoes > API and generate your API key
  4. Set the ASAAS_API_KEY environment variable

Environment Variables

VariableRequiredDescription
ASAAS_API_KEYYes (unless in demo mode)API key from Asaas dashboard
ASAAS_SANDBOXNoSet to "true" for sandbox mode
MCP_DEMONoSet to "true" (equivalent to passing --demo on the command line) for stateful demo-mode fixtures — no API key required

Demo mode

Pass the --demo flag (or set MCP_DEMO=true) to make every tool return deterministic fixture responses instead of calling the real Asaas API. Useful for building and testing agents without burning sandbox credentials.

The demo handlers for create_payment and get_installments are stateful: create_payment issues distinct ids per call (pay_demo_001, pay_demo_002, ...) and, when called with billingType: CREDIT_CARD + installments >= 2 + value > 0, records the installment schedule in an in-process ledger. A subsequent get_installments({ id }) against that id echoes the recorded schedule back. get_installments also supports a preview path — pass value + installments without an id and it returns a hypothetical schedule (status: "PREVIEW", preview: true) without creating a payment. Other tools return static fixture payloads.

# Start the server in demo mode (no key required):
npx -y @codespar/mcp-asaas --demo

Roadmap

v0.2 (planned)
  • list_subscriptions — List all recurring subscriptions with filters
  • cancel_subscription — Cancel an active subscription
  • get_webhook_events — List webhook events for debugging integrations
  • create_subaccount — Create a subaccount for marketplace splits
  • get_installments — Get installment details for a payment
v0.3 (planned)
  • create_anticipation — Request anticipation of receivables
  • get_fiscal_info — Get fiscal/tax information for payments
  • batch_payments — Create multiple payments in a single request

Want to contribute? Open a PR or request a tool.

Links

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.