easypaydirect-mcp 0.1.0 → 0.1.2
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 +53 -0
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -1
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# easypaydirect-mcp
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/easypaydirect-mcp)
|
|
4
|
+
[](https://github.com/praveendias1180/easypaydirect-mcp/actions/workflows/ci.yml)
|
|
5
|
+
[](https://praveendias1180.github.io/easypaydirect-mcp/)
|
|
6
|
+
[](https://github.com/praveendias1180/easypaydirect-mcp/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
📖 **Documentation:** <https://praveendias1180.github.io/easypaydirect-mcp/>
|
|
10
|
+
|
|
3
11
|
> **Unofficial, read-only [Model Context Protocol](https://modelcontextprotocol.io) server for the [Easy Pay Direct](https://easypaydirect.com) (EPD) / NMI-family payment gateway.**
|
|
4
12
|
|
|
5
13
|
Give an AI assistant (Claude Desktop, Claude Code, or any MCP client) safe, **read-only** access to your gateway's transactions, subscriptions, recurring plans, and Customer Vault records — so you can ask questions like *"find the failed transactions for this customer last week"* or *"is this subscription still active?"* in plain language.
|
|
@@ -36,6 +44,21 @@ The server speaks MCP over **stdio** and expects two environment variables:
|
|
|
36
44
|
|
|
37
45
|
See [`docs/configuration.md`](docs/configuration.md) for how to find your key and host.
|
|
38
46
|
|
|
47
|
+
### Run with Docker
|
|
48
|
+
|
|
49
|
+
No local Node.js needed. Build the image from the repository root, then run it with `-i` — MCP talks over stdio, so the container needs stdin kept open:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
docker build -t easypaydirect-mcp .
|
|
53
|
+
|
|
54
|
+
docker run --rm -i \
|
|
55
|
+
-e NMI_SECURITY_KEY=your_read_only_security_key \
|
|
56
|
+
-e NMI_API_URL=https://secure.nmi.com \
|
|
57
|
+
easypaydirect-mcp
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Or keep the variables in an env file (`--env-file .env`). `.env` is already git-ignored — never commit a real key.
|
|
61
|
+
|
|
39
62
|
## Connect it to Claude
|
|
40
63
|
|
|
41
64
|
**Claude Desktop** — add to `claude_desktop_config.json` (see [`examples/claude-desktop-config.json`](examples/claude-desktop-config.json)):
|
|
@@ -64,6 +87,15 @@ claude mcp add easypaydirect \
|
|
|
64
87
|
-- npx -y easypaydirect-mcp
|
|
65
88
|
```
|
|
66
89
|
|
|
90
|
+
To use the Docker image instead, swap the command — a bare `-e NAME` forwards the variable into the container:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
claude mcp add easypaydirect \
|
|
94
|
+
-e NMI_SECURITY_KEY=your_read_only_security_key \
|
|
95
|
+
-e NMI_API_URL=https://secure.nmi.com \
|
|
96
|
+
-- docker run --rm -i -e NMI_SECURITY_KEY -e NMI_API_URL easypaydirect-mcp
|
|
97
|
+
```
|
|
98
|
+
|
|
67
99
|
Full walkthrough: [`docs/getting-started.md`](docs/getting-started.md).
|
|
68
100
|
|
|
69
101
|
## Tools
|
|
@@ -98,6 +130,27 @@ npx @modelcontextprotocol/inspector node dist/index.js
|
|
|
98
130
|
|
|
99
131
|
Architecture and how tools map to the Query API: [`docs/nmi-api-mapping.md`](docs/nmi-api-mapping.md).
|
|
100
132
|
|
|
133
|
+
## Roadmap
|
|
134
|
+
|
|
135
|
+
Planned / under consideration — contributions welcome (see [open issues](https://github.com/praveendias1180/easypaydirect-mcp/issues)):
|
|
136
|
+
|
|
137
|
+
- **Tests** — unit suite with recorded Query API fixtures ([#1](https://github.com/praveendias1180/easypaydirect-mcp/issues/1))
|
|
138
|
+
- **Friendlier dates** — accept ISO-8601 in date filters ([#2](https://github.com/praveendias1180/easypaydirect-mcp/issues/2))
|
|
139
|
+
- **More filters** — merchant-defined fields on `search_transactions` ([#3](https://github.com/praveendias1180/easypaydirect-mcp/issues/3))
|
|
140
|
+
- **Better errors** — map NMI response codes to actionable messages ([#4](https://github.com/praveendias1180/easypaydirect-mcp/issues/4))
|
|
141
|
+
- **Distribution** — publish-on-release automation ([#8](https://github.com/praveendias1180/easypaydirect-mcp/issues/8))
|
|
142
|
+
- **Docs** — response-field reference ([#9](https://github.com/praveendias1180/easypaydirect-mcp/issues/9))
|
|
143
|
+
|
|
144
|
+
Read-only stays the default posture — any write support would be a separate, opt-in, gated **major** version.
|
|
145
|
+
|
|
146
|
+
See the [changelog](CHANGELOG.md) for released changes.
|
|
147
|
+
|
|
148
|
+
## Contributing
|
|
149
|
+
|
|
150
|
+
Contributions are welcome — this aims to be a small, dependable, **read-only** MCP server. See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the ground rules and dev setup.
|
|
151
|
+
|
|
152
|
+
**New here?** Start with a [**good first issue**](https://github.com/praveendias1180/easypaydirect-mcp/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) — each one has context, a task checklist, file pointers, and acceptance criteria. Have a question? Open a [Discussion](https://github.com/praveendias1180/easypaydirect-mcp/discussions).
|
|
153
|
+
|
|
101
154
|
## License
|
|
102
155
|
|
|
103
156
|
[MIT](LICENSE) © the easypaydirect-mcp contributors.
|
package/dist/client.js
CHANGED
|
@@ -35,6 +35,9 @@ export class NmiClient {
|
|
|
35
35
|
const body = new URLSearchParams();
|
|
36
36
|
body.set("security_key", this.config.securityKey);
|
|
37
37
|
for (const [key, value] of Object.entries(params)) {
|
|
38
|
+
// The configured key is the only one ever sent; a param can't replace it.
|
|
39
|
+
if (key === "security_key")
|
|
40
|
+
continue;
|
|
38
41
|
if (value !== undefined && value !== null && value !== "") {
|
|
39
42
|
body.set(key, String(value));
|
|
40
43
|
}
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],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AAC,CAAC;QACrF,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAE9B,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,aAAa,CAAC,2BAA2B,GAAG,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACnG,CAAC;QAED,yEAAyE;QACzE,yEAAyE;QACzE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,aAAa,CACrB,yEAAyE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAC7F,GAAG,CAAC,MAAM,EACV,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CACnB,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easypaydirect-mcp",
|
|
3
|
-
"
|
|
3
|
+
"mcpName": "io.github.praveendias1180/easypaydirect-mcp",
|
|
4
|
+
"version": "0.1.2",
|
|
4
5
|
"description": "Unofficial read-only Model Context Protocol (MCP) server for the Easy Pay Direct (EPD) / NMI-family payment gateway Query API.",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"bin": {
|
|
@@ -13,8 +14,11 @@
|
|
|
13
14
|
],
|
|
14
15
|
"scripts": {
|
|
15
16
|
"build": "tsc && node -e \"require('fs').chmodSync('dist/index.js', 0o755)\"",
|
|
16
|
-
"typecheck": "tsc --noEmit",
|
|
17
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.test.json",
|
|
18
|
+
"test": "vitest run",
|
|
19
|
+
"test:watch": "vitest",
|
|
17
20
|
"start": "node dist/index.js",
|
|
21
|
+
"release": "node scripts/release.mjs",
|
|
18
22
|
"prepublishOnly": "npm run build"
|
|
19
23
|
},
|
|
20
24
|
"keywords": [
|
|
@@ -48,6 +52,8 @@
|
|
|
48
52
|
},
|
|
49
53
|
"devDependencies": {
|
|
50
54
|
"@types/node": "^22.0.0",
|
|
51
|
-
"typescript": "^5.6.0"
|
|
55
|
+
"typescript": "^5.6.0",
|
|
56
|
+
"vite": "^6.4.3",
|
|
57
|
+
"vitest": "^3.2.7"
|
|
52
58
|
}
|
|
53
59
|
}
|