About mcp-flow-cl
mcp-flow-cl is an MCP server for Flow.cl, a Chilean payment service provider. It creates hosted payment orders and checks payment and refund status. It suits agents and developers collecting payments in Chile, and it handles HMAC-SHA256 request signing internally.
Key features
- 01Create hosted payment orders returning a payment URL
- 02Query payment status by token, commerce order or Flow order
- 03List received payments by date with paging
- 04Create full or partial refunds and check refund status
- 05Automatic HMAC-SHA256 request signing
- 06Switch between sandbox and production environments
Use cases
- 01Generate Webpay or ETpay payment links for customers
- 02Confirm whether an order has been paid
- 03Issue a partial refund on a paid order
MCP support
This project is an MCP server that exposes eight payment tools to MCP clients, covering order creation, status lookup and refunds.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y @codespar/mcp-flow-clFLOW_API_KEYSecretFlow merchant API keyFLOW_SECRET_KEYSecretFlow secret key used to HMAC-SHA256 sign every requestFLOW_ENVEnvironment: 'sandbox' or 'production'. Defaults to 'sandbox'.Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
8Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | Customer email | |
| amount | number | Yes | Amount to charge (integer for CLP) |
| subject | string | Yes | Payment description shown to the customer |
| timeout | number | No | Seconds the payment order stays valid (omit = no expiry) |
| currency | string | No | Currency (CLP or UF). Default CLP |
| optional | object | No | Optional JSON of extra fields echoed back in getStatus |
| urlReturn | string | Yes | URL the customer returns to after paying |
| commerceOrder | string | Yes | Your unique order id |
| paymentMethod | number | No | 1 Webpay, 3 all cards, 5 Onepay, 8 ETpay, 9 all enabled methods. Default 9 |
| urlConfirmation | string | Yes | Server-to-server confirmation callback URL (POST, receives token) |
Details
From the project README@codespar/mcp-flow-cl
MCP server for Flow (flow.cl) — the Chile-native PSP: one hosted payment order covers Webpay (credit/debit), ETpay bank transfer, cash networks and international cards. Refunds included. Every API call is HMAC-SHA256 signed.
Quick Start
Claude Desktop
Add to ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"flow-cl": {
"command": "npx",
"args": ["-y", "@codespar/mcp-flow-cl"],
"env": {
"FLOW_API_KEY": "your-flow-api-key",
"FLOW_SECRET_KEY": "your-flow-secret-key",
"FLOW_ENV": "sandbox"
}
}
}
}
Claude Code
claude mcp add flow-cl --env FLOW_API_KEY=... --env FLOW_SECRET_KEY=... -- npx -y @codespar/mcp-flow-cl
Cursor / VS Code
Add the same block to .cursor/mcp.json or .vscode/mcp.json.
Tools (8)
| Tool | Endpoint | What it does |
|---|---|---|
create_payment | POST /payment/create | Hosted payment order; returns url + token the customer pays at |
create_payment_by_email | POST /payment/createEmail | Flow emails the customer a collection link |
get_payment_status | GET /payment/getStatus | Status by Flow token (1 pending, 2 paid, 3 rejected, 4 canceled) |
get_payment_status_by_commerce_id | GET /payment/getStatusByCommerceId | Status by your commerceOrder |
get_payment_status_by_flow_order | GET /payment/getStatusByFlowOrder | Status by Flow order number |
list_payments | GET /payment/getPayments | Payments received on a date (paged) |
create_refund | POST /refund/create | Full or partial refund order |
get_refund_status | GET /refund/getStatus | Refund status by refund token |
Authentication
Flow signs every request: parameters are sorted alphabetically, concatenated as name+value, and signed with HMAC-SHA256 using your secretKey. This server does the signing for you — set the two env vars and call tools with plain arguments.
| Variable | Required | Description |
|---|---|---|
FLOW_API_KEY | yes | Flow merchant API key |
FLOW_SECRET_KEY | yes | HMAC signing secret (never sent on the wire) |
FLOW_ENV | no | sandbox (default) or production |
Sandbox: register at sandbox.flow.cl — the sandbox issues its own key pair.
Example
"Create a Flow payment order for CLP 25,000, subject 'Plan Pro mensual', email [email protected], and give me the payment link."
The agent calls create_payment and returns url?token=... — the customer picks Webpay, ETpay or cash at Flow's hosted page.
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.
Managed tier
This open-source server calls Flow's API directly with your credentials. CodeSpar's managed tier routes one interface across every LATAM provider with automatic failover, governance, audit and a credential vault: codespar.dev/agents.
License
MIT
Comments
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.