# mcp-transbank

Connects LLMs to the Transbank payment gateway in Chile. Automates Webpay Plus checkout links and OneClick Mall tokenized charges in your code editor.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 274
- Author: codespar
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codespar/mcp-dev-latam/tree/HEAD/packages/payments/transbank
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-transbank

## What it does

This server interfaces agentic environments with Transbank, the dominant payment processor in Chile. It brings 19 tools targeting two payment schemes: redirect-based checkouts with Webpay Plus, and multi-merchant recurring billing with Webpay OneClick Mall.

Your assistant can start new payment sessions and commit funds once the customer returns. It also handles refunds and delayed capture. Authentication headers `Tbk-Api-Key-Id` and `Tbk-Api-Key-Secret` are injected behind the scenes for every outbound request.

Connecting fails without valid `TRANSBANK_COMMERCE_CODE` and `TRANSBANK_API_KEY_SECRET` credentials in the environment. Setting `TRANSBANK_ENV` switches the target endpoint between integration testing and production.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `TRANSBANK_COMMERCE_CODE`, `TRANSBANK_API_KEY_SECRET`, `TRANSBANK_ENV` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env TRANSBANK_COMMERCE_CODE=<TRANSBANK_COMMERCE_CODE> --env TRANSBANK_API_KEY_SECRET=<TRANSBANK_API_KEY_SECRET> --env TRANSBANK_ENV=<TRANSBANK_ENV> --transport stdio transbank -- npx -y @codespar/mcp-transbank
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add transbank --env TRANSBANK_COMMERCE_CODE=<TRANSBANK_COMMERCE_CODE> --env TRANSBANK_API_KEY_SECRET=<TRANSBANK_API_KEY_SECRET> --env TRANSBANK_ENV=<TRANSBANK_ENV> -- npx -y @codespar/mcp-transbank
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "transbank": {
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-transbank"
            ],
            "env": {
                "TRANSBANK_COMMERCE_CODE": "<TRANSBANK_COMMERCE_CODE>",
                "TRANSBANK_API_KEY_SECRET": "<TRANSBANK_API_KEY_SECRET>",
                "TRANSBANK_ENV": "<TRANSBANK_ENV>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "transbank": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-transbank"
            ],
            "env": {
                "TRANSBANK_COMMERCE_CODE": "<TRANSBANK_COMMERCE_CODE>",
                "TRANSBANK_API_KEY_SECRET": "<TRANSBANK_API_KEY_SECRET>",
                "TRANSBANK_ENV": "<TRANSBANK_ENV>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e TRANSBANK_COMMERCE_CODE=<TRANSBANK_COMMERCE_CODE> -e TRANSBANK_API_KEY_SECRET=<TRANSBANK_API_KEY_SECRET> -e TRANSBANK_ENV=<TRANSBANK_ENV> transbank npx -y @codespar/mcp-transbank
```
Replace <…> with your own values

## When to use it
- initialize Webpay Plus transactions with return URLs
- commit card payments after checkout redirects
- register and tokenize cards in OneClick Mall
- trigger refunds across specific merchant codes

## Example prompts
- Create a Webpay Plus transaction for 25000 CLP with order ID order-402 and set the return URL.
- Commit the payment using the token returned from Webpay.
- Check the status of a OneClick Mall payment using parent buy order ord-881.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44583
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5458
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2814
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2188
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

From the same set: [codespar/mcp-dev-latam](https://affpapa.org/en/nevibecode/by/codespar/mcp-dev-latam.md) — 124 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
