novapay-mcp

novapay-mcp

MCP server for NovaPay that enables AI agents to create payment links, poll payment status, manage session lifecycle, and generate merchant keys.

Category
Visit Server

README

NovaPay MCP Server

CI npm install size license

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
MERCHANT_PRIVATE_KEY yes Merchant's private RSA key (PEM). Signs every request to NovaPay
MERCHANT_ID yes Merchant identifier in NovaPay
NOVAPAY_ENVIRONMENT yes stage β€” NovaPay test environment (api-qecom.novapay.ua), prod β€” production (api-ecom.novapay.ua)
NOVAPAY_PUBLIC_KEY 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:

  1. Connect the server without env (or with a partial env) and ask the agent to call generate_keys.
  2. Register the public key from the response with NovaPay (Acquiring3 admin panel or via support).
  3. Paste the contents of the private key file (the path is in the response, the file lives in ~/.novapay/ with 0600 permissions) into MERCHANT_PRIVATE_KEY, add MERCHANT_ID and NOVAPAY_ENVIRONMENT.
  4. 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 β†’ session id.
  • 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) β†’ session id.
  • 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 β—€β”€β”€β”€β”€β”€β”€β”˜
                                                          β–Ό
                                                        voided

Development

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.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured