Official package
The Safefy MCP Server implements the Model Context Protocol (MCP), the open standard that lets AI assistants use external tools. With it, your AI agent queries and operates the Safefy API right in the conversation.What it is for
- Integrate faster. Ask “add Safefy PIX payments to my checkout” and the agent reads the integration guide, writes the code with the SDK or the API and tests it in the Sandbox: it creates the charge, simulates the payment and resends the webhook.
- Operate your account by chatting. “What’s my balance?”, “list yesterday’s transactions”, “create a R$ 150 PIX charge for customer João” become chat requests, without opening the dashboard.
Requirements
- Node.js 18 or later
- API Public Key and Secret Key. Generate them at app.safefypay.com.br/panel/merchant/api-credentials.
Setup by platform
Credentials go in the MCP server’s environment variables, as in the examples below.- Claude
- Cursor / Windsurf / VS Code
- v0 (Vercel)
- Lovable
Edit
claude_desktop_config.json and restart Claude:Environment variables
Security
The AI agent can move money, so the server has its own safeguards:- The token only goes to the Safefy API. Calls outside the API host or outside
/v1/are rejected. - Cards only by token. The agent never receives the card number or CVV. Card charges use the
cardTokenfrom tokenization. - Payouts only to a registered account. A payout requires a payout account already registered in the dashboard (ad-hoc PIX keys are not accepted) and explicit user confirmation in the conversation, with amount and destination shown.
- Credentials outside the chat. Keys live in environment variables.
Available tools
All tools are prefixed withsafefy_payment_.
Integration and setup
get_integration_guide: integration guide using the Node SDK or the API directly (any language)list_capabilities: lists what the server coversget_configuration: shows the environment and whether credentials are set, without exposing the Secret Keyauthenticate: generates the access tokenconfigure_credentials: accepts keys through the chat. Disabled by defaultapi_request: generic call to any/v1/API route, for operations without a dedicated tool
Transactions
create_transaction: creates a PIX, boleto or card charge (card viacardToken)get_transaction: gets a transactionlist_transactions: lists transactions with filterssimulate_transaction: simulates payment or failure in the Sandboxresend_transaction_webhook: resends a transaction’s webhook
Balance
get_balance: gets the available balance
Payouts
create_cashout: requests a payout to a registered account, with user confirmationget_cashout: gets a payoutlist_cashouts: lists payouts with filterscancel_cashout: cancels a pending payoutsimulate_cashout: simulates completion or failure in the Sandbox
Customers
create_customer: creates a customerget_customer: gets a customerlist_customers: lists customers with filtersupdate_customer: updates customer data
Orders
create_order: creates an orderget_order: gets an orderlist_orders: lists orders
Products
get_product: gets a productlist_products: lists products with filters
Payment links
get_payment_link: gets a payment linkstart_payment_link: starts a charge on a payment linkget_payment_link_status: gets a link’s status
Usage examples
create_transaction and shows the PIX Copy and Paste code.
list_transactions and get_balance and presents a summary.
get_integration_guide, writes the code and uses create_transaction and simulate_transaction to
test it.