mcpField
M
mcp-flow-cl

mcp-flow-cl

Local
github.com/codesparFinance275Updated 4w ago

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

  1. 01Create hosted payment orders returning a payment URL
  2. 02Query payment status by token, commerce order or Flow order
  3. 03List received payments by date with paging
  4. 04Create full or partial refunds and check refund status
  5. 05Automatic HMAC-SHA256 request signing
  6. 06Switch between sandbox and production environments

Use cases

  1. 01Generate Webpay or ETpay payment links for customers
  2. 02Confirm whether an order has been paid
  3. 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.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-flow-cl": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-flow-cl"
],
"env": {
"FLOW_API_KEY": "<FLOW_API_KEY>",
"FLOW_SECRET_KEY": "<FLOW_SECRET_KEY>",
"FLOW_ENV": "<FLOW_ENV>"
}
}
}
}
Run commandnpx -y @codespar/mcp-flow-cl
Environment variables to set
FLOW_API_KEYSecretFlow merchant API key
FLOW_SECRET_KEYSecretFlow secret key used to HMAC-SHA256 sign every request
FLOW_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.

Packages
npm@codespar/mcp-flow-cl0.1.0

Tools

8

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
emailstringYesCustomer email
amountnumberYesAmount to charge (integer for CLP)
subjectstringYesPayment description shown to the customer
timeoutnumberNoSeconds the payment order stays valid (omit = no expiry)
currencystringNoCurrency (CLP or UF). Default CLP
optionalobjectNoOptional JSON of extra fields echoed back in getStatus
urlReturnstringYesURL the customer returns to after paying
commerceOrderstringYesYour unique order id
paymentMethodnumberNo1 Webpay, 3 all cards, 5 Onepay, 8 ETpay, 9 all enabled methods. Default 9
urlConfirmationstringYesServer-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.

npm License: MIT

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)

ToolEndpointWhat it does
create_paymentPOST /payment/createHosted payment order; returns url + token the customer pays at
create_payment_by_emailPOST /payment/createEmailFlow emails the customer a collection link
get_payment_statusGET /payment/getStatusStatus by Flow token (1 pending, 2 paid, 3 rejected, 4 canceled)
get_payment_status_by_commerce_idGET /payment/getStatusByCommerceIdStatus by your commerceOrder
get_payment_status_by_flow_orderGET /payment/getStatusByFlowOrderStatus by Flow order number
list_paymentsGET /payment/getPaymentsPayments received on a date (paged)
create_refundPOST /refund/createFull or partial refund order
get_refund_statusGET /refund/getStatusRefund 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.

VariableRequiredDescription
FLOW_API_KEYyesFlow merchant API key
FLOW_SECRET_KEYyesHMAC signing secret (never sent on the wire)
FLOW_ENVnosandbox (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

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.