mcp-efi — Claude Code MCP server: payments and setup
This MCP server connects EFI (Gerencianet) to an AI agent for Pix, boleto, card charges, and carnets.
claude mcp add mcp-efi -e EFI_CLIENT_SECRET=<EFI_CLIENT_SECRET> -- npx -y @codespar/mcp-efiWhat mcp-efi does
mcp-efi exposes EFI payment operations to an agent. It can create and inspect Pix charges, issue boleto or credit-card charges, create carnets with multiple instalments, and manage Pix keys, refunds, and webhooks. The package provides 18 tools.
Authentication uses OAuth2 client credentials, with token renewal handled by the server. Set EFI_CLIENT_ID and EFI_CLIENT_SECRET before connecting it; EFI_SANDBOX=true selects the sandbox environment. Without those credentials, authentication will fail. The server is listed for Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, and Gemini CLI.
What it helps with
- create an immediate Pix charge
- look up a charge by txid
- issue a boleto or card charge
- make a carnet with several instalments
- register a webhook for a Pix key
Example prompts for the agent
- Create an immediate Pix charge with
create_coband return its identifier. - Look up the Pix charge for this txid using
get_cob. - Create a payment carnet with several instalments through
create_carnet.
How to install mcp-efi
Platform CLI
claude mcp add mcp-efi -e EFI_CLIENT_SECRET=<EFI_CLIENT_SECRET> -- npx -y @codespar/mcp-efiReplace <…> with your own values
Platform CLI
codex mcp add efi --env EFI_CLIENT_SECRET=<EFI_CLIENT_SECRET> -- npx -y @codespar/mcp-efiReplace <…> with your own values
Config file
{
"mcpServers": {
"efi": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-efi"
],
"env": {
"EFI_CLIENT_SECRET": "<EFI_CLIENT_SECRET>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"efi": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codespar/mcp-efi"
],
"env": {
"EFI_CLIENT_SECRET": "<EFI_CLIENT_SECRET>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e EFI_CLIENT_SECRET=<EFI_CLIENT_SECRET> efi npx -y @codespar/mcp-efiReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-efi
How do I install mcp-efi in Claude Code?
Run claude mcp add mcp-efi -e EFI_CLIENT_SECRET=<EFI_CLIENT_SECRET> -- npx -y @codespar/mcp-efi. Then set EFI_CLIENT_ID as well for authentication.
What does mcp-efi do?
It gives an agent EFI tools for Pix charges, boleto, card payments, carnets, refunds, Pix keys, and webhooks.
What credentials does mcp-efi require?
Set EFI_CLIENT_ID and EFI_CLIENT_SECRET for OAuth2 access. Use EFI_SANDBOX=true to connect to the sandbox.