Skip to main content
KU

Kushki

v0.1.0API Key

Omnichannel PSP across Mexico, Colombia, Chile, Peru and Ecuador. One REST API for card tokenization and one-step or two-step charges.

10 tools3 env vars๐ŸŒŽ LATAMstable on npm

What your agent can do

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

  • tokenize_card โ€” Exchange raw card data for a single-use token (POST /card/v1/tokens, public merchant id). The token feeds create_charge / create_preauthorization / create_subscription. Card data never touches your backend.
  • create_charge โ€” One-step card charge (POST /card/v1/charges, private merchant id). Pass the token from tokenize_card plus the amount object. Supports metadata, months (MX installments) and deferred (installment plans).
  • create_preauthorization โ€” Two-step charge, step 1: hold funds on the card (POST /card/v1/preAuthorization, private merchant id). Returns a ticketNumber to capture later.
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-kushki

Quickstart

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

claude_desktop_config.json
{
  "mcpServers": {
    "kushki": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-kushki"
      ],
      "env": {
        "KUSHKI_PUBLIC_MERCHANT_ID": "<your_kushki_public_merchant_id>",
        "KUSHKI_PRIVATE_MERCHANT_ID": "<your_kushki_private_merchant_id>"
      }
    }
  }
}

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

Environment variables ยท 3

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

KUSHKI_PUBLIC_MERCHANT_ID
requiredsecret

Kushki public merchant id (card/transfer tokenization)

KUSHKI_PRIVATE_MERCHANT_ID
requiredsecret

Kushki private merchant id (charges, captures, voids, subscriptions)

KUSHKI_ENV
optional

Environment: 'sandbox' (api-uat) or 'production'. Defaults to 'sandbox'.

Available tools ยท 10

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

WRITEtokenize_card
Exchange raw card data for a single-use token (POST /card/v1/tokens, public merchant id). The token feeds create_charge / create_preauthorization / create_subscription. Card data never touches your backend.
WRITEcreate_charge
One-step card charge (POST /card/v1/charges, private merchant id). Pass the token from tokenize_card plus the amount object. Supports metadata, months (MX installments) and deferred (installment plans).
WRITEcreate_preauthorization
Two-step charge, step 1: hold funds on the card (POST /card/v1/preAuthorization, private merchant id). Returns a ticketNumber to capture later.
WRITEcapture_preauthorization
Two-step charge, step 2: capture a previous preauthorization (POST /card/v1/capture, private merchant id). Amount may be lower than the preauth (partial capture).
DELETEvoid_charge
Void / refund a card charge (DELETE /card/v1/charges/{ticketNumber}, private merchant id). Same-day = void; settled = refund. Optional partial amount where the acquirer supports it.
WRITEcreate_transfer_token
Token for a bank-transfer-in (POST /transfer/v1/tokens, public merchant id). PSE in Colombia, SPEI in Mexico, bank transfer in Chile/Peru. Feeds create_transfer_charge.
WRITEcreate_transfer_charge
Bank transfer-in charge with a transfer token (POST /transfer/v1/init, private merchant id). Returns the bank redirect URL the customer authorizes at.
WRITEcreate_cash_charge
Cash payment reference (POST /cash/v1/charges, private merchant id). Generates a voucher/reference the customer pays at a cash network (OXXO-style). Returns reference + expiry.

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-kushki` 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.
Kushki โ€” MCP server ยท 10 tools | CodeSpar