Skip to main content
FL

Flow

v0.1.0HMAC

Chile-native PSP. Hosted payment orders covering Webpay, ETpay, cards, bank transfer and cash, authenticated with signed HMAC.

8 tools3 env vars๐Ÿ‡จ๐Ÿ‡ฑ Chilestable on npm

What your agent can do

Flow gives your agent 8 tools it calls directly โ€” pick the ones it needs, in Claude, Cursor, or any MCP client.

  • create_payment โ€” Create a hosted payment order (POST /payment/create). Returns url + token + flowOrder; the customer pays at url + '?token=' + token. paymentMethod 9 offers every method Flow has enabled for the merchant (Webpay, ETpay bank transfer, cash, international cards).
  • create_payment_by_email โ€” Create a collection order Flow emails to the customer (POST /payment/createEmail). Same shape as create_payment but Flow delivers the payment link by email โ€” no checkout redirect needed.
  • get_payment_status โ€” Get a payment order's status by Flow token (GET /payment/getStatus). status: 1 pending, 2 paid, 3 rejected, 4 canceled.
Example call
// Your agent calls a tool directly โ€” no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("create_payment", { /* ... */ });

Install

terminal
$ npm install @codespar/mcp-flow-cl

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

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>"
      }
    }
  }
}

After restart, your agent can call any of the 8 tools below โ€” try create_payment first.

Environment variables ยท 3

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

FLOW_API_KEY
requiredsecret

Flow merchant API key

FLOW_SECRET_KEY
requiredsecret

Flow secret key used to HMAC-SHA256 sign every request

FLOW_ENV
optional

Environment: 'sandbox' or 'production'. Defaults to 'sandbox'.

Available tools ยท 8

Each tool is independent โ€” your agent loads only what it needs to reduce context and response time.

WRITEcreate_payment
Create a hosted payment order (POST /payment/create). Returns url + token + flowOrder; the customer pays at url + '?token=' + token. paymentMethod 9 offers every method Flow has enabled for the merchant (Webpay, ETpay bank transfer, cash, international cards).
WRITEcreate_payment_by_email
Create a collection order Flow emails to the customer (POST /payment/createEmail). Same shape as create_payment but Flow delivers the payment link by email โ€” no checkout redirect needed.
WRITEget_payment_status
Get a payment order's status by Flow token (GET /payment/getStatus). status: 1 pending, 2 paid, 3 rejected, 4 canceled.
WRITEget_payment_status_by_commerce_id
Get a payment order's status by your commerceOrder id (GET /payment/getStatusByCommerceId).
WRITEget_payment_status_by_flow_order
Get a payment order's status by Flow order number (GET /payment/getStatusByFlowOrder).
WRITElist_payments
List payments received on a given date (GET /payment/getPayments). Paged; date is the merchant's local day.
DELETEcreate_refund
Create a refund order (POST /refund/create). Refund a received payment fully or partially; Flow notifies urlCallBack when the refund resolves.
DELETEget_refund_status
Get a refund order's status by refund token (GET /refund/getStatus). status: created, accepted, rejected, refunded, canceled.

Compatible frameworks

MCP is a protocol โ€” any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

Run `npx -y @codespar/mcp-flow-cl` and add the config block above to your MCP client โ€” Claude, Cursor, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? CodeSpar's managed tier runs it for you with auth handled.
Flow โ€” MCP server ยท 8 tools | CodeSpar