Skip to main content
EP

ePayco

v0.1.0OAuth2

Colombian gateway (Davivienda-owned) with broad inbound coverage: cards, PSE bank debit, Daviplata wallet and cash networks.

8 tools3 env vars๐Ÿ‡จ๐Ÿ‡ด Colombiastable on npm

What your agent can do

ePayco gives your agent 8 tools it calls directly โ€” pick the ones it needs, in Claude, Cursor, or any MCP client.

  • tokenize_card โ€” Create a one-time card token (POST /v1/tokens on api.secure.payco.co). The token is then bound to a customer via create_customer and charged via charge_card.
  • create_customer โ€” Create an ePayco customer bound to a card token (POST /payment/v1/customer/create). Returns customer_id used by charge_card.
  • charge_card โ€” Charge a tokenized card (POST /payment/v1/charge/create). Amounts in COP unless currency says otherwise. Test mode is controlled by EPAYCO_TEST.
Example call
// Your agent calls a tool directly โ€” no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("tokenize_card", { /* ... */ });

Install

terminal
$ npm install @codespar/mcp-epayco

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "epayco": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-epayco"
      ],
      "env": {
        "EPAYCO_PUBLIC_KEY": "<your_epayco_public_key>",
        "EPAYCO_PRIVATE_KEY": "<your_epayco_private_key>"
      }
    }
  }
}

After restart, your agent can call any of the 8 tools below โ€” try tokenize_card first.

Environment variables ยท 3

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

EPAYCO_PUBLIC_KEY
required

ePayco public key

EPAYCO_PRIVATE_KEY
requiredsecret

ePayco private key

EPAYCO_TEST
optional

"true" flags payloads as test mode. Defaults to "true" โ€” set "false" for production.

Available tools ยท 8

Each tool is independent โ€” your agent loads only what it needs to reduce context and response time.

WRITEtokenize_card
Create a one-time card token (POST /v1/tokens on api.secure.payco.co). The token is then bound to a customer via create_customer and charged via charge_card.
WRITEcreate_customer
Create an ePayco customer bound to a card token (POST /payment/v1/customer/create). Returns customer_id used by charge_card.
WRITEcharge_card
Charge a tokenized card (POST /payment/v1/charge/create). Amounts in COP unless currency says otherwise. Test mode is controlled by EPAYCO_TEST.
READget_transaction
Get transaction detail by referencePayco (GET https://secure.epayco.co/validation/v1/reference/{ref}). Works for card, PSE and cash payments.
WRITEcreate_pse_payment
Create a PSE bank-debit payment (POST /restpagos/pagos/debitos.json on secure.payco.co). Returns a bank redirect URL the payer must open to authorize the debit.
READget_pse_transaction
Get a PSE transaction's status by transaction id (GET /restpagos/pse/transactioninfo.json on secure.payco.co).
READlist_pse_banks
List PSE banks available for bank debit (GET /restpagos/pse/bancos.json on secure.payco.co).
WRITEcreate_cash_payment
Create a cash payment voucher on a Colombian cash network (POST /restpagos/v2/efectivo/{network} on secure.payco.co). The payer takes the voucher code to a physical point to pay.

Compatible frameworks

MCP is a protocol โ€” any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

Run `npx -y @codespar/mcp-epayco` and add the config block above to your MCP client โ€” Claude, Cursor, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? CodeSpar's managed tier runs it for you with auth handled.
ePayco โ€” MCP server ยท 8 tools | CodeSpar