Skip to main content
Glama
cryptunnel

cryptunnel-mcp

Official
by cryptunnel

cryptunnel-mcp

An MCP server that lets a coding agent - Claude Code, Cursor, anything speaking the Model Context Protocol - create and look up Cryptunnel crypto payments. Build a payment integration by prompting: "create a sandbox payment for 10 USD and give me the checkout link".

It runs on your machine over stdio, wraps the cryptunnel client, and talks to nothing but api.cryptunnel.io. No hosted service, no OAuth.

Setup

You need your merchant id and an API key, both from the merchant page in the cabinet. Node 20+.

Claude Code

claude mcp add cryptunnel \
  --env CRYPTUNNEL_MERCHANT_ID=<merchant id> \
  --env CRYPTUNNEL_API_KEY=<api key> \
  -- npx -y cryptunnel-mcp

Or, to share it with a project, in .mcp.json at the repository root:

{
  "mcpServers": {
    "cryptunnel": {
      "command": "npx",
      "args": ["-y", "cryptunnel-mcp"],
      "env": {
        "CRYPTUNNEL_MERCHANT_ID": "<merchant id>",
        "CRYPTUNNEL_API_KEY": "<api key>"
      }
    }
  }
}

Cursor

In .cursor/mcp.json (per project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "cryptunnel": {
      "command": "npx",
      "args": ["-y", "cryptunnel-mcp"],
      "env": {
        "CRYPTUNNEL_MERCHANT_ID": "<merchant id>",
        "CRYPTUNNEL_API_KEY": "<api key>"
      }
    }
  }
}

Try it

Create a sandbox payment for 10 USD for order test-1 and give me the checkout link.

The agent calls create_payment, and the link opens the checkout page listing testnet coins. If the list is empty, attach a testnet wallet to the merchant in the cabinet first - see Sandbox and faucets.

Related MCP server: @chainpayto/mcp-server

Environment

Variable

Meaning

CRYPTUNNEL_MERCHANT_ID

Your public merchant id. Required - the server exits naming it when missing

CRYPTUNNEL_API_KEY

Your API key. Required

CRYPTUNNEL_ALLOW_LIVE

Set to 1 to allow real payments. Unset by default - see below

CRYPTUNNEL_BASE_URL

Point the server at another API host, for a local backend

The live-mode gate

An agent holding a live key must not be one prompt away from a real invoice. So by default every payment this server creates is a sandbox payment: the buyer is offered testnet coins only, nothing is charged, and the payment stays out of your stats. Asking for is_test: false is refused with a message that names the variable - the payment is not silently downgraded, the agent is told why.

Set CRYPTUNNEL_ALLOW_LIVE=1 to let the agent create real payments. Even then a payment is a sandbox one unless the agent passes is_test: false explicitly.

Tools

Tool

What the agent gets

create_payment

A checkout url for a given amount and currency, keyed by your external_id

get_payment

One payment by id, with its status - deliver on confirmed or confirmed_manual

list_payments

The merchant's payments, newest first, paged

list_currencies

The currencies the merchant can receive - only those with an active wallet

Every tool returns the API response as JSON text; an API error comes back as a tool error carrying the API code, e.g. ValidationError (WALLET_NOT_FOUND): Wallet not found.

MIT licensed.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI agents to interact with multiple payment providers (Stripe, Paystack) through a unified API. Supports payment initialization, verification, refunds, customer management, and invoicing without requiring knowledge of specific provider implementations.
    2
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Accept crypto payments from AI agents: create an invoice in one call and get a hosted checkout link (USDC/USDT on Celo, Base, Arbitrum, Polygon, BSC). No API key, instant self-custody settlement.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Non-custodial payment engine for AI agents supporting BTC, ETH, USDT, USDC, XRP, XMR, and ZEC. Exposes wallet, invoice, and payment tools over MCP with per-agent spend limits, plus x402 pay-per-call support.
    42 npm
    Business Source 1.1