Skip to content

MCP server

View as Markdown

The MCP server @tappay-mn/mcp gives an AI tool eight tools. Three tools read the docs and need no key. Four tools call the sandbox with your sandbox secret key. One tool checks a webhook signature locally, without a network call.

Install

Claude Code:

claude mcp add tappay -e TAPPAY_SECRET_KEY=sk_test_YOUR_SECRET_KEY -- npx -y @tappay-mn/mcp

Cursor, in .cursor/mcp.json, and Claude Desktop, in claude_desktop_config.json:

{
  "mcpServers": {
    "tappay": {
      "command": "npx",
      "args": ["-y", "@tappay-mn/mcp"],
      "env": { "TAPPAY_SECRET_KEY": "sk_test_YOUR_SECRET_KEY" }
    }
  }
}

Environment variables

VariableUsed byDefaultRule
TAPPAY_SECRET_KEYSandbox toolsNoneA sandbox secret key that starts with sk_test_. Read on every call and never stored.
TAPPAY_SIGNING_SECRETSandbox toolsNoneOptional. The signing secret, if your key requires signed requests.
TAPPAY_WEBHOOK_SECRETverify_webhook_signatureNoneThe secret of your sandbox webhook endpoint.
TAPPAY_API_BASESandbox toolshttps://sandbox-api.tappay.mnAn https: URL, or localhost for local development. The production API host is rejected.
TAPPAY_DOCS_URLDocs toolshttps://docs.tappay.mnAn https: URL, or localhost.
TAPPAY_NODE_VERSIONSandbox toolsThe latest API versionSent as the TapPay-Version header.
TAPPAY_MCP_LOGAll toolsNoneSet to debug to write logs to stderr. Keys and secrets are never logged.

Tools

ToolWhat it doesExample prompt
search_docsSearches the docs.“How do I verify a TapPay webhook?”
read_pageReads one docs page as Markdown.“Read the checkout guide.”
read_operationReads one API operation from OpenAPI.“Show the request body of create invoice.”
create_invoiceCreates an invoice in the sandbox.“Create a sandbox invoice for 1000 MNT.”
create_checkout_sessionCreates a checkout session in the sandbox.“Create a checkout session and give me the URL.”
simulate_paymentSimulates a payment result in the sandbox.“Pay that invoice in the sandbox.”
list_eventsLists recent events.“Which events did that payment create?”
verify_webhook_signatureChecks a webhook signature against your secret.“Is this webhook signature valid?”

Security

  • The server accepts only a sandbox secret key. It rejects a production key, a publishable key and a playground token before any network call.
  • The TapPay API also rejects a sandbox key on production and a production key on the sandbox.
  • The docs tools never read a key.
  • The server does not save keys or secrets, and it never writes them to logs or results.