The Abacate Pay MCP Server is a Model Context Protocol server that integrates with the Abacate Pay API, allowing you to manage payments, customers, and charges directly through AI assistants like Claude and Cursor. This server supports multiple clients simultaneously through a multi-tenancy feature, where each request can include its own API key.
git clone https://github.com/AbacatePay/abacatepay-mcp.git
cd abacatepay-mcp
bun install
Multi-Tenant Mode (Recommended):
{
"mcpServers": {
"abacate-pay": {
"command": "bun",
"args": ["/full/path/to/abacatepay-mcp/src/index.ts"]
}
}
}
Legacy Mode (Compatibility):
{
"mcpServers": {
"abacate-pay": {
"command": "bun",
"args": ["/full/path/to/abacatepay-mcp/src/index.ts"],
"env": {
"ABACATE_PAY_API_KEY": "your_api_key_here"
}
}
}
}
Multi-Tenant Mode (Recommended):
{
"mcp.servers": {
"abacate-pay": {
"command": "bun",
"args": ["/full/path/to/abacatepay-mcp/src/index.ts"]
}
}
}
Legacy Mode (Compatibility):
{
"mcp.servers": {
"abacate-pay": {
"command": "bun",
"args": ["/full/path/to/abacatepay-mcp/src/index.ts"],
"env": {
"ABACATE_PAY_API_KEY": "your_api_key_here"
}
}
}
}
/full/path/to/abacatepay-mcp/ with the actual path where you cloned the repositoryYou can create discount coupons for marketing campaigns:
"I hired an influencer named Alex to promote my business. Can you create a coupon with 15% discount using the code ALEX15 valid for up to 100 uses? I need to track the campaign performance."
You can look up charges to verify transactions:
"I had a strange charge yesterday that I don't recognize. Can you search all charges from yesterday and show me the details so I can verify what might have happened?"
You can create new client profiles and generate payment options:
"I just closed a contract with TechSolutions LTDA (CNPJ: 12.345.678/0001-90). Can you create their profile with email [email protected] and phone (11) 3456-7890? After that, I need to generate a PIX QR Code for R$10 for payment."
Each tool accepts an optional apiKey parameter:
Creating a Customer:
{
"apiKey": "your_api_key_here",
"name": "John Smith",
"cellphone": "(11) 99999-9999",
"email": "[email protected]",
"taxId": "123.456.789-01"
}
Listing Customers:
{
"apiKey": "your_api_key_here"
}
In legacy mode, tools work without the apiKey parameter:
Creating a Customer:
{
"name": "John Smith",
"cellphone": "(11) 99999-9999",
"email": "[email protected]",
"taxId": "123.456.789-01"
}
To use with tools like n8n, Zapier, or custom applications:
# Start HTTP server
bun run start:http
# Or with custom port
MCP_PORT=8080 bun run start:http
HTTP Request (n8n/Zapier):
POST https://your-server.com/mcp
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "createPixQrCode",
"arguments": {
"apiKey": "user_specific_key",
"amount": 1000,
"description": "Payment via automation"
}
}
}
JavaScript/Node.js:
async function createCustomer(apiKey, customerData) {
const response = await fetch('https://your-mcp-server.com/mcp', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'tools/call',
params: {
name: 'createCustomer',
arguments: { apiKey, ...customerData }
}
})
});
return response.json();
}
❌ Failed to create customer: HTTP 401: Unauthorized
Solution:
apiKey parameterSolution:
Solution: Ensure Bun is installed correctly:
# Check Bun installation
bun --version
# If needed, install Bun
curl -fsSL https://bun.sh/install | bash
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "abacate-pay" '{"command":"bun","args":["/caminho/completo/para/abacatepay-mcp/src/index.ts"]}'
See the official Claude Code MCP documentation for more details.
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.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"abacate-pay": {
"command": "bun",
"args": [
"/caminho/completo/para/abacatepay-mcp/src/index.ts"
]
}
}
}
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.
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"abacate-pay": {
"command": "bun",
"args": [
"/caminho/completo/para/abacatepay-mcp/src/index.ts"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect