# mcp-culqi

An MCP server for Culqi, Peru's payment provider: charges, refunds, saved cards, Yape and PagoEfectivo orders, subscription plans.

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

## What it does

The server wraps Culqi API v2 in 20 tools. Card work follows the usual sequence: tokenize, charge, capture if the charge was only authorized, then refund when needed. Customers and their saved cards get their own tools so a card can be reused later.

Payment methods that skip cards run through orders. `create_order` handles Yape, PagoEfectivo and bank transfers, and `confirm_order` closes an unpaid one. Plans and subscriptions have their own tools, with one catch: subscription creation needs `tyc: true`, the customer's acceptance of terms, otherwise it fails. Amounts arrive in the currency's minor units, and PEN and USD are accepted.

Set `CULQI_SECRET_KEY` before starting the server. Culqi has no separate sandbox host; the prefix decides which environment you hit, `sk_test_` or `sk_live_`. Card tokenization is exposed as `create_token`, but it is meant for test scripts. Sending real card numbers from your backend without PCI scope is not something to do, and the README says so.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `CULQI_SECRET_KEY` — 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 mcp-culqi -e CULQI_SECRET_KEY=<CULQI_SECRET_KEY> -- npx -y @codespar/mcp-culqi
```
Replace <…> with your own values

### Codex

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

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

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

## When to use it
- charge a card and check whether it went through
- refund a charge that was captured earlier
- save a card to a customer for repeat payments
- open an order paid by Yape or PagoEfectivo
- create a plan and attach a subscriber to it

## Example prompts
- Charge this tokenized card 2500 PEN and capture it
- Find the charge with `list_charges` and refund it
- Create a customer, then attach the new token as a card

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24242
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7506

From the same set: [codespar/mcp-dev-latam](https://affpapa.org/en/nevibecode/by/codespar/mcp-dev-latam.md) — 40 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
