Skip to main content
TR

Transbank

v0.2.0-alpha.2API Keyalpha

La adquirente de tarjetas dominante de Chile — raíces de origen estatal, efectivamente el default para el comercio chileno. Webpay Plus (pagos únicos) + Webpay OneClick Mall (recurrente con tarjeta guardada). Prerequisito para cualquier afirmación de cobertura LatAm que incluya Chile.

19 herramientas3 env vars🇨🇱 Chilealpha — validación pendiente

Qué puede hacer tu agente

Transbank le da a tu agente 19 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier cliente MCP.

  • webpay_create_transactionCreate a Webpay Plus transaction. Returns { token, url } — redirect the user to url?token_ws=<token> to complete payment. After the user returns to return_url, call webpay_commit_transaction.
  • webpay_commit_transactionCommit a Webpay Plus transaction after the user has returned from the Webpay flow. Must be called to actually charge the card.
  • webpay_get_transaction_statusGet the current status of a Webpay Plus transaction by token.
Ejemplo de llamada
// 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("webpay_create_transaction", { /* ... */ });

Instalar

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

Quickstart

Agregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con MCP).

claude_desktop_config.json
{
  "mcpServers": {
    "transbank": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-transbank@alpha"
      ],
      "env": {
        "TRANSBANK_COMMERCE_CODE": "<your_transbank_commerce_code>",
        "TRANSBANK_API_KEY_SECRET": "<your_transbank_api_key_secret>"
      }
    }
  }
}

Después de reiniciar, tu agente puede llamar cualquiera de las 19 herramientas de abajo — probá webpay_create_transaction primero.

Variables de entorno · 3

Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.

TRANSBANK_COMMERCE_CODE
obligatorio

Transbank merchant commerce code (sent as Tbk-Api-Key-Id header)

TRANSBANK_API_KEY_SECRET
obligatoriosecret

Transbank API secret key (sent as Tbk-Api-Key-Secret header)

TRANSBANK_ENV
opcional

Environment: 'integration' (default, https://webpay3gint.transbank.cl) or 'production' (https://webpay3g.transbank.cl)

Herramientas disponibles · 19

Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.

WRITEwebpay_create_transaction
Create a Webpay Plus transaction. Returns { token, url } — redirect the user to url?token_ws=<token> to complete payment. After the user returns to return_url, call webpay_commit_transaction.
READwebpay_commit_transaction
Commit a Webpay Plus transaction after the user has returned from the Webpay flow. Must be called to actually charge the card.
READwebpay_get_transaction_status
Get the current status of a Webpay Plus transaction by token.
DELETEwebpay_refund_transaction
Refund a committed Webpay Plus transaction. Full refund if amount equals original; partial otherwise.
READwebpay_increase_amount
Capture a previously authorized Webpay Plus transaction (partial-capture / deferred-capture flow).
WRITEwebpay_capture_transaction
Deferred-capture for a previously authorized Webpay Plus transaction. Uses the official PUT /capture endpoint — prefer this over webpay_increase_amount for standard deferred-capture flows.
WRITEwebpay_mall_create_transaction
Create a Webpay Mall transaction — one parent buy_order split across several seller commerce codes. Returns { token, url } exactly like Webpay Plus. Each details entry is a child charge with its own commerce_code, buy_order, and amount.
READwebpay_mall_commit_transaction
Commit a Webpay Mall transaction after the user has returned. Charges all child commerce codes at once.

Frameworks compatibles

MCP es un protocolo — cualquier framework que lo hable puede montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Cualquier cliente MCPProtocolo

Preguntas frecuentes

Corré `npx -y @codespar/mcp-transbank` y agregá el bloque de config de arriba a tu cliente MCP — Claude, Cursor, VS Code o cualquier cliente compatible con MCP. Sin build, sin SDK. ¿Preferís hosted? El tier gestionado de CodeSpar lo corre por vos, con la auth resuelta.
Transbank — MCP server · 19 tools | CodeSpar