liqpay-mcp-server 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 serhiizghama
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,189 @@
1
+ <p align="center">
2
+ <img src="https://www.liqpay.ua/logo_liqpay.svg" alt="LiqPay" width="200" />
3
+ </p>
4
+
5
+ <h1 align="center">liqpay-mcp-server</h1>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/liqpay-mcp-server"><img src="https://img.shields.io/npm/v/liqpay-mcp-server" alt="npm version" /></a>
9
+ <a href="https://github.com/serhiizghama/liqpay-mcp/actions/workflows/ci.yml"><img src="https://github.com/serhiizghama/liqpay-mcp/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
10
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
11
+ <a href="https://nodejs.org"><img src="https://img.shields.io/node/v/liqpay-mcp-server" alt="Node version" /></a>
12
+ <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-blue" alt="MCP compatible" /></a>
13
+ <a href="https://github.com/serhiizghama/liqpay-mcp"><img src="https://img.shields.io/github/stars/serhiizghama/liqpay-mcp?style=social" alt="GitHub stars" /></a>
14
+ </p>
15
+
16
+ MCP server for the [LiqPay](https://www.liqpay.ua/) payment gateway — Ukraine's dominant payment platform operated by PrivatBank.
17
+
18
+ Exposes 11 tools for payments, holds, refunds, subscriptions, payouts, and webhook verification to AI agents and LLM workflows via the [Model Context Protocol](https://modelcontextprotocol.io/).
19
+
20
+ ## Features
21
+
22
+ - **11 tools** covering the full LiqPay API: payments, holds, refunds, subscriptions, P2P payouts, webhooks
23
+ - **PCI DSS safe** — hosted checkout keeps card data on LiqPay's side
24
+ - **2-step hold flow** — freeze funds first, capture or cancel later
25
+ - **Recurring subscriptions** — daily, weekly, monthly, yearly billing cycles
26
+ - **Webhook verification** — SHA-1 signature validation for incoming callbacks
27
+ - **Truncation protection** — large report responses are automatically truncated with guidance
28
+ - **TypeScript** — full type safety, strict mode, zero `any`
29
+ - **Zero extra dependencies** — uses Node.js built-in `crypto` and native `fetch`
30
+
31
+ ## Quick Start
32
+
33
+ ### Claude Desktop
34
+
35
+ Add to your `claude_desktop_config.json`:
36
+
37
+ **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
38
+ **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
39
+
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "liqpay": {
44
+ "command": "npx",
45
+ "args": ["-y", "liqpay-mcp-server"],
46
+ "env": {
47
+ "LIQPAY_PUBLIC_KEY": "your_public_key",
48
+ "LIQPAY_PRIVATE_KEY": "your_private_key"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ ### VS Code / Cursor
56
+
57
+ [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0078d4?logo=visualstudiocode)](https://insiders.vscode.dev/redirect/mcp/install?name=liqpay&inputs=%5B%7B%22id%22%3A%22publicKey%22%2C%22description%22%3A%22LiqPay%20Public%20Key%22%2C%22type%22%3A%22promptString%22%7D%2C%7B%22id%22%3A%22privateKey%22%2C%22description%22%3A%22LiqPay%20Private%20Key%22%2C%22type%22%3A%22promptString%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22liqpay-mcp-server%22%5D%2C%22env%22%3A%7B%22LIQPAY_PUBLIC_KEY%22%3A%22%24%7Binput%3ApublicKey%7D%22%2C%22LIQPAY_PRIVATE_KEY%22%3A%22%24%7Binput%3AprivateKey%7D%22%7D%7D)
58
+
59
+ Or add to `.vscode/mcp.json` / `.cursor/mcp.json` manually:
60
+
61
+ ```json
62
+ {
63
+ "servers": {
64
+ "liqpay": {
65
+ "command": "npx",
66
+ "args": ["-y", "liqpay-mcp-server"],
67
+ "env": {
68
+ "LIQPAY_PUBLIC_KEY": "your_public_key",
69
+ "LIQPAY_PRIVATE_KEY": "your_private_key"
70
+ }
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ ### Claude Code (CLI)
77
+
78
+ Add to `~/.claude/settings.json` (global) or `.claude/settings.json` (project):
79
+
80
+ ```json
81
+ {
82
+ "mcpServers": {
83
+ "liqpay": {
84
+ "command": "npx",
85
+ "args": ["-y", "liqpay-mcp-server"],
86
+ "env": {
87
+ "LIQPAY_PUBLIC_KEY": "your_public_key",
88
+ "LIQPAY_PRIVATE_KEY": "your_private_key"
89
+ }
90
+ }
91
+ }
92
+ }
93
+ ```
94
+
95
+ ## Prerequisites
96
+
97
+ - Node.js >= 18
98
+ - LiqPay merchant account — get your keys at [liqpay.ua/en/adminbusiness](https://www.liqpay.ua/en/adminbusiness)
99
+
100
+ ## Tools
101
+
102
+ | Tool | Description | Annotations |
103
+ |------|-------------|-------------|
104
+ | `liqpay_create_checkout_url` | Generate a hosted checkout URL (PCI DSS safe) | `idempotent` `open-world` |
105
+ | `liqpay_get_payment_status` | Fetch payment status by order ID | `read-only` `idempotent` `open-world` |
106
+ | `liqpay_get_payments_list` | List payments by date range (max 31 days) | `read-only` `idempotent` `open-world` |
107
+ | `liqpay_create_hold` | Pre-authorize funds on a card (2-step) | `open-world` |
108
+ | `liqpay_complete_hold` | Capture previously held funds | `destructive` `open-world` |
109
+ | `liqpay_cancel_hold` | Release held funds back to payer | `destructive` `idempotent` `open-world` |
110
+ | `liqpay_create_refund` | Refund a completed payment (full/partial) | `destructive` `open-world` |
111
+ | `liqpay_create_subscription` | Create recurring subscription via checkout | `idempotent` `open-world` |
112
+ | `liqpay_cancel_subscription` | Cancel an active subscription | `destructive` `idempotent` `open-world` |
113
+ | `liqpay_create_payout` | P2P transfer to a card | `destructive` `open-world` |
114
+ | `liqpay_verify_callback` | Validate incoming webhook signature | `read-only` `idempotent` |
115
+
116
+ ## Environment Variables
117
+
118
+ | Variable | Required | Description |
119
+ |----------|----------|-------------|
120
+ | `LIQPAY_PUBLIC_KEY` | Yes | Merchant public key from LiqPay dashboard |
121
+ | `LIQPAY_PRIVATE_KEY` | Yes | Merchant private key from LiqPay dashboard |
122
+
123
+ ## Rate Limits
124
+
125
+ | Scope | Limit |
126
+ |-------|-------|
127
+ | All API requests | ~100 req/min per merchant account |
128
+ | Reports (`liqpay_get_payments_list`) | Max 31-day date range per request |
129
+ | Checkout URL generation | No limit — computed locally, no API call |
130
+ | Webhook verification | No limit — computed locally, no API call |
131
+
132
+ ## Docker
133
+
134
+ ```bash
135
+ docker build -t liqpay-mcp-server .
136
+ docker run -e LIQPAY_PUBLIC_KEY=your_key -e LIQPAY_PRIVATE_KEY=your_secret liqpay-mcp-server
137
+ ```
138
+
139
+ Or with docker-compose:
140
+
141
+ ```yaml
142
+ services:
143
+ liqpay-mcp:
144
+ build: .
145
+ environment:
146
+ LIQPAY_PUBLIC_KEY: your_key
147
+ LIQPAY_PRIVATE_KEY: your_secret
148
+ ```
149
+
150
+ ## Development
151
+
152
+ ```bash
153
+ # Install dependencies
154
+ npm install
155
+
156
+ # Run in dev mode (auto-reload)
157
+ npm run dev
158
+
159
+ # Build
160
+ npm run build
161
+
162
+ # Run tests
163
+ npm test
164
+
165
+ # Test with MCP Inspector
166
+ LIQPAY_PUBLIC_KEY=test LIQPAY_PRIVATE_KEY=test \
167
+ npx @modelcontextprotocol/inspector node dist/index.js
168
+ ```
169
+
170
+ See [docs/SANDBOX_TESTING.md](./docs/SANDBOX_TESTING.md) for testing without real money.
171
+
172
+ ## Documentation
173
+
174
+ | Document | Description |
175
+ |----------|-------------|
176
+ | [docs/AGENT_SETUP.md](./docs/AGENT_SETUP.md) | Instructions for AI agents to install and configure this server |
177
+ | [docs/API_REFERENCE.md](./docs/API_REFERENCE.md) | Complete tool reference with request/response examples |
178
+ | [docs/SANDBOX_TESTING.md](./docs/SANDBOX_TESTING.md) | How to test with LiqPay sandbox (no real money) |
179
+
180
+ ## Security
181
+
182
+ - LiqPay API signature uses SHA-1: `base64(sha1(private_key + data + private_key))`
183
+ - Private keys are never logged or included in tool responses
184
+ - `liqpay_create_hold` and `liqpay_create_payout` accept raw card numbers — ensure PCI DSS compliance
185
+ - For most payment use cases, prefer `liqpay_create_checkout_url` which handles card data on LiqPay's side
186
+
187
+ ## License
188
+
189
+ [MIT](./LICENSE)
package/dist/auth.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export declare function createSignature(data: string, privateKey: string): string;
2
+ export declare function encodeData(payload: Record<string, unknown>): string;
3
+ export declare function decodeData(data: string): Record<string, unknown>;
package/dist/auth.js ADDED
@@ -0,0 +1,13 @@
1
+ import { createHash } from "node:crypto";
2
+ export function createSignature(data, privateKey) {
3
+ return createHash("sha1")
4
+ .update(privateKey + data + privateKey)
5
+ .digest("base64");
6
+ }
7
+ export function encodeData(payload) {
8
+ return Buffer.from(JSON.stringify(payload)).toString("base64");
9
+ }
10
+ export function decodeData(data) {
11
+ return JSON.parse(Buffer.from(data, "base64").toString("utf-8"));
12
+ }
13
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,UAAkB;IAC9D,OAAO,UAAU,CAAC,MAAM,CAAC;SACtB,MAAM,CAAC,UAAU,GAAG,IAAI,GAAG,UAAU,CAAC;SACtC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAgC;IACzD,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAA4B,CAAC;AAC9F,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { LiqPayResponse } from "./types.js";
2
+ export declare class LiqPayClient {
3
+ private readonly publicKey;
4
+ private readonly privateKey;
5
+ constructor(publicKey: string, privateKey: string);
6
+ request<T = LiqPayResponse>(params: Record<string, unknown>): Promise<T>;
7
+ buildCheckoutUrl(params: Record<string, unknown>): string;
8
+ }
package/dist/client.js ADDED
@@ -0,0 +1,44 @@
1
+ import { createSignature, encodeData } from "./auth.js";
2
+ import { LIQPAY_API_URL, LIQPAY_API_VERSION, LIQPAY_CHECKOUT_URL } from "./constants.js";
3
+ import { formatHttpError, formatLiqPayError } from "./errors.js";
4
+ export class LiqPayClient {
5
+ publicKey;
6
+ privateKey;
7
+ constructor(publicKey, privateKey) {
8
+ this.publicKey = publicKey;
9
+ this.privateKey = privateKey;
10
+ }
11
+ async request(params) {
12
+ const payload = {
13
+ ...params,
14
+ version: LIQPAY_API_VERSION,
15
+ public_key: this.publicKey,
16
+ };
17
+ const data = encodeData(payload);
18
+ const signature = createSignature(data, this.privateKey);
19
+ const response = await fetch(LIQPAY_API_URL, {
20
+ method: "POST",
21
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
22
+ body: new URLSearchParams({ data, signature }).toString(),
23
+ });
24
+ if (!response.ok) {
25
+ throw new Error(formatHttpError(response.status));
26
+ }
27
+ const result = (await response.json());
28
+ if (result.status === "error" || result.err_code) {
29
+ throw new Error(formatLiqPayError(result.err_code, result.err_description));
30
+ }
31
+ return result;
32
+ }
33
+ buildCheckoutUrl(params) {
34
+ const payload = {
35
+ ...params,
36
+ version: LIQPAY_API_VERSION,
37
+ public_key: this.publicKey,
38
+ };
39
+ const data = encodeData(payload);
40
+ const signature = createSignature(data, this.privateKey);
41
+ return `${LIQPAY_CHECKOUT_URL}?data=${encodeURIComponent(data)}&signature=${encodeURIComponent(signature)}`;
42
+ }
43
+ }
44
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGjE,MAAM,OAAO,YAAY;IAEJ;IACA;IAFnB,YACmB,SAAiB,EACjB,UAAkB;QADlB,cAAS,GAAT,SAAS,CAAQ;QACjB,eAAU,GAAV,UAAU,CAAQ;IAClC,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAqB,MAA+B;QAC/D,MAAM,O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AAS,kBAAkB,CAAC,IAAI,CAAC,cAAc,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC;IAC9G,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ export declare const LIQPAY_API_URL = "https://www.liqpay.ua/api/request";
2
+ export declare const LIQPAY_CHECKOUT_URL = "https://www.liqpay.ua/api/3/checkout";
3
+ export declare const LIQPAY_API_VERSION = 3;
4
+ export declare const CHARACTER_LIMIT = 25000;
5
+ export declare const SUPPORTED_CURRENCIES: readonly ["UAH", "USD", "EUR"];
6
+ export type SupportedCurrency = (typeof SUPPORTED_CURRENCIES)[number];
7
+ export declare const LIQPAY_STATUSES: readonly ["success", "failure", "error", "wait_accept", "processing", "reversed", "hold_wait", "sandbox", "subscribed", "unsubscribed"];
8
+ export type LiqPayStatus = (typeof LIQPAY_STATUSES)[number];
9
+ export declare const LIQPAY_ACTIONS: {
10
+ readonly PAY: "pay";
11
+ readonly HOLD: "hold";
12
+ readonly HOLD_COMPLETION: "hold_completion";
13
+ readonly SUBSCRIBE: "subscribe";
14
+ readonly UNSUBSCRIBE: "unsubscribe";
15
+ readonly REFUND: "refund";
16
+ readonly STATUS: "status";
17
+ readonly REPORTS: "reports";
18
+ readonly P2P: "p2p";
19
+ };
20
+ export type LiqPayAction = (typeof LIQPAY_ACTIONS)[keyof typeof LIQPAY_ACTIONS];
21
+ export declare const SUBSCRIBE_PERIODICITIES: readonly ["day", "week", "month", "year"];
22
+ export type SubscribePeriodicity = (typeof SUBSCRIBE_PERIODICITIES)[number];
@@ -0,0 +1,30 @@
1
+ export const LIQPAY_API_URL = "https://www.liqpay.ua/api/request";
2
+ export const LIQPAY_CHECKOUT_URL = "https://www.liqpay.ua/api/3/checkout";
3
+ export const LIQPAY_API_VERSION = 3;
4
+ export const CHARACTER_LIMIT = 25000;
5
+ export const SUPPORTED_CURRENCIES = ["UAH", "USD", "EUR"];
6
+ export const LIQPAY_STATUSES = [
7
+ "success",
8
+ "failure",
9
+ "error",
10
+ "wait_accept",
11
+ "processing",
12
+ "reversed",
13
+ "hold_wait",
14
+ "sandbox",
15
+ "subscribed",
16
+ "unsubscribed",
17
+ ];
18
+ export const LIQPAY_ACTIONS = {
19
+ PAY: "pay",
20
+ HOLD: "hold",
21
+ HOLD_COMPLETION: "hold_completion",
22
+ SUBSCRIBE: "subscribe",
23
+ UNSUBSCRIBE: "unsubscribe",
24
+ REFUND: "refund",
25
+ STATUS: "status",
26
+ REPORTS: "reports",
27
+ P2P: "p2p",
28
+ };
29
+ export const SUBSCRIBE_PERIODICITIES = ["day", "week", "month", "year"];
30
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,mCAAmC,CAAC;AAClE,MAAM,CAAC,MAAM,mBAAmB,GAAG,sCAAsC,CAAC;AAC1E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAEpC,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AAErC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAGnE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,SAAS;IACT,SAAS;IACT,OAAO;IACP,aAAa;IACb,YAAY;IACZ,UAAU;IACV,WAAW;IACX,SAAS;IACT,YAAY;IACZ,cAAc;CACN,CAAC;AAGX,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,eAAe,EAAE,iBAAiB;IAClC,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,KAAK;CACF,CAAC;AAGX,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function formatLiqPayError(errCode: string | undefined, errDescription: string | undefined): string;
2
+ export declare function formatHttpError(status: number): string;
package/dist/errors.js ADDED
@@ -0,0 +1,41 @@
1
+ export function formatLiqPayError(errCode, errDescription) {
2
+ if (!errCode) {
3
+ return "Error: LiqPay returned an unexpected error. Retry the request or check the order_id.";
4
+ }
5
+ const base = `Error [${errCode}]: ${errDescription ?? "Unknown error"}`;
6
+ switch (errCode) {
7
+ case "err_auth":
8
+ return `${base}. Check that LIQPAY_PUBLIC_KEY and LIQPAY_PRIVATE_KEY are correct.`;
9
+ case "err_payment":
10
+ return `${base}. The payment could not be processed — verify amount, currency, and card details.`;
11
+ case "err_limit":
12
+ return `${base}. Transaction limit exceeded — try a smaller amount or contact LiqPay support.`;
13
+ case "err_signature":
14
+ return `${base}. Signature mismatch — this usually means the private key is wrong.`;
15
+ case "err_shop_not_active":
16
+ return `${base}. The merchant account is not active — check your LiqPay dashboard.`;
17
+ case "err_order_id":
18
+ return `${base}. Invalid or duplicate order_id — use a unique identifier for each transaction.`;
19
+ case "err_refund":
20
+ return `${base}. Refund failed — ensure the original payment status is 'success' and the amount does not exceed the original.`;
21
+ default:
22
+ return `${base}. See LiqPay documentation for error code '${errCode}'.`;
23
+ }
24
+ }
25
+ export function formatHttpError(status) {
26
+ switch (status) {
27
+ case 401:
28
+ return "Error: Authentication failed. Check LIQPAY_PUBLIC_KEY and LIQPAY_PRIVATE_KEY.";
29
+ case 403:
30
+ return "Error: Access denied. Your merchant account may lack permissions for this action.";
31
+ case 429:
32
+ return "Error: Rate limit exceeded. Wait before making more requests.";
33
+ case 500:
34
+ case 502:
35
+ case 503:
36
+ return `Error: LiqPay server error (HTTP ${status}). Retry after a short delay.`;
37
+ default:
38
+ return `Error: LiqPay API returned HTTP ${status}.`;
39
+ }
40
+ }
41
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB,CAAC,OAA2B,EAAE,cAAkC;IAC/F,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,sFAAsF,CAAC;IAChG,CAAC;IAED,MAAM,IAAI,GAAG,UAAU,OAAO,MAAM,cAAc,IAAI,eAAe,EAAE,CAAC;IAExE,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,UAAU;YACb,OAAO,GAAG,IAAI,oEAAoE,CAAC;QACrF,KAAK,aAAa;YAChB,OAAO,GAAG,IAAI,mFAAmF,CAAC;QACpG,KAAK,WAAW;YACd,OAAO,GAAG,IAAI,gFAAgF,CAAC;QACjG,KAAK,eAAe;YAClB,OAAO,GAAG,IAAI,qEAAqE,CAAC;QACtF,KAAK,qBAAqB;YACxB,OAAO,GAAG,IAAI,qEAAqE,CAAC;QACtF,KAAK,cAAc;YACjB,OAAO,GAAG,IAAI,iFAAiF,CAAC;QAClG,KAAK,YAAY;YACf,OAAO,GAAG,IAAI,gHAAgH,CAAC;QACjI;YACE,OAAO,GAAG,IAAI,8CAA8C,OAAO,IAAI,CAAC;IAC5E,CAAC;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,MAAc;IAC5C,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,GAAG;YACN,OAAO,+EAA+E,CAAC;QACzF,KAAK,GAAG;YACN,OAAO,mFAAmF,CAAC;QAC7F,KAAK,GAAG;YACN,OAAO,+DAA+D,CAAC;QACzE,KAAK,GAAG,CAAC;QACT,KAAK,GAAG,CAAC;QACT,KAAK,GAAG;YACN,OAAO,oCAAoC,MAAM,+BAA+B,CAAC;QACnF;YACE,OAAO,mCAAmC,MAAM,GAAG,CAAC;IACxD,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { LiqPayClient } from "./client.js";
5
+ import { registerPaymentTools } from "./tools/payments.js";
6
+ import { registerReportTools } from "./tools/reports.js";
7
+ import { registerRefundTools } from "./tools/refunds.js";
8
+ import { registerWebhookTools } from "./tools/webhooks.js";
9
+ import { registerHoldTools } from "./tools/holds.js";
10
+ import { registerSubscriptionTools } from "./tools/subscriptions.js";
11
+ import { registerPayoutTools } from "./tools/payouts.js";
12
+ const publicKey = process.env["LIQPAY_PUBLIC_KEY"];
13
+ const privateKey = process.env["LIQPAY_PRIVATE_KEY"];
14
+ if (!publicKey || !privateKey) {
15
+ console.error("Error: LIQPAY_PUBLIC_KEY and LIQPAY_PRIVATE_KEY environment variables are required.\n" +
16
+ "Get your keys at https://www.liqpay.ua/en/adminbusiness");
17
+ process.exit(1);
18
+ }
19
+ const client = new LiqPayClient(publicKey, privateKey);
20
+ const server = new McpServer({
21
+ name: "liqpay-mcp-server",
22
+ version: "1.0.0",
23
+ }, {
24
+ instructions: "LiqPay payment gateway integration for Ukrainian e-commerce. " +
25
+ "Supports payments, holds, refunds, subscriptions, payouts, and webhook verification. " +
26
+ "Requires LIQPAY_PUBLIC_KEY and LIQPAY_PRIVATE_KEY environment variables. " +
27
+ "All monetary amounts are in currency units (e.g. 99.99 for ₴99.99). " +
28
+ "Use liqpay_create_checkout_url for PCI-safe payments via hosted page. " +
29
+ "Use liqpay_get_payment_status to check payment results. " +
30
+ "Use liqpay_verify_callback to validate incoming webhooks.",
31
+ });
32
+ registerPaymentTools(server, client);
33
+ registerReportTools(server, client);
34
+ registerRefundTools(server, client);
35
+ registerWebhookTools(server, privateKey);
36
+ registerHoldTools(server, client);
37
+ registerSubscriptionTools(server, client);
38
+ registerPayoutTools(server, client);
39
+ const transport = new StdioServerTransport();
40
+ await server.connect(transport);
41
+ //# sourceMapping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F,CAAC;AAEF,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACrC,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACpC,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACpC,oBAAoB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AACzC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAClC,yBAAyB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { LiqPayClient } from "../client.js";
3
+ export declare function registerHoldTools(server: McpServer, client: LiqPayClient): void;
@@ -0,0 +1,147 @@
1
+ import { z } from "zod";
2
+ export function registerHoldTools(server, client) {
3
+ server.registerTool("liqpay_create_hold", {
4
+ title: "Create LiqPay Hold",
5
+ description: "Pre-authorize (freeze) funds on the payer's card without capturing them (action: hold). " +
6
+ "Use when you need a 2-step payment: reserve first, charge later. " +
7
+ "Do not use if the merchant is not PCI DSS compliant — use liqpay_create_checkout_url instead. " +
8
+ "Returns { payment_id, status, amount, currency }.",
9
+ inputSchema: {
10
+ amount: z.number().positive().describe("Amount to hold in currency units (e.g. 250.00)"),
11
+ currency: z.enum(["UAH", "USD", "EUR"]).describe("ISO 4217 currency code"),
12
+ description: z.string().min(1).max(500).describe("Payment description shown to payer (max 500 chars, e.g. 'Order #42 — iPhone case')"),
13
+ order_id: z.string().min(1).describe("Unique order ID in your system (e.g. 'hold-2026-001')"),
14
+ card: z.string().regex(/^\d{16}$/).describe("Payer's card number — exactly 16 digits (e.g. '4111111111111111')"),
15
+ card_exp_month: z.string().regex(/^(0[1-9]|1[0-2])$/).describe("Card expiry month in MM format (e.g. '03')"),
16
+ card_exp_year: z.string().regex(/^\d{2}$/).describe("Card expiry year in YY format (e.g. '29')"),
17
+ card_cvv: z.string().regex(/^\d{3,4}$/).describe("Card CVV code — 3 or 4 digits (e.g. '123')"),
18
+ },
19
+ outputSchema: {
20
+ payment_id: z.number().describe("LiqPay internal payment ID"),
21
+ status: z.string().describe("Hold status (e.g. hold_wait)"),
22
+ amount: z.number().describe("Held amount"),
23
+ currency: z.string().describe("ISO 4217 currency code"),
24
+ },
25
+ annotations: {
26
+ readOnlyHint: false,
27
+ destructiveHint: false,
28
+ idempotentHint: false,
29
+ openWorldHint: true,
30
+ },
31
+ }, async ({ amount, currency, description, order_id, card, card_exp_month, card_exp_year, card_cvv }) => {
32
+ try {
33
+ const result = await client.request({
34
+ action: "hold",
35
+ amount,
36
+ currency,
37
+ description,
38
+ order_id,
39
+ card,
40
+ card_exp_month,
41
+ card_exp_year,
42
+ card_cvv,
43
+ });
44
+ const output = {
45
+ payment_id: result.payment_id,
46
+ status: result.status,
47
+ amount: result.amount,
48
+ currency: result.currency,
49
+ };
50
+ return {
51
+ content: [{ type: "text", text: JSON.stringify(output, null, 2) }],
52
+ structuredContent: output,
53
+ };
54
+ }
55
+ catch (error) {
56
+ return {
57
+ content: [{ type: "text", text: error instanceof Error ? error.message : String(error) }],
58
+ isError: true,
59
+ };
60
+ }
61
+ });
62
+ server.registerTool("liqpay_complete_hold", {
63
+ title: "Complete LiqPay Hold",
64
+ description: "Capture previously held funds — completes the 2-step payment (action: hold_completion). " +
65
+ "Use after liqpay_create_hold to actually charge the frozen amount. " +
66
+ "Do not use if the hold has already been cancelled — it will return an error. " +
67
+ "Returns { status, payment_id }.",
68
+ inputSchema: {
69
+ order_id: z.string().min(1).describe("Order ID from the original liqpay_create_hold call (e.g. 'hold-2026-001')"),
70
+ amount: z.number().positive().optional().describe("Partial capture amount ≤ held amount (e.g. 150.00); omit for full capture"),
71
+ },
72
+ outputSchema: {
73
+ status: z.string().describe("Capture status (e.g. success, error)"),
74
+ payment_id: z.number().describe("LiqPay internal payment ID"),
75
+ },
76
+ annotations: {
77
+ readOnlyHint: false,
78
+ destructiveHint: true,
79
+ idempotentHint: false,
80
+ openWorldHint: true,
81
+ },
82
+ }, async ({ order_id, amount }) => {
83
+ try {
84
+ const params = { action: "hold_completion", order_id };
85
+ if (amount !== undefined)
86
+ params["amount"] = amount;
87
+ const result = await client.request(params);
88
+ const output = {
89
+ status: result.status,
90
+ payment_id: result.payment_id,
91
+ };
92
+ return {
93
+ content: [{ type: "text", text: JSON.stringify(output, null, 2) }],
94
+ structuredContent: output,
95
+ };
96
+ }
97
+ catch (error) {
98
+ return {
99
+ content: [{ type: "text", text: error instanceof Error ? error.message : String(error) }],
100
+ isError: true,
101
+ };
102
+ }
103
+ });
104
+ server.registerTool("liqpay_cancel_hold", {
105
+ title: "Cancel LiqPay Hold",
106
+ description: "Release held funds back to payer without capture (action: hold_completion with flag). " +
107
+ "Use to cancel a previously created hold when the order is no longer needed. " +
108
+ "Do not use if funds have already been captured via liqpay_complete_hold. " +
109
+ "Returns { status, payment_id }.",
110
+ inputSchema: {
111
+ order_id: z.string().min(1).describe("Order ID from the original liqpay_create_hold call (e.g. 'hold-2026-001')"),
112
+ },
113
+ outputSchema: {
114
+ status: z.string().describe("Reversal status (e.g. reversed)"),
115
+ payment_id: z.number().describe("LiqPay internal payment ID"),
116
+ },
117
+ annotations: {
118
+ readOnlyHint: false,
119
+ destructiveHint: true,
120
+ idempotentHint: true,
121
+ openWorldHint: true,
122
+ },
123
+ }, async ({ order_id }) => {
124
+ try {
125
+ const result = await client.request({
126
+ action: "hold_completion",
127
+ order_id,
128
+ flag: "reversal",
129
+ });
130
+ const output = {
131
+ status: result.status,
132
+ payment_id: result.payment_id,
133
+ };
134
+ return {
135
+ content: [{ type: "text", text: JSON.stringify(output, null, 2) }],
136
+ structuredContent: output,
137
+ };
138
+ }
139
+ catch (error) {
140
+ return {
141
+ content: [{ type: "text", text: error instanceof Error ? error.message : String(error) }],
142
+ isError: true,
143
+ };
144
+ }
145
+ });
146
+ }
147
+ //# sourceMappingURL=holds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"holds.js","sourceRoot":"","sources":["../../src/tools/holds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,MAAoB;IACvE,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACT,0FAA0F;YAC1F,mEAAmE;YACnE,gGAAgG;YAChG,mDAAmD;QACrD,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;YACxF,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC;YAC1E,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,oFAAoF,CAAC;YACtI,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,uDAAuD,CAAC;YAC7F,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,mEAAmE,CAAC;YAChH,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,QAAQ,CAAC,4CAA4C,CAAC;YAC5G,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,2CAA2C,CAA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AAE,IAAI;YACrB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;KACF,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QACrB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAiB;gBAClD,MAAM,EAAE,iBAAiB;gBACzB,QAAQ;gBACR,IAAI,EAAE,UAAU;aACjB,CAAC,CAAC;YAEH,MAAM,MAAM,GAAG;gBACb,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,UAAU,EAAE,MAAM,CAAC,UAAU;aAC9B,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;gBAC3E,iBAAiB,EAAE,MAAM;aAC1B,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;gBAClG,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { LiqPayClient } from "../client.js";
3
+ export declare function registerPaymentTools(server: McpServer, client: LiqPayClient): void;