mcpField
M
mcp-stone

mcp-stone

Local
github.com/codesparFinance275Updated 4w ago

About mcp-stone

mcp-stone is an MCP server for Stone, covering acquiring by card, Pix and boleto, anticipation of receivables, POS terminals and open banking. It is aimed at Brazilian merchants and their developers who want an AI client to handle charging and settlement tasks.

Key features

  1. 01Charge cards, Pix and boleto payments
  2. 02Refund or cancel transactions
  3. 03Request receivable anticipation and check limits
  4. 04List receivables and account transactions
  5. 05View POS terminal list and status
  6. 06Register webhooks for Stone events

Use cases

  1. 01Ask an agent for a merchant's anticipation limits and receivables
  2. 02Check whether POS terminals are online
  3. 03Create Pix charges or boleto collections from an AI client

MCP support

This project is an MCP server that exposes 21 tools to MCP clients for acquiring, transfers, receivables, terminals and webhooks through the Stone API.

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-stone": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-stone"
],
"env": {
"STONE_CLIENT_SECRET": "<STONE_CLIENT_SECRET>"
}
}
}
}
Run commandnpx -y @codespar/mcp-stone
Environment variables to set
STONE_CLIENT_SECRETSecretAPI key for stone

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-stone0.2.2

Tools

21

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
account_idstringYesAccount ID

Details

From the project README

@codespar/mcp-stone

MCP server for Stone — acquiring (card / Pix / boleto), anticipations, receivables, terminals, and open banking

npm License: MIT

Quick Start

Claude Desktop

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

{
  "mcpServers": {
    "stone": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-stone"],
      "env": {
        "STONE_CLIENT_ID": "your-client-id",
        "STONE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}
Claude Code
claude mcp add stone -- npx @codespar/mcp-stone
Cursor / VS Code

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

{
  "servers": {
    "stone": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-stone"],
      "env": {
        "STONE_CLIENT_ID": "your-client-id",
        "STONE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Tools (21)

ToolPurpose
get_balanceGet account balance
list_transactionsList account transactions
get_statementGet account statement for a period
create_paymentCreate a payment via Stone
get_paymentGet payment details by ID
list_paymentsList payments with optional filters
create_transferCreate a bank transfer (internal or external)
create_pix_paymentCreate a Pix payment (outbound) via Stone
create_pix_chargeCreate a Pix charge (QR Code / cob) to receive a payment
create_boletoCreate a boleto bancário for charging a customer
create_card_chargeCharge a credit or debit card (Stone acquiring)
tokenize_cardTokenize a card to PCI-safe token for later charging
refund_transactionRefund a settled transaction (full or partial)
cancel_transactionCancel an authorized (not-yet-captured) transaction
create_anticipationAnticipate future receivables (Stone's flagship 'antecipação')
get_anticipation_limitsGet current anticipation limits (max / min / available) for a merchant
list_receivablesSearch receivables (future credits from card transactions)
list_terminalsList physical Stone / TON terminals for a merchant
get_terminal_statusGet current status of a specific POS terminal (online / offline / last seen)
register_webhookRegister a webhook endpoint for Stone events
list_webhooksList registered webhook endpoints

Authentication

Stone uses OAuth2 client credentials for authentication. The server automatically manages token refresh.

Sandbox / Testing

Stone provides a sandbox via the developer portal.

Get your credentials
  1. Go to Stone Open Bank Documentation
  2. Register as a developer
  3. Create an application to get OAuth2 credentials
  4. Set the environment variables

Environment Variables

VariableRequiredDescription
STONE_CLIENT_IDYesOAuth2 client ID
STONE_CLIENT_SECRETYesOAuth2 client secret
STONE_BASE_URLNoOverride base URL (default https://api.openbank.stone.com.br/api/v1; sandbox https://sandbox-api.openbank.stone.com.br/api/v1)
STONE_AUTH_URLNoOverride the OAuth2 token URL (default https://accounts.openbank.stone.com.br/auth/realms/stone_bank/protocol/openid-connect/token; sandbox https://sandbox-accounts.openbank.stone.com.br/auth/realms/stone_bank/protocol/openid-connect/token). Up to 0.2.2 the token call went to login.openbank.stone.com.br, which does not exist, so every tool failed at authentication.

Roadmap

v0.3 (planned)
  • list_pix_keys — List registered Pix keys for a merchant
  • create_recipient — Marketplace / split recipients
  • create_transfer_batch — Batch transfer processing
  • get_boleto — Fetch boleto details
  • create_scheduled_payment — Schedule future-dated payments
  • list_payouts — List anticipation / settlement payouts

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.