pinelabs-mcp 1.0.0 → 1.0.1
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/README.md +20 -143
- package/package.json +2 -2
- package/src/commands/configure.js +2 -2
- package/src/commands/help.js +1 -1
- package/src/commands/setup.js +2 -2
- package/src/commands/status.js +3 -3
- package/src/commands/test.js +3 -3
- package/src/config.js +6 -6
package/README.md
CHANGED
|
@@ -2,22 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
MCP client for Pine Labs payment gateway — connect Claude Desktop, Cursor, VS Code, and other AI assistants to Pine Labs payment APIs using your client credentials.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
This package connects your AI coding assistant to the Pine Labs MCP (Model Context Protocol) server. Once connected, your AI assistant can:
|
|
8
|
-
|
|
9
|
-
- Create and manage payment links
|
|
10
|
-
- Process card payments and UPI transactions
|
|
11
|
-
- Handle orders, refunds, and settlements
|
|
12
|
-
- Search transactions and retrieve payment details
|
|
13
|
-
- Generate and validate OTPs
|
|
14
|
-
|
|
15
|
-
No server setup required. Just install, configure your credentials, and start using Pine Labs tools in your AI assistant.
|
|
5
|
+
> **[Full Documentation](https://developer.pinelabsonline.com/docs/mcp-server-overview)** · **[Available Tools](https://developer.pinelabsonline.com/docs/mcp-server-tools)** · **[Use Cases](https://developer.pinelabsonline.com/docs/mcp-server-use-cases)** · **[FAQs](https://developer.pinelabsonline.com/docs/mcp-server-faqs)**
|
|
16
6
|
|
|
17
7
|
## Prerequisites
|
|
18
8
|
|
|
19
9
|
- **Node.js 18+** — [Download](https://nodejs.org/)
|
|
20
|
-
- **Pine Labs Client Credentials** — Get your `Client ID` and `Client Secret` from the Pine Labs developer portal
|
|
10
|
+
- **Pine Labs Client Credentials** — Get your `Client ID` and `Client Secret` from the [Pine Labs developer portal](https://developer.pinelabsonline.com/)
|
|
21
11
|
|
|
22
12
|
## Quick Start
|
|
23
13
|
|
|
@@ -63,60 +53,7 @@ pinelabs-mcp --version Show version
|
|
|
63
53
|
|
|
64
54
|
## Manual Configuration
|
|
65
55
|
|
|
66
|
-
If you prefer to configure your AI client
|
|
67
|
-
|
|
68
|
-
### Claude Desktop
|
|
69
|
-
|
|
70
|
-
```json
|
|
71
|
-
{
|
|
72
|
-
"mcpServers": {
|
|
73
|
-
"pinelabs": {
|
|
74
|
-
"command": "npx",
|
|
75
|
-
"args": ["-y", "pinelabs-mcp"],
|
|
76
|
-
"env": {
|
|
77
|
-
"PINELABS_CLIENT_ID": "your_client_id",
|
|
78
|
-
"PINELABS_CLIENT_SECRET": "your_client_secret"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Cursor
|
|
86
|
-
|
|
87
|
-
```json
|
|
88
|
-
{
|
|
89
|
-
"mcpServers": {
|
|
90
|
-
"pinelabs": {
|
|
91
|
-
"command": "npx",
|
|
92
|
-
"args": ["-y", "pinelabs-mcp"],
|
|
93
|
-
"env": {
|
|
94
|
-
"PINELABS_CLIENT_ID": "your_client_id",
|
|
95
|
-
"PINELABS_CLIENT_SECRET": "your_client_secret"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### VS Code
|
|
103
|
-
|
|
104
|
-
```json
|
|
105
|
-
{
|
|
106
|
-
"servers": {
|
|
107
|
-
"pinelabs": {
|
|
108
|
-
"command": "npx",
|
|
109
|
-
"args": ["-y", "pinelabs-mcp"],
|
|
110
|
-
"env": {
|
|
111
|
-
"PINELABS_CLIENT_ID": "your_client_id",
|
|
112
|
-
"PINELABS_CLIENT_SECRET": "your_client_secret"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### Windsurf
|
|
56
|
+
If you prefer to configure manually, add the following to your AI client's MCP config:
|
|
120
57
|
|
|
121
58
|
```json
|
|
122
59
|
{
|
|
@@ -133,9 +70,9 @@ If you prefer to configure your AI client manually:
|
|
|
133
70
|
}
|
|
134
71
|
```
|
|
135
72
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
Add `"PINELABS_ENV": "
|
|
73
|
+
> **VS Code** uses `"servers"` instead of `"mcpServers"` as the top-level key.
|
|
74
|
+
>
|
|
75
|
+
> **Production environment**: Add `"PINELABS_ENV": "prod"` to the `env` block.
|
|
139
76
|
|
|
140
77
|
## Environment Variables
|
|
141
78
|
|
|
@@ -143,89 +80,29 @@ Add `"PINELABS_ENV": "uat"` to the `env` block in any configuration above.
|
|
|
143
80
|
|----------|----------|---------|-------------|
|
|
144
81
|
| `PINELABS_CLIENT_ID` | Yes | — | Your Pine Labs client ID |
|
|
145
82
|
| `PINELABS_CLIENT_SECRET` | Yes | — | Your Pine Labs client secret |
|
|
146
|
-
| `PINELABS_ENV` | No | `
|
|
83
|
+
| `PINELABS_ENV` | No | `uat` | Environment: `uat` or `prod` |
|
|
147
84
|
| `PINELABS_MCP_ENDPOINT` | No | — | Custom endpoint URL (overrides `PINELABS_ENV`) |
|
|
148
85
|
| `DEBUG` | No | `false` | Enable debug logging (`true` or `1`) |
|
|
149
86
|
|
|
150
87
|
## Available Tools
|
|
151
88
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
### Payment Links
|
|
155
|
-
| Tool | Description |
|
|
156
|
-
|------|-------------|
|
|
157
|
-
| `create_payment_link` | Create a new payment link |
|
|
158
|
-
| `get_payment_link_by_id` | Retrieve payment link details by ID |
|
|
159
|
-
| `get_payment_link_by_merchant_reference` | Look up payment link by merchant reference |
|
|
160
|
-
| `cancel_payment_link` | Cancel an existing payment link |
|
|
161
|
-
| `resend_payment_link_notification` | Resend payment link notification to customer |
|
|
162
|
-
| `get_payment_link_details` | Get detailed payment link information |
|
|
163
|
-
|
|
164
|
-
### Orders
|
|
165
|
-
| Tool | Description |
|
|
166
|
-
|------|-------------|
|
|
167
|
-
| `create_order` | Create a new checkout order |
|
|
168
|
-
| `get_order_by_order_id` | Retrieve order details by order ID |
|
|
169
|
-
| `get_order_details` | Get detailed order information |
|
|
170
|
-
| `cancel_order` | Cancel an existing order |
|
|
171
|
-
|
|
172
|
-
### Payments
|
|
173
|
-
| Tool | Description |
|
|
174
|
-
|------|-------------|
|
|
175
|
-
| `create_card_payment` | Process a card payment |
|
|
176
|
-
| `create_upi_intent_payment_with_qr` | Create a UPI intent payment with QR code |
|
|
177
|
-
| `get_card_details` | Retrieve card details |
|
|
178
|
-
| `search_transaction` | Search for transactions |
|
|
179
|
-
|
|
180
|
-
### Refunds
|
|
181
|
-
| Tool | Description |
|
|
182
|
-
|------|-------------|
|
|
183
|
-
| `create_refund` | Create a refund for an order |
|
|
184
|
-
| `get_refund_order_details` | Get refund order details |
|
|
185
|
-
| `get_refund_order_by_id` | Retrieve refund details by ID |
|
|
186
|
-
|
|
187
|
-
### Settlements
|
|
188
|
-
| Tool | Description |
|
|
189
|
-
|------|-------------|
|
|
190
|
-
| `get_all_settlements` | List all settlements |
|
|
191
|
-
| `get_settlements_by_utr` | Look up settlements by UTR number |
|
|
192
|
-
| `release_settlement` | Release a settlement |
|
|
193
|
-
| `cancel_settlement` | Cancel a settlement |
|
|
194
|
-
|
|
195
|
-
### OTP
|
|
196
|
-
| Tool | Description |
|
|
197
|
-
|------|-------------|
|
|
198
|
-
| `generate_otp` | Generate an OTP for verification |
|
|
199
|
-
| `submit_otp` | Submit an OTP for validation |
|
|
200
|
-
| `resend_otp` | Resend an OTP |
|
|
89
|
+
The MCP server exposes 20+ tools across these categories:
|
|
201
90
|
|
|
202
|
-
|
|
91
|
+
- **Payment Links** — Create, retrieve, cancel, and resend payment links
|
|
92
|
+
- **Orders** — Create, track, and cancel checkout orders
|
|
93
|
+
- **Payments** — QR Code Generation for UPI payments
|
|
94
|
+
- **Refunds** — Create and retrieve refund details
|
|
95
|
+
- **Settlements** — Settlements APIs
|
|
203
96
|
|
|
204
|
-
|
|
97
|
+
See the [complete tools reference](https://developer.pinelabsonline.com/docs/mcp-server-tools) for details.
|
|
205
98
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
### Tools not appearing
|
|
209
|
-
|
|
210
|
-
1. Restart your AI assistant after adding the MCP configuration
|
|
211
|
-
2. Check that Node.js 18+ is installed: `node --version`
|
|
212
|
-
3. Try enabling debug mode: set `"DEBUG": "true"` in the `env` block
|
|
213
|
-
|
|
214
|
-
### Connection issues
|
|
215
|
-
|
|
216
|
-
1. Verify your credentials are correct and active
|
|
217
|
-
2. Check your network connection — the server is at `mcp.pluralpay.in`
|
|
218
|
-
3. If behind a corporate proxy, ensure HTTPS traffic to `mcp.pluralpay.in` is allowed
|
|
219
|
-
|
|
220
|
-
## How it Works
|
|
221
|
-
|
|
222
|
-
1. Your AI assistant spawns this process via `npx`
|
|
223
|
-
2. Credentials are read from environment variables or stored config (`~/.pinelabs-mcp/config.json`)
|
|
224
|
-
3. The process starts `mcp-remote` which connects to the Pine Labs server
|
|
225
|
-
4. Authentication headers are injected into every request
|
|
226
|
-
5. MCP protocol messages flow transparently between your assistant and the server
|
|
99
|
+
## Troubleshooting
|
|
227
100
|
|
|
228
|
-
|
|
101
|
+
| Issue | Fix |
|
|
102
|
+
|-------|-----|
|
|
103
|
+
| Missing credentials | Run `npx pinelabs-mcp configure` or set `PINELABS_CLIENT_ID` / `PINELABS_CLIENT_SECRET` in your MCP client's `env` block |
|
|
104
|
+
| Tools not appearing | Restart your AI assistant; verify Node.js 18+ (`node --version`); set `"DEBUG": "true"` in `env` |
|
|
105
|
+
| Connection issues | Verify credentials; check network access to `pinelabs-online-mcp-server.pluralpay.in`; allow HTTPS if behind a proxy |
|
|
229
106
|
|
|
230
107
|
## License
|
|
231
108
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinelabs-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "MCP client for Pine Labs payment gateway — connect Claude Desktop, Cursor, and VS Code to Pine Labs payment APIs using your client credentials.",
|
|
5
5
|
"main": "src/config.js",
|
|
6
6
|
"bin": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"mcp-remote": "^0.1.38"
|
|
55
55
|
},
|
|
56
|
-
"homepage": "https://
|
|
56
|
+
"homepage": "https://developer.pinelabsonline.com/docs/mcp-server-overview"
|
|
57
57
|
}
|
|
@@ -21,7 +21,7 @@ async function configure(flags) {
|
|
|
21
21
|
function configureFlagMode(flags) {
|
|
22
22
|
const clientId = flags["client-id"] || "";
|
|
23
23
|
const clientSecret = flags["client-secret"] || "";
|
|
24
|
-
const env = (flags.env || "
|
|
24
|
+
const env = (flags.env || "uat").toLowerCase();
|
|
25
25
|
|
|
26
26
|
if (!clientId) {
|
|
27
27
|
log("\n Error: --client-id is required.\n");
|
|
@@ -73,7 +73,7 @@ async function configureInteractive() {
|
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
const env = await askQuestion("Environment [prod
|
|
76
|
+
const env = await askQuestion("Environment [uat/prod]", { defaultValue: "uat" });
|
|
77
77
|
const normalizedEnv = env.toLowerCase();
|
|
78
78
|
|
|
79
79
|
if (!VALID_ENVS.includes(normalizedEnv)) {
|
package/src/commands/help.js
CHANGED
|
@@ -36,7 +36,7 @@ function showHelp() {
|
|
|
36
36
|
$ pinelabs-mcp setup codex --local
|
|
37
37
|
$ pinelabs-mcp setup copilot --print
|
|
38
38
|
|
|
39
|
-
Documentation: https://
|
|
39
|
+
Documentation: https://developer.pinelabsonline.com/docs/mcp-server-overview
|
|
40
40
|
`;
|
|
41
41
|
|
|
42
42
|
process.stderr.write(text);
|
package/src/commands/setup.js
CHANGED
|
@@ -86,7 +86,7 @@ function _buildMcpConfig(client, config, options = {}) {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
if (config.environment && config.environment !== "
|
|
89
|
+
if (config.environment && config.environment !== "uat") {
|
|
90
90
|
serverEntry.env.PINELABS_ENV = config.environment;
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -115,7 +115,7 @@ function _buildCodexToml(config, options = {}) {
|
|
|
115
115
|
lines.push("[mcp_servers.pinelabs.env]");
|
|
116
116
|
lines.push(`PINELABS_CLIENT_ID = "${config.client_id}"`);
|
|
117
117
|
lines.push(`PINELABS_CLIENT_SECRET = "${config.client_secret}"`);
|
|
118
|
-
if (config.environment && config.environment !== "
|
|
118
|
+
if (config.environment && config.environment !== "uat") {
|
|
119
119
|
lines.push(`PINELABS_ENV = "${config.environment}"`);
|
|
120
120
|
}
|
|
121
121
|
lines.push("");
|
package/src/commands/status.js
CHANGED
|
@@ -20,8 +20,8 @@ function maskSecret(secret) {
|
|
|
20
20
|
|
|
21
21
|
function resolveEndpoint(config) {
|
|
22
22
|
if (config.endpoint) return config.endpoint;
|
|
23
|
-
const env = config.environment || "
|
|
24
|
-
return ENDPOINTS[env] || ENDPOINTS.
|
|
23
|
+
const env = config.environment || "uat";
|
|
24
|
+
return ENDPOINTS[env] || ENDPOINTS.uat;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
function showStatus() {
|
|
@@ -42,7 +42,7 @@ function showStatus() {
|
|
|
42
42
|
log(` Config file: ${configPath}`);
|
|
43
43
|
log(` Client ID: ${maskId(config.client_id)}`);
|
|
44
44
|
log(` Client Secret: ${maskSecret(config.client_secret)}`);
|
|
45
|
-
log(` Environment: ${config.environment || "
|
|
45
|
+
log(` Environment: ${config.environment || "uat"}`);
|
|
46
46
|
log(` Endpoint: ${endpoint}`);
|
|
47
47
|
|
|
48
48
|
try {
|
package/src/commands/test.js
CHANGED
|
@@ -17,8 +17,8 @@ function maskId(id) {
|
|
|
17
17
|
|
|
18
18
|
function resolveEndpoint(config) {
|
|
19
19
|
if (config.endpoint) return config.endpoint;
|
|
20
|
-
const env = config.environment || "
|
|
21
|
-
return ENDPOINTS[env] || ENDPOINTS.
|
|
20
|
+
const env = config.environment || "uat";
|
|
21
|
+
return ENDPOINTS[env] || ENDPOINTS.uat;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
function probeEndpoint(endpoint, clientId, clientSecret) {
|
|
@@ -87,7 +87,7 @@ async function testConnection() {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
const endpoint = resolveEndpoint(config);
|
|
90
|
-
log(` Environment: ${config.environment || "
|
|
90
|
+
log(` Environment: ${config.environment || "uat"}`);
|
|
91
91
|
log(` Endpoint: ${endpoint}`);
|
|
92
92
|
|
|
93
93
|
log("\n Testing connectivity...");
|
package/src/config.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
const ENDPOINTS = {
|
|
12
|
-
prod: "https://mcp.pluralpay.in/mcp",
|
|
12
|
+
prod: "https://pinelabs-online-mcp-server.pluralpay.in/mcp",
|
|
13
13
|
uat: "https://pluralai.v2.pinepg.in/mcp",
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -35,14 +35,14 @@ function loadConfig() {
|
|
|
35
35
|
if (stored) {
|
|
36
36
|
if (!clientId) clientId = stored.client_id || "";
|
|
37
37
|
if (!clientSecret) clientSecret = stored.client_secret || "";
|
|
38
|
-
if (!env) env = (stored.environment || "
|
|
38
|
+
if (!env) env = (stored.environment || "uat").toLowerCase();
|
|
39
39
|
}
|
|
40
40
|
} catch {
|
|
41
41
|
// config-store not available, skip
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
if (!env) env = "
|
|
45
|
+
if (!env) env = "uat";
|
|
46
46
|
|
|
47
47
|
const errors = [];
|
|
48
48
|
|
|
@@ -76,12 +76,12 @@ function loadConfig() {
|
|
|
76
76
|
let endpoint;
|
|
77
77
|
if (endpointOverride) {
|
|
78
78
|
endpoint = endpointOverride;
|
|
79
|
-
} else if (env === "uat") {
|
|
80
|
-
endpoint = ENDPOINTS.uat;
|
|
81
79
|
} else if (env === "prod") {
|
|
82
80
|
endpoint = ENDPOINTS.prod;
|
|
81
|
+
} else if (env === "uat") {
|
|
82
|
+
endpoint = ENDPOINTS.uat;
|
|
83
83
|
} else {
|
|
84
|
-
endpoint = ENDPOINTS.
|
|
84
|
+
endpoint = ENDPOINTS.uat;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
return { clientId, clientSecret, endpoint, debug };
|