@ekoindia/eps-transact-mcp 0.1.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/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # @ekoindia/eps-transact-mcp
2
+
3
+ Transactional MCP server for **Eko Platform Services (EPS) verification APIs**. Unlike [`@ekoindia/eps-context-mcp`](../eps-context-mcp/) (documentation/context only), this server's tools **actually call** Eko — PAN, bank account, GST, driving licence, and every other verification endpoint, signed with your EPS credentials.
4
+
5
+ - **Registry-driven** — every tool is generated from the same single source of truth (`api-specs.ts` → `eps.json`) as the docs, SDKs, and context MCP. Verification-category, non-financial endpoints only.
6
+ - **Two modes** — remote (streamable HTTP, zero install) and local (stdio, zero credential sharing).
7
+ - **Nothing stored, nothing logged** — the remote server keeps no credentials, no request bodies, no responses. See [Data handling](#data-handling).
8
+
9
+ ## Remote server (streamable HTTP)
10
+
11
+ Point any MCP client at the hosted endpoint and pass your EPS credentials as headers:
12
+
13
+ ```sh
14
+ claude mcp add --transport http eps-transact https://mcp.eko.in/mcp \
15
+ --header "X-Eko-Developer-Key: YOUR_DEVELOPER_KEY" \
16
+ --header "X-Eko-Access-Key: YOUR_ACCESS_KEY" \
17
+ --header "X-Eko-Allowed-Apis: eps_pan_lite,eps_bank_account_verification" \
18
+ --header "X-Eko-Initiator-Id: YOUR_INITIATOR_ID"
19
+ ```
20
+
21
+ ### Headers
22
+
23
+ | Header | Required | Meaning |
24
+ | --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
25
+ | `X-Eko-Developer-Key` | yes | Your static EPS developer key. |
26
+ | `X-Eko-Access-Key` | yes | Your EPS access key; used to HMAC-sign each request server-side, never stored. |
27
+ | `X-Eko-Allowed-Apis` | yes | Comma-separated tool names your agents may call, or `*` for all verification tools. Deliberately required — EPS calls are billed. |
28
+ | `X-Eko-Env` | no | `uat` (default) or `production`. Production is explicit opt-in: real bills, real PII. |
29
+ | `X-Eko-Initiator-Id` | no | Default `initiator_id` injected into every call (agents can override per call). |
30
+ | `X-Eko-User-Code` | no | Default `user_code`, same semantics. |
31
+
32
+ ### Scoping is voluntary, not entitlement
33
+
34
+ `X-Eko-Allowed-Apis` restricts what **your** agents can invoke over **this** connection — a guardrail you configure in your MCP client, out of the model's reach. It is not an authorization system: your Eko credentials remain the real boundary of what your account can do. Treat the keys accordingly.
35
+
36
+ ### UAT quickstart
37
+
38
+ Eko publishes a shared UAT `access_key` in the [auth docs](https://eps.eko.in/docs); UAT `developer_key` / `initiator_id` come from your Eko onboarding. With `X-Eko-Env` unset you are on UAT and can safely try:
39
+
40
+ > "Verify PAN ABCDE1234F for JOHN DOE, DOB 1990-01-01."
41
+
42
+ ## Local server (stdio — zero credential sharing)
43
+
44
+ Credentials stay on your machine; calls go straight to Eko:
45
+
46
+ ```sh
47
+ claude mcp add eps-transact \
48
+ -e EKO_DEVELOPER_KEY=YOUR_DEVELOPER_KEY \
49
+ -e EKO_ACCESS_KEY=YOUR_ACCESS_KEY \
50
+ -e EKO_INITIATOR_ID=YOUR_INITIATOR_ID \
51
+ -- npx -y @ekoindia/eps-transact-mcp@latest
52
+ ```
53
+
54
+ Optional env: `EKO_ENV` (`uat` default | `production`), `EKO_ALLOWED_APIS` (defaults to `*` locally), `EKO_USER_CODE`.
55
+
56
+ ## Staying up to date
57
+
58
+ - **Remote server** — nothing to do. It's hosted; the operator redeploys and every client is instantly current. `GET /healthz` reports the live `bundleVersion`.
59
+ - **Local stdio** — the `@latest` in the install command re-resolves the newest published version on every launch, so `npx` always fetches current. `@latest` does a registry lookup at start; the server runs fully offline after that. Offline/air-gapped? Pin a version: `npx --offline -y @ekoindia/eps-transact-mcp@<version>`.
60
+ - **Update check** — on startup the stdio bin does one best-effort `GET registry.npmjs.org/@ekoindia/eps-transact-mcp/latest` (3s timeout, silent on any failure) and, if your config pinned an older version, prints a one-line stderr nudge. It never blocks startup, sends no data, and touches nothing but stderr. Disable with `EPS_NO_UPDATE_CHECK=1` (corporate/no-egress). The remote server does **not** run this check.
61
+
62
+ ## Tools
63
+
64
+ One tool per verification endpoint, named `eps_<slug with underscores>` — e.g. `eps_pan_lite`, `eps_bank_account_verification`, `eps_verify_gstin`, `eps_driving_license`. Every tool description carries the billing reminder; input schemas (required params, types, examples) are generated from the API specs. Multi-step flows (mobile OTP, DigiLocker) are exposed as their individual steps — the server is stateless; your agent carries intermediate ids between calls.
65
+
66
+ Errors come back sanitized as `{ code, message }`: `VALIDATION` (names the missing/invalid params — never their values), `TOOL_NOT_ALLOWED`, `UNKNOWN_TOOL`, `UPSTREAM_TIMEOUT`, `UPSTREAM_ERROR`. Successful upstream envelopes (including business failures like "PAN not found") are returned verbatim — they are your data.
67
+
68
+ ## Data handling
69
+
70
+ The remote server is a stateless pass-through signer:
71
+
72
+ - **No persistence.** No database, no cache, no session store. Credentials exist only for the lifetime of the request that carried them.
73
+ - **No body logging.** The access log records method, path, status, duration, request id, and the tool _name_ — never headers, tool arguments, or upstream responses (verification traffic carries PAN/Aadhaar/bank data).
74
+ - **TLS only.** The container binds loopback behind a reverse proxy; plaintext ingress is never exposed.
75
+
76
+ ## Development
77
+
78
+ ```sh
79
+ # from the repo root — bakes data/eps.json for all packages
80
+ npm run build
81
+
82
+ npm run transact:test # builds the SDK dep, runs vitest
83
+ npm run transact:dev # HTTP server on :8788 with tsx watch
84
+ npm run transact:typecheck
85
+ ```
86
+
87
+ Tests never call Eko; upstream fetch is injected. The one exception is the env-gated live UAT smoke:
88
+
89
+ ```sh
90
+ EPS_UAT_DEVELOPER_KEY=… EPS_UAT_ACCESS_KEY=… EPS_UAT_INITIATOR_ID=… \
91
+ npm test -w @ekoindia/eps-transact-mcp
92
+ ```
93
+
94
+ Run it before any deploy that changes base URLs or signing — it is the only proof the bundle's environment URLs are live-correct.
95
+
96
+ Deployment (image, compose service, reverse proxy) is documented in [`docs/eps-transact-mcp.md`](../../docs/eps-transact-mcp.md).