Skip to main content
Use Paycrest from Claude Code, Cursor, or VS Code through the Model Context Protocol (MCP). A small app runs on your machine, talks to the Paycrest API, and lets your AI agent create and track payment orders in plain language. You do not need Go or a local clone for normal use — only an MCP-capable client and a sender API key. For HTTP API integration (apps and backends), see Sender API Integration.

Prerequisites

  1. An MCP client — one of:
  2. A sender API key from the Paycrest dashboard (Settings → API keys)
  3. On Windows, Windows PowerShell — not Git Bash — for the install one-liner

Install the agent

The installer downloads the latest release binary to a fixed path. It configures Cursor automatically; Claude Code and VS Code are one manual step each, below.

Windows (PowerShell — not Git Bash)

Open Windows PowerShell (or Terminal → PowerShell). Do not use Git Bash for this one-liner.

macOS / Linux

What the script does

  1. Downloads the matching binary from Releases
  2. Saves it under ~/.paycrest/ with a fixed name (no manual rename)
  3. Merges a paycrest entry into Cursor’s ~/.cursor/mcp.json (unless you skip that step)
The script does not configure Claude Code or VS Code — see Connect Claude Code and Connect VS Code.Ignore the Source code (zip/tar.gz) links on the Releases page — those are source archives, not the MCP binary.

Where the config lives

All three clients run the same binary from the path above. Only the config file and its top-level key differ. You only ever need one environment variable: PAYCREST_API_KEY.

Connect Claude Code

The installer does not touch Claude Code. Add the server with one command:
Two flag-order rules, both easy to trip over:
  • -- must come before the binary path. It separates Claude Code’s own options from the command that runs the server.
  • Don’t put the server name straight after --env. --env accepts multiple KEY=value pairs, so paycrest would be read as another pair and rejected. Keep at least one other option (--transport, --scope) between them, as above.
Write out the full Windows path — %USERPROFILE% is not expanded here.

Choose a scope

Use --scope user for Paycrest — a payments agent isn’t tied to one repo.

Verify

paycrest should show ✔ Connected. Inside a Claude Code session, /mcp shows the same status and lets you inspect the server’s tools. To start over, run claude mcp remove paycrest and add it again.

Project config (.mcp.json)

If you’d rather commit the server for your whole team, add it at project scope and Claude Code writes .mcp.json in the repo root:
.mcp.json is meant to be committed. Don’t put a real sender API key in it — keep the key at user scope, or have each teammate set PAYCREST_API_KEY in their own environment.

Connect Cursor

The installer may already have done this — open ~/.cursor/mcp.json and check for a paycrest entry before editing. Typical config after install (path may match your username):

Set your API key in Cursor

Open the MCP settings (Cursor Settings → Tools & MCP) and edit the paycrest server’s JSON to replace your-sender-api-key with your key.
  1. Hover over the paycrest MCP server.
  2. Click the edit (pencil) icon.
  3. Update PAYCREST_API_KEY in the JSON with your key.

Reload MCP

After install or editing mcp.json:
  1. Open Cursor Settings → Tools & MCP, or
  2. Restart Cursor
Confirm paycrest shows as connected / no error on the server.

Connect VS Code

The installer does not touch VS Code either, and its MCP config shape differs from Cursor’s.
VS Code uses "servers" at the top level and requires "type": "stdio". Cursor and Claude Code use "mcpServers".
Open Command Palette → MCP: Open User Configuration (or MCP: Add Server for a guided flow), then add:

Keep the key out of the file

VS Code can prompt for the key instead of storing it in plain text. Use an inputs entry and reference it from env:

Start the server

  1. Open GitHub Copilot Chat.
  2. Switch chat mode to Agent.
  3. Start or enable the paycrest MCP server when VS Code prompts (or run MCP: List Servers).
  4. Try the smoke tests below.

Smoke tests

In Claude Code, Cursor Agent, or VS Code Copilot Chat (Agent mode), try:
  • “List Paycrest currencies”
  • “What’s the rate for 100 USDC on base to NGN?”
If those succeed, the MCP server and API key are working.

Order flow (create → pay → watch)

Typical flow the agent should follow:
1

Create

Create an order (on-ramp or off-ramp) via natural language.
2

Pay-in details

The agent shows pay-in details (bank / wallet / account info) and the order id.
3

Send funds

You send the funds (fiat or crypto, as instructed).
4

Confirm payment

Reply paid (or “I have paid” / “transfer confirmed”).
5

Watch until terminal

The agent runs one continuous watch until the order is settled, cancelled, refunded, or expired.
You can also use the MCP prompt “After payment — watch order” and paste the order id if the chat lost context.

Example prompts

Off-ramp (crypto → fiat):
On-ramp (fiat → crypto):
After you’ve paid:

Upgrade

  1. Quit every client running the server — exit your Claude Code sessions, quit Cursor, quit VS Code. The running MCP process holds a lock on the .exe / binary.
  2. Re-run the same install one-liner.
  3. Reconnect:
    • Claude Code — start a new session, then claude mcp list
    • CursorCursor Settings → Tools & MCP
    • VS Code — restart the paycrest server from MCP: List Servers
If a client is still running, Windows often fails with “file in use” / access denied.
Re-running the installer replaces the binary only. Your client config and API key are untouched.

Troubleshooting