mcp-transbank — Claude Code MCP server: setup and tools
Connects LLMs to the Transbank payment gateway in Chile. Automates Webpay Plus checkout links and OneClick Mall tokenized charges in your code editor.
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-transbankWhat mcp-transbank 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.
What it helps with
- 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 for the agent
- 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.
How to install mcp-transbank
Platform CLI
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-transbankReplace <…> with your own values
Platform CLI
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-transbankReplace <…> with your own values
Config file
{
"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
Config file
{
"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
Platform CLI
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-transbankReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-transbank
How do I install mcp-transbank in Claude Code?
Run the command `claude mcp add mcp-transbank -e TRANSBANK_COMMERCE_CODE=<TRANSBANK_COMMERCE_CODE> -e TRANSBANK_API_KEY_SECRET=<TRANSBANK_API_KEY_SECRET> -- npx -y @codespar/mcp-transbank`.
What does mcp-transbank do?
It provides a suite of tools for running Chilean Transbank payment operations directly from AI coding tools. You can create transactions, verify tokenized payments, and handle recurring charges.
How do I switch mcp-transbank to live production mode?
Set the TRANSBANK_ENV environment variable to production. By default, the server targets the Transbank integration environment.