easypaydirect-mcp 0.1.1 → 0.1.3

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 CHANGED
@@ -44,6 +44,21 @@ The server speaks MCP over **stdio** and expects two environment variables:
44
44
 
45
45
  See [`docs/configuration.md`](docs/configuration.md) for how to find your key and host.
46
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
+
47
62
  ## Connect it to Claude
48
63
 
49
64
  **Claude Desktop** — add to `claude_desktop_config.json` (see [`examples/claude-desktop-config.json`](examples/claude-desktop-config.json)):
@@ -72,8 +87,37 @@ claude mcp add easypaydirect \
72
87
  -- npx -y easypaydirect-mcp
73
88
  ```
74
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
+
75
99
  Full walkthrough: [`docs/getting-started.md`](docs/getting-started.md).
76
100
 
101
+ ### Claude Code plugin (server + skill)
102
+
103
+ The plugin installs the MCP server **and** an [Agent Skill](plugins/easypaydirect/skills/easypaydirect/SKILL.md)
104
+ that teaches Claude how to read gateway data correctly — for example that a successful
105
+ ACH sale is only *submitted*, not paid, and that EPD timestamps are UTC.
106
+
107
+ Set the key in your shell (the plugin reads it from the environment), then install:
108
+
109
+ ```bash
110
+ export NMI_SECURITY_KEY=your_read_only_security_key
111
+ export NMI_API_URL=https://secure.nmi.com # optional; your EPD / white-label host
112
+ ```
113
+
114
+ ```
115
+ /plugin marketplace add praveendias1180/easypaydirect-mcp
116
+ /plugin install easypaydirect@easypaydirect-mcp
117
+ ```
118
+
119
+ Using another client? The skill is a plain `SKILL.md` — add it to any tool that supports Agent Skills.
120
+
77
121
  ## Tools
78
122
 
79
123
  All tools are **read-only**. Full reference in [`docs/tools.md`](docs/tools.md).
@@ -114,7 +158,7 @@ Planned / under consideration — contributions welcome (see [open issues](https
114
158
  - **Friendlier dates** — accept ISO-8601 in date filters ([#2](https://github.com/praveendias1180/easypaydirect-mcp/issues/2))
115
159
  - **More filters** — merchant-defined fields on `search_transactions` ([#3](https://github.com/praveendias1180/easypaydirect-mcp/issues/3))
116
160
  - **Better errors** — map NMI response codes to actionable messages ([#4](https://github.com/praveendias1180/easypaydirect-mcp/issues/4))
117
- - **Distribution** — a Docker image ([#7](https://github.com/praveendias1180/easypaydirect-mcp/issues/7)) and publish-on-release automation ([#8](https://github.com/praveendias1180/easypaydirect-mcp/issues/8))
161
+ - **Distribution** — publish-on-release automation ([#8](https://github.com/praveendias1180/easypaydirect-mcp/issues/8))
118
162
  - **Docs** — response-field reference ([#9](https://github.com/praveendias1180/easypaydirect-mcp/issues/9))
119
163
 
120
164
  Read-only stays the default posture — any write support would be a separate, opt-in, gated **major** version.
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
  }
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE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G,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,7 +1,7 @@
1
1
  {
2
2
  "name": "easypaydirect-mcp",
3
3
  "mcpName": "io.github.praveendias1180/easypaydirect-mcp",
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
5
  "description": "Unofficial read-only Model Context Protocol (MCP) server for the Easy Pay Direct (EPD) / NMI-family payment gateway Query API.",
6
6
  "type": "module",
7
7
  "bin": {
@@ -14,8 +14,11 @@
14
14
  ],
15
15
  "scripts": {
16
16
  "build": "tsc && node -e \"require('fs').chmodSync('dist/index.js', 0o755)\"",
17
- "typecheck": "tsc --noEmit",
17
+ "typecheck": "tsc --noEmit && tsc -p tsconfig.test.json",
18
+ "test": "vitest run",
19
+ "test:watch": "vitest",
18
20
  "start": "node dist/index.js",
21
+ "release": "node scripts/release.mjs",
19
22
  "prepublishOnly": "npm run build"
20
23
  },
21
24
  "keywords": [
@@ -49,6 +52,8 @@
49
52
  },
50
53
  "devDependencies": {
51
54
  "@types/node": "^22.0.0",
52
- "typescript": "^5.6.0"
55
+ "typescript": "^5.6.0",
56
+ "vite": "^6.4.3",
57
+ "vitest": "^3.2.7"
53
58
  }
54
59
  }