MCP server
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
| Variable | Used by | Default | Rule |
|---|---|---|---|
TAPPAY_SECRET_KEY | Sandbox tools | None | A sandbox secret key that starts with sk_test_. Read on every call and never stored. |
TAPPAY_SIGNING_SECRET | Sandbox tools | None | Optional. The signing secret, if your key requires signed requests. |
TAPPAY_WEBHOOK_SECRET | verify_webhook_signature | None | The secret of your sandbox webhook endpoint. |
TAPPAY_API_BASE | Sandbox tools | https://sandbox-api.tappay.mn | An https: URL, or localhost for local development. The production API host is rejected. |
TAPPAY_DOCS_URL | Docs tools | https://docs.tappay.mn | An https: URL, or localhost. |
TAPPAY_NODE_VERSION | Sandbox tools | The latest API version | Sent as the TapPay-Version header. |
TAPPAY_MCP_LOG | All tools | None | Set to debug to write logs to stderr. Keys and secrets are never logged. |
Tools
| Tool | What it does | Example prompt |
|---|---|---|
search_docs | Searches the docs. | “How do I verify a TapPay webhook?” |
read_page | Reads one docs page as Markdown. | “Read the checkout guide.” |
read_operation | Reads one API operation from OpenAPI. | “Show the request body of create invoice.” |
create_invoice | Creates an invoice in the sandbox. | “Create a sandbox invoice for 1000 MNT.” |
create_checkout_session | Creates a checkout session in the sandbox. | “Create a checkout session and give me the URL.” |
simulate_payment | Simulates a payment result in the sandbox. | “Pay that invoice in the sandbox.” |
list_events | Lists recent events. | “Which events did that payment create?” |
verify_webhook_signature | Checks 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.