# mcp-khipu

Connects AI agents to Khipu to process instant Chilean bank transfers, issue refunds, and manage payment webhooks.

- 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/khipu
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-khipu

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `KHIPU_API_KEY`, `KHIPU_RECEIVER_ID`, `KHIPU_SECRET`, `KHIPU_BASE_URL` — 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 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-khipu
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
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-khipu
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-khipu
```
Replace <…> with your own values

## When to use it
- 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
- 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

## 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
