Skip to main content
KH

Khipu

v0.2.0-alpha.2API Keyalpha

Chilean instant bank-transfer PSP. Complements Transbank for merchants who want bank-transfer payments alongside cards — Chilean consumers often prefer bank transfers for larger transactions (no credit limit, no card fees).

21 tools4 env vars🇨🇱 Chilealpha — pending validation

What your agent can do

Khipu gives your agent 21 tools it calls directly — pick the ones it needs, in Claude, Cursor, or any MCP client.

  • create_paymentCreate a Khipu payment (bank-transfer charge). Returns a payment_id and URLs the payer visits to authorize the transfer from their Chilean bank account. Use simplified_transfer_url for in-app redirects and transfer_url for desktop bank-login flows.
  • get_paymentRetrieve a Khipu payment. Pass either payment_id (lookup by id) or notification_token (lookup from a webhook — preferred, since webhooks only contain the token).
  • delete_paymentDelete (cancel) a pending Khipu payment. Only works while the payment has not been paid by the payer.
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("create_payment", { /* ... */ });

Install

terminal
$ npm install @codespar/mcp-khipu@alpha

Quickstart

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

claude_desktop_config.json
{
  "mcpServers": {
    "khipu": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-khipu@alpha"
      ],
      "env": {}
    }
  }
}

After restart, your agent can call any of the 21 tools below — try create_payment first.

Environment variables · 4

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

KHIPU_API_KEY
optionalsecret

Khipu v3 API key (sent as x-api-key header). Obtain from Khipu merchant panel → Developers.

KHIPU_RECEIVER_ID
optional

Khipu receiver id (merchant id). Required only for legacy v2 HTTP Basic auth; not needed when KHIPU_API_KEY is set.

KHIPU_SECRET
optionalsecret

Khipu receiver secret. Required only for legacy v2 HTTP Basic auth; not needed when KHIPU_API_KEY is set.

KHIPU_BASE_URL
optional

Khipu API base URL. Defaults to https://payment-api.khipu.com/v3.

Available tools · 21

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

WRITEcreate_payment
Create a Khipu payment (bank-transfer charge). Returns a payment_id and URLs the payer visits to authorize the transfer from their Chilean bank account. Use simplified_transfer_url for in-app redirects and transfer_url for desktop bank-login flows.
WRITEget_payment
Retrieve a Khipu payment. Pass either payment_id (lookup by id) or notification_token (lookup from a webhook — preferred, since webhooks only contain the token).
DELETEdelete_payment
Delete (cancel) a pending Khipu payment. Only works while the payment has not been paid by the payer.
WRITEconfirm_payment
Manually confirm a Khipu payment. Use when the merchant has opted into manual confirmation and the backend has validated the underlying transfer.
DELETErefund_payment
Refund a paid Khipu payment (full or partial). Refunds are only possible for merchants collecting into a Khipu account and before settlement of the corresponding funds (until 01:00 am the next business day).
WRITElist_payments
List Khipu payments for the current merchant, optionally filtered by date range and status. Useful for reconciliation jobs and agent-driven reporting.
WRITEpredict_payment
Predict whether a payment is likely to succeed for a given payer+amount+bank, and recommend the best bank/rail. Call before create_payment to improve conversion for large or edge-case transfers.
READget_merchants
List the merchant receiver accounts accessible with the current API key. Useful to confirm auth + discover receiver_id values.

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-khipu` 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.
Khipu — MCP server · 21 tools | CodeSpar