MCP Server

ApiPay for your AI agents

The official ApiPay MCP server lets AI assistants create payment links, manage Commerce products, look up transactions, manage webhooks, and query metrics β€” right inside Claude, Cursor, Codex, Command Code, Grok Build, Gemini, and more.

Works with: Claude Desktop Β· Claude Code Β· Cursor Β· Codex Β· Command Code Β· Grok Build +12

apipay β€” mcp
$ npx -y @apipay.vn/mcp
apipay-mcp listening on stdio

23

Tools

18

Clients

stdio

Local

MIT

License

01

Why use MCP

01

Natural language β†’ actions

Ask in plain language and the agent calls the right API β€” create payment links, check transactions, update webhooks without writing code.

02

Safe sandbox

Test end-to-end with ak_test_ keys and simulated sandbox payments before anything goes live.

03

Real-time data

Query transactions, overview metrics, and webhook delivery history from the same live API you already use.

04

Local & key-secure

The server runs over stdio on your machine; credentials are passed as environment variables and never stored.

02

23 tools in the server

Every tool is available to your agent the moment it connects.

03

Start in 3 steps

From a fresh account to your first AI-created payment β€” in minutes.

01

Create API keys

Go to Dashboard β†’ Integrations β†’ API Keys and create a key pair. Test keys start with ak_test_, live keys with ak_live_.

02

Install & configure

Run npx -y @apipay.vn/mcp in your MCP client and paste the matching config below.

03

Ask in natural language

Ask your agent "Create a 50,000 VND payment link for my MB account" β€” it calls the tools and returns the result.

Client configuration

Pick your client and paste the matching configuration.

claude_desktop_config.json
{
  "mcpServers": {
    "apipay": {
      "command": "npx",
      "args": [
        "-y",
        "@apipay.vn/mcp"
      ],
      "env": {
        "APIPAY_ACCESS_KEY": "ak_test_your_access_key",
        "APIPAY_SECRET_KEY": "your_secret_key"
      }
    }
  }
}

04

Things you can ask

A few realistic prompts to get started β€” try them in your agent.

01

Create a 50,000 VND payment link for a customer with content "Order #1024" on my MB account, and register a webhook to https://shop.example/hooks/payment

02

Create a product "Pro Plan" at 99,000 VND with lookupKey pro-monthly, then create a payment link from that price on my MB account

03

Give me a 7-day overview: total volume, transaction count, and success rate

04

List active webhooks and resend any failed deliveries in the last 24 hours

05

Cancel payment request pr_test_8x2k because the customer cancelled their order

06

List my connected bank accounts and today's total volume broken down by bank

The agent replies
βœ… Payment link created
β€’ ID: pr_test_9f3k...
β€’ Amount: 50,000 VND
β€’ Status: ACTIVE
Webhook registered to https://shop.example/hooks/payment β€” transactions will be sent the moment the customer transfers.

05

Security

API keys are passed as environment variables (APIPAY_ACCESS_KEY / APIPAY_SECRET_KEY); the server never stores credentials.

Sandbox is isolated: ak_test_ keys can only touch test resources β€” simulated payments never involve real money.

The server runs locally over stdio, connecting directly from your machine to the ApiPay API.

⚠ Destructive tools

A few tools permanently change state and require explicit agent confirmation before running: cancel_payment, remove_webhook, resend_webhook.

06

Frequently asked questions

Start with the sandbox now

Install the MCP server, use a test key, and let your AI agent create the first payment in minutes.