mcpField
M
mcp-culqi

mcp-culqi

Local
github.com/codesparFinance275Updated 5w ago

About mcp-culqi

mcp-culqi is an MCP server for Culqi, a Peruvian payment service provider, exposing 20 tools for charges, refunds, cards, Yape and PagoEfectivo orders, and subscriptions. It suits Peruvian e-commerce and SaaS projects that need local payment processing.

Key features

  1. 01Card charge creation, capture and refunds
  2. 02Customer and saved card management
  3. 03Order flow for Yape and PagoEfectivo
  4. 04Subscription plans and subscription management
  5. 05Webhook event listing and retrieval

Use cases

  1. 01Adding card payments and refunds to a Peruvian online store
  2. 02Managing recurring SaaS billing with saved cards
  3. 03Creating orders for Yape or PagoEfectivo payments

MCP support

This is an MCP server that exposes Culqi payment tools to MCP clients. It authenticates requests with a Bearer token from the CULQI_SECRET_KEY variable.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-culqi": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-culqi"
],
"env": {
"CULQI_SECRET_KEY": "<CULQI_SECRET_KEY>"
}
}
}
}
Run commandnpx -y @codespar/mcp-culqi
Environment variables to set
CULQI_SECRET_KEYSecretCulqi secret key. Use sk_test_... for sandbox, sk_live_... for production.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-culqi0.2.2

Tools

20

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
cvvstringYesCard verification value (3 or 4 digits)
emailstringYesCardholder email
metadataobjectNoOptional merchant-side key-value metadata
card_numberstringYesPAN (13-19 digits). Never log.
expiration_yearstringYesFour-digit year (e.g. 2027)
expiration_monthstringYesTwo-digit month (01-12)

Details

From the project README

@codespar/mcp-culqi

MCP server for Culqi — Peru's default PSP.

Culqi is the Stripe of Peru: the standard rail for Peruvian D2C brands and SaaS. It ships CulqiOnline (hosted checkout), CulqiLink (payment links), and CulqiFull (subscriptions). Adding Culqi brings Peru into the CodeSpar catalog alongside Mexico, Brazil, Colombia, Argentina, and Chile.

Tools (20)

ToolPurpose
create_tokenTokenize a card (POST /tokens).
create_chargeCreate a charge (POST /charges).
get_chargeRetrieve a charge by Culqi id.
list_chargesList charges (GET /charges) with optional filters.
capture_chargeCapture a previously-authorized charge (POST /charges/{id}/capture).
refund_chargeRefund a captured charge (POST /refunds).
get_refundRetrieve a refund by id (GET /refunds/{id}).
create_customerCreate a customer record (POST /customers).
get_customerRetrieve a customer by Culqi id (GET /customers/{id}).
list_customersList customers (GET /customers) with optional filters passed as query params: first_name, last_name, email,...
create_cardAttach a tokenized card to a customer for reuse (POST /cards).
delete_cardDetach a saved card from its customer (DELETE /cards/{id}).
create_orderCreate an order (POST /orders) for non-card payment methods — Yape, PagoEfectivo (Cash), bank transfer.
confirm_orderConfirm an unpaid order (POST /orders/{id}/confirm).
list_ordersList orders (GET /orders) with optional filters passed as query params: order_number, state (created, paid,...
create_planCreate a subscription plan (POST /plans).
create_subscriptionSubscribe a customer's saved card to a plan (POST /subscriptions).
cancel_subscriptionCancel an active subscription (DELETE /subscriptions/{id}).
list_eventsList webhook events (GET /events) with optional filters.
get_eventRetrieve a single webhook event by id (GET /events/{id}).

Install

npm install @codespar/mcp-culqi

Environment

CULQI_SECRET_KEY="sk_test_..."   # or sk_live_... for production

Culqi has no separate sandbox URL — the key prefix (sk_test_ vs sk_live_) selects the environment.

Authentication

Bearer token on every request:

Authorization: Bearer <CULQI_SECRET_KEY>
Content-Type: application/json

Base URL: https://api.culqi.com/v2.

Run

# stdio (default — for Claude Desktop, Cursor, etc)
npx @codespar/mcp-culqi

# HTTP (for server-to-server testing)
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-culqi

Notes

  • Amounts are in cents of the currency (e.g. 1000 = S/ 10.00 PEN).
  • Currencies supported: PEN, USD.
  • Tokenization of raw card data is typically done client-side (culqi.js / mobile SDKs). The create_token tool is primarily for test scripts — never send real PANs from a backend without PCI scope.
  • Subscriptions require tyc: true (terms & conditions acceptance) on creation.

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.