novapay-mcp
OfficialNovaPay MCP Server
MCP stdio server for NovaPay on top of the official novapay SDK. Connect it to any MCP-compatible agent (Claude Desktop, Claude Code, custom agents) β and the agent can create payment links, poll payment status, drive the session lifecycle and generate merchant keys.
π ΠΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΡΡΡ ΡΠΊΡΠ°ΡΠ½ΡΡΠΊΠΎΡ
Contents Β· Requirements Β· Setup Β· Onboarding from scratch Β· Tools Β· Development Β· License
Requirements
Node.js 20.3+
Setup
Add to your MCP client config:
{
"mcpServers": {
"novapay": {
"command": "npx",
"args": ["-y", "novapay-mcp"],
"env": {
"MERCHANT_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\nMIIEvQ...\n-----END PRIVATE KEY-----",
"MERCHANT_ID": "<your merchant id>",
"NOVAPAY_ENVIRONMENT": "stage"
}
}
}
}The PEM can be pasted either with \n escapes (as in the example) or as a multi-line value β the server understands both.
Environment variables
Variable | Required | Description |
| yes | Merchant's private RSA key (PEM). Signs every request to NovaPay |
| yes | Merchant identifier in NovaPay |
| yes |
|
| no | NovaPay public key (PEM). Unused in stdio mode β the server does not receive postbacks |
The server starts without configuration too: generate_keys stays available, and the payment tools return an error listing the missing variables.
Onboarding from scratch
No keys yet? Generate them straight from the agent:
Connect the server without env (or with a partial env) and ask the agent to call
generate_keys.Register the public key from the response with NovaPay (Acquiring3 admin panel or via support).
Paste the contents of the private key file (the path is in the response, the file lives in
~/.novapay/with0600permissions) intoMERCHANT_PRIVATE_KEY, addMERCHANT_IDandNOVAPAY_ENVIRONMENT.Restart the MCP server β the payment tools go live.
The private key is never returned in a tool response β only the file path, so the key never lands in the agent's context or logs.
Tools
Onboarding
generate_keysβ generate a 2048-bit RSA pair for the merchant. Works without configuration.
Creating payments (a session can hold several payments)
create_acquiring_sessionβ create an Internet Acquiring session β sessionid.add_acquiring_paymentβ add a payment to the session β payment URL for the customer.create_checkout_sessionβ create a Checkout session (payment + Nova Poshta delivery) β sessionid.add_checkout_paymentβ add a payment to a checkout session β payment URL.
Both add_*_payment require an explicit use_hold: true β hold the funds for a later capture via complete_hold, false β charge immediately. If the user did not say which, the agent should ask.
Session lifecycle (shared by acquiring and checkout)
get_session_statusβ session status, amounts, list of operations. The only way to see the result of the operations below.complete_holdβ capture the held funds (possibly partially).void_sessionβ cancel a paid/held session. On a paid session this refunds real money.expire_sessionβ invalidate an unpaid session (cancel the payment link).
create_*_session βββΆ add_*_payment βββΆ url
β
customer pays
ββ use_hold: true βββΆ holded ββcomplete_holdβββΆ paid
ββ use_hold: false βββββββββββββββββββββββββββΆ paid
β
unpaid ββexpire_sessionβββΆ expired void_session ββββββββ
βΌ
voidedDevelopment
npm install
npm test # tsc --noEmit + node:test
npm run build # tsc β dist/A smoke test against the NovaPay stage environment is possible with the published QE keys (merchant 2) from the Authentication page.
CI runs the same checks on Node 20, 22 and 24 for every push and pull request; pushing a v* tag publishes the package to npm.