mcp-khipu — Claude Code MCP server: what it does, how to install
Connects AI agents to Khipu to process instant Chilean bank transfers, issue refunds, and manage payment webhooks.
claude mcp add --env KHIPU_API_KEY=<KHIPU_API_KEY> --env KHIPU_RECEIVER_ID=<KHIPU_RECEIVER_ID> --env KHIPU_SECRET=<KHIPU_SECRET> --env KHIPU_BASE_URL=<KHIPU_BASE_URL> --transport stdio khipu -- npx -y @codespar/mcp-khipuWhat mcp-khipu does
This server equips your agent with 21 tools designed for Khipu, the Chilean bank-transfer payment rail. It handles charge creation, transaction lookups, cancellations, and both full and partial refunds. You can also query supported Chilean banks, run subscription charges, and manage physical POS terminal checkout sessions.
Authentication relies primarily on Khipu v3 via the KHIPU_API_KEY environment variable, passed in the x-api-key header. If that key is absent, the server drops back to legacy v2 Basic auth using KHIPU_RECEIVER_ID and KHIPU_SECRET. Missing all auth credentials causes requests to fail immediately.
The server runs via stdio with npx or as a standalone HTTP service when MCP_HTTP=true and MCP_PORT are set. Request payloads default to JSON automatically.
What it helps with
- create bank transfer payment charges in Chile
- issue full or partial refunds for completed payments
- retrieve the list of supported Chilean financial institutions
- register webhook endpoints for real-time payment notifications
Example prompts for the agent
- Create a Khipu payment for 30000 CLP for order 4012
- Check the payment status for transaction
pay-9921 - List all Chilean banks available in Khipu
How to install mcp-khipu
Platform CLI
claude mcp add --env KHIPU_API_KEY=<KHIPU_API_KEY> --env KHIPU_RECEIVER_ID=<KHIPU_RECEIVER_ID> --env KHIPU_SECRET=<KHIPU_SECRET> --env KHIPU_BASE_URL=<KHIPU_BASE_URL> --transport stdio khipu -- npx -y @codespar/mcp-khipuReplace <…> with your own values
Platform CLI
codex mcp add khipu --env KHIPU_API_KEY=<KHIPU_API_KEY> --env KHIPU_RECEIVER_ID=<KHIPU_RECEIVER_ID> --env KHIPU_SECRET=<KHIPU_SECRET> --env KHIPU_BASE_URL=<KHIPU_BASE_URL> -- npx -y @codespar/mcp-khipuReplace <…> with your own values
Config file
{
"mcpServers": {
"khipu": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-khipu"
],
"env": {
"KHIPU_API_KEY": "<KHIPU_API_KEY>",
"KHIPU_RECEIVER_ID": "<KHIPU_RECEIVER_ID>",
"KHIPU_SECRET": "<KHIPU_SECRET>",
"KHIPU_BASE_URL": "<KHIPU_BASE_URL>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"khipu": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codespar/mcp-khipu"
],
"env": {
"KHIPU_API_KEY": "<KHIPU_API_KEY>",
"KHIPU_RECEIVER_ID": "<KHIPU_RECEIVER_ID>",
"KHIPU_SECRET": "<KHIPU_SECRET>",
"KHIPU_BASE_URL": "<KHIPU_BASE_URL>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e KHIPU_API_KEY=<KHIPU_API_KEY> -e KHIPU_RECEIVER_ID=<KHIPU_RECEIVER_ID> -e KHIPU_SECRET=<KHIPU_SECRET> -e KHIPU_BASE_URL=<KHIPU_BASE_URL> khipu npx -y @codespar/mcp-khipuReplace <…> 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-khipu
How do I install mcp-khipu in Claude Code?
Run claude mcp add mcp-khipu -e KHIPU_API_KEY=<KHIPU_API_KEY> -e KHIPU_SECRET=<KHIPU_SECRET> -- npx -y @codespar/mcp-khipu in your terminal with your actual credentials.
What does mcp-khipu do?
It exposes Khipu payment processing tools to LLMs. Agents can initiate real-time Chilean bank transfers, inspect accounts, handle refunds, and check POS terminal status.
Which credentials are required to authenticate?
The preferred method is setting KHIPU_API_KEY for v3 endpoints. If you use legacy accounts, pass KHIPU_RECEIVER_ID together with KHIPU_SECRET instead.