Skip to main content
Glama
Cosmos Pay MCP Server

Cosmos Pay MCP Server

Official
by CosmosPay

Cosmos Pay MCP server

An MCP server for the Cosmos Pay Payments API. It lets an AI agent (Claude Code, Claude Desktop, Cursor, VS Code, Windsurf and any other MCP client) create stablecoin payment links and check payments on Stellar, Solana and Monad with your API key.

Cosmos Pay is non-custodial: a payment link is a request the customer pays from their own wallet, and the money settles on-chain straight to your address. Nothing in this server signs or moves funds.

Cosmos Pay (cosmospay.lat) is a different project from the Cosmos Network (ATOM).

Tools

Tool

What it does

Kind

create_payment_link

Create a payment request: a link (SEP-7 on Stellar, Solana Pay on Solana, EIP-681 on Monad), its QR code and a hosted checkout page

creates, moves no money

get_payment

One payment: status, amount, asset, chain, link, checkout URL and, once paid, the transaction hash

read

get_payment_history

A payment's status changes

read

list_payments

Payments, newest first, filtered by status, chain or date, paged

read

validate_payment

Check a transaction hash against a payment and settle it if it pays it

idempotent

delete_payment

Delete an unpaid payment so its link can no longer be paid

destructive

get_summary

Totals, settled volume, webhook health and a 30-day series

read

get_balances

Settled and pending amounts per asset

read

list_stellar_assets

Stellar asset codes and issuers to charge in (USDC, EURC...)

read

Each tool carries MCP annotations (readOnlyHint, destructiveHint), so your client can ask before anything that writes.

Related MCP server: Yolfi MCP Server

Setup

  1. Create a secret API key in the Cosmos Pay dashboard (API keys). Start with a dv_ key: it works on test networks with no real money. A prod_ key works on mainnet.

  2. Add the server to your MCP client with the key in its environment.

Claude Code

claude mcp add cosmos-pay --env COSMOS_PAY_API_KEY=dv_your_key -- npx -y @cosmosapp/pay_mcp

Claude Desktop, Cursor, Windsurf (claude_desktop_config.json, .cursor/mcp.json, ~/.codeium/windsurf/mcp_config.json)

{
  "mcpServers": {
    "cosmos-pay": {
      "command": "npx",
      "args": ["-y", "@cosmosapp/pay_mcp"],
      "env": { "COSMOS_PAY_API_KEY": "dv_your_key" }
    }
  }
}

VS Code (.vscode/mcp.json)

{
  "inputs": [{ "type": "promptString", "id": "cosmos-pay-key", "description": "Cosmos Pay API key", "password": true }],
  "servers": {
    "cosmos-pay": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cosmosapp/pay_mcp"],
      "env": { "COSMOS_PAY_API_KEY": "${input:cosmos-pay-key}" }
    }
  }
}

Then ask your agent things like "Create a payment link for 25 USDC on Stellar to my store's address" or "Which payments from this week are still pending?"

Configuration

Variable

COSMOS_PAY_API_KEY

Required. A secret key from the dashboard: dv_ test networks, prod_ mainnet.

COSMOS_PAY_READ_ONLY

1 offers only the tools that read (no create, validate or delete).

COSMOS_PAY_API_URL

Another Payments API root (default https://api.cosmospay.lat/cosmos-api).

COSMOS_PAY_CHECKOUT_URL

Another hosted checkout origin (default https://payments.cosmospay.lat).

Security

  • The API key is read from the environment only. It is never a tool argument, never logged and never part of a result.

  • The key decides the network: every payment the tools return names it (testnet or public), and the server tells the agent which one it is on.

  • A key's scopes limit what the server can do: create a key with only the permissions you want the agent to have, or run it read-only.

  • Payments settle to the address in the request. Check the destination an agent proposes before you share a link.

Development

npm ci
npm run typecheck && npm test && npm run build
COSMOS_PAY_API_KEY=dv_your_key npm run inspect   # MCP Inspector against the built server

Apache-2.0.

Available Tools

9 tools
delete_paymentDelete a paymentA
Destructive

Delete a payment that is not paid, so its link can no longer be paid. A paid (SUCCEEDED) payment cannot be deleted. This cannot be undone: confirm with the user first.

Inputs: id (required).

get_balancesGet settled balancesA
Read-only

Settled and pending amounts per asset for the API key’s organization (what its payments brought in, not a wallet balance).

Inputs: no named parameters.

get_paymentGet a paymentA
Read-only

Read one payment: its status (PENDING, SUBMITTED, SUCCEEDED, FAILED, CANCELLED, EXPIRED), amount, asset, chain, destination, payment link, hosted checkout URL and, once paid, the transaction hash.

Inputs: id (required).

get_payment_historyGet a payment historyA
Read-only

The status changes of one payment, oldest first, with when each happened.

Inputs: id (required).

get_summaryGet the account summaryB
Read-only

Overview of the API key’s organization: payment totals, settled volume, webhook health and a 30-day series.

Inputs: no named parameters.

list_paymentsList paymentsA
Read-only

List the payments of the API key’s organization, newest first, optionally filtered by status, chain or creation date. Paged: total says how many match.

Inputs: skip, take, chain, status, +1 more.

list_stellar_assetsList Stellar assetsA
Read-only

The Stellar asset catalog: codes and issuers to charge in (for example USDC and EURC by Circle). Use an entry’s code and issuer as create_payment_link’s asset_code and asset_issuer.

Inputs: network, verified_only.

validate_paymentValidate a paymentA
Idempotent

Check a transaction against a payment and settle it if it pays it. Use it when the payer sent the payment but its status has not changed: pass the transaction hash (or Solana signature) the payer has.

Inputs: id (required), tx_hash (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 9 tools

    Disambiguation4/5

    Each tool targets a distinct action (retrieve, list, create, validate, delete) on payments or org data. Minor overlap between get_summary and get_balances (both org-level overviews), and get_payment vs get_payment_history could occasionally be confused, but descriptions clarify the boundary.

    Naming Consistency5/5

    All tools follow a consistent snake_case verb_noun pattern: get_payment, list_payments, create_payment_link, validate_payment, delete_payment, get_summary, etc. No mixed conventions or vague verbs.

    Tool Count5/5

    Nine tools is well-scoped for a payments API, covering the full lifecycle without redundancy. Each tool earns its place with a clear, non-trivial function.

    Completeness4/5

    Create/read/list/validate/delete coverage is solid, plus summary, balances, and asset catalog. However, webhook management (referenced in get_summary's webhook health) and refunds lack dedicated tools, leaving minor gaps.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI coding agents to add stablecoin checkout, payment links, payment status checks, webhook verification, and webhook-based entitlement logic to applications. It also provides tools for workspace registration, settlement and webhook configuration, paylink creation, and crypto payment status checks.
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI coding agents to add stablecoin checkout, payment links, payment status checks, webhook verification, and webhook-based access logic to applications. It provides tools for registering workspaces, configuring settlement wallets and webhooks, creating paylinks, and verifying crypto payment status.
      MIT