mcpField
M
mcp-efi

mcp-efi

Local
github.com/codesparFinance275Updated 4w ago

About mcp-efi

mcp-efi is an MCP server for EFI (formerly Gerencianet), covering Pix charges, boleto, credit card billing and carnets. It suits developers building Brazilian payment and billing flows through an MCP client. The README includes sandbox and credential setup steps.

Key features

  1. 01Immediate and due-date Pix charges
  2. 02Boleto and credit card billing
  3. 03Carnet payment booklets with multiple parcels
  4. 04Pix key, refund and webhook management

Use cases

  1. 01Generating carnets for installment payments
  2. 02Creating Pix charges and tracking payment status
  3. 03Managing Pix keys and webhook notifications

MCP support

This is an MCP server that exposes 18 tools to MCP clients for calling EFI charge, Pix and webhook endpoints.

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

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

Tools

18

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
txidstringNoTransaction ID (26-35 chars, alphanumeric)
chavestringYesPix key of the receiver
valorobjectYesCharge value
valor.originalstringYesAmount as string (e.g. '10.00')
devedorobjectNoDebtor info
devedor.cpfstringNoDebtor CPF
devedor.nomestringNoDebtor name
calendarioobjectNoExpiration settings
calendario.expiracaonumberNoExpiration in seconds (default 3600)
solicitacaoPagadorstringNoMessage to payer

Details

From the project README

@codespar/mcp-efi

MCP server for EFI (Gerencianet) — Pix charges, boleto, credit card, and carnets

npm License: MIT

Quick Start

Claude Desktop

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

{
  "mcpServers": {
    "efi": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-efi"],
      "env": {
        "EFI_CLIENT_ID": "your-client-id",
        "EFI_CLIENT_SECRET": "your-client-secret",
        "EFI_SANDBOX": "true"
      }
    }
  }
}
Claude Code
claude mcp add efi -- npx @codespar/mcp-efi
Cursor / VS Code

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

{
  "servers": {
    "efi": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-efi"],
      "env": {
        "EFI_CLIENT_ID": "your-client-id",
        "EFI_CLIENT_SECRET": "your-client-secret",
        "EFI_SANDBOX": "true"
      }
    }
  }
}

Tools (18)

ToolPurpose
create_cobCreate an immediate Pix charge (cobranca imediata)
get_cobGet Pix charge details by txid
list_cobsList Pix charges by date range
create_chargeCreate a billing charge (boleto or credit card)
get_chargeGet charge details by ID
create_carnetCreate a carnet (payment booklet with multiple parcels)
get_pix_keyGet details of a registered Pix key
create_pix_evpCreate a random Pix key (EVP/alias)
create_cobvCreate a Pix due charge (cobranca com vencimento).
get_cobvGet Pix due charge (cobv) details by txid
update_cobvUpdate an existing Pix due charge (cobv) by txid
create_devolucaoRequest a Pix devolution (refund) on a received Pix transaction
get_devolucaoGet details of a Pix devolution by e2eId and devolution id
list_pix_receivedList received Pix transactions (recebidos) by date range
delete_pix_keyDelete a registered Pix key (DICT)
register_webhookRegister a webhook URL for a given Pix key
list_webhooksList registered webhooks by date range
delete_webhookDelete the webhook registered for a Pix key

Authentication

EFI uses OAuth2 client credentials. The server automatically manages token refresh.

Sandbox / Testing

EFI provides a sandbox at pix-h.api.efipay.com.br. Set EFI_SANDBOX=true to use it.

Get your credentials
  1. Go to EFI Pay Dashboard
  2. Create an account
  3. Register an application to get OAuth2 credentials
  4. Set the environment variables

Environment Variables

VariableRequiredDescription
EFI_CLIENT_IDYesOAuth2 client ID
EFI_CLIENT_SECRETYesOAuth2 client secret
EFI_SANDBOXNoSet to "true" for sandbox mode

Roadmap

v0.2 (planned)
  • create_devolucao — Create a Pix refund (devolucao)
  • get_devolucao — Get Pix refund details
  • list_locations — List Pix payload locations
  • create_webhook — Register a webhook for Pix notifications
  • update_cob — Update an existing Pix charge
v0.3 (planned)
  • batch_charges — Create multiple charges in a single request
  • split_payments — Configure split payment rules

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.