@ekoindia/eps-transact-mcp 0.1.2 → 0.1.4

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
@@ -11,7 +11,7 @@ Transactional MCP server for **Eko Platform Services (EPS) verification APIs**.
11
11
  Point any MCP client at the hosted endpoint and pass your EPS credentials as headers:
12
12
 
13
13
  ```sh
14
- claude mcp add --transport http eps-transact https://mcp.eko.in/mcp \
14
+ claude mcp add --transport http eps-transact https://mcp.eko.in/transact/mcp \
15
15
  --header "X-Eko-Developer-Key: YOUR_DEVELOPER_KEY" \
16
16
  --header "X-Eko-Access-Key: YOUR_ACCESS_KEY" \
17
17
  --header "X-Eko-Allowed-Apis: eps_pan_lite,eps_bank_account_verification" \
@@ -142,6 +142,7 @@ var parseAllowed = (raw) => {
142
142
  return names.length ? new Set(names) : void 0;
143
143
  };
144
144
  var isAllowed = (ctx, toolName) => ctx.allowed === "all" || ctx.allowed.has(toolName);
145
+ var hasCredentials = (ctx) => Boolean(ctx.developerKey && ctx.accessKey);
145
146
 
146
147
  // src/server.ts
147
148
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -201,6 +202,11 @@ var createTransactServer = (tools, ctx, version) => {
201
202
  code: "UNKNOWN_TOOL",
202
203
  message: `Unknown tool "${req.params.name}".`
203
204
  });
205
+ if (!hasCredentials(ctx))
206
+ return errorResult({
207
+ code: "MISSING_CREDENTIALS",
208
+ message: "Set EKO_DEVELOPER_KEY and EKO_ACCESS_KEY in your environment and restart the agent to run verifications. See the eps-verify skill."
209
+ });
204
210
  if (!isAllowed(ctx, tool.name))
205
211
  return errorResult({
206
212
  code: "TOOL_NOT_ALLOWED",
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  parseAllowed,
7
7
  parseEnvironment,
8
8
  withTimeout
9
- } from "./chunk-XLZLL6DZ.js";
9
+ } from "./chunk-VROHQHWD.js";
10
10
 
11
11
  // src/index.ts
12
12
  import { serve } from "@hono/node-server";
package/dist/stdio.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  parseAllowed,
7
7
  parseEnvironment,
8
8
  withTimeout
9
- } from "./chunk-XLZLL6DZ.js";
9
+ } from "./chunk-VROHQHWD.js";
10
10
 
11
11
  // src/stdio.ts
12
12
  import { createRequire } from "module";
@@ -61,20 +61,19 @@ var { version: OWN_VERSION } = createRequire(import.meta.url)(
61
61
  "../package.json"
62
62
  );
63
63
  var main = async () => {
64
- const developerKey = process.env.EKO_DEVELOPER_KEY;
65
- const accessKey = process.env.EKO_ACCESS_KEY;
64
+ const developerKey = process.env.EKO_DEVELOPER_KEY ?? "";
65
+ const accessKey = process.env.EKO_ACCESS_KEY ?? "";
66
66
  if (!developerKey || !accessKey) {
67
67
  console.error(
68
- "[eps-transact-mcp] EKO_DEVELOPER_KEY and EKO_ACCESS_KEY env vars are required."
68
+ "[eps-transact-mcp] EKO_DEVELOPER_KEY / EKO_ACCESS_KEY not set \u2014 starting anyway; verification calls return MISSING_CREDENTIALS until you set them."
69
69
  );
70
- process.exit(1);
71
70
  }
72
- const environment = parseEnvironment(process.env.EKO_ENV);
71
+ let environment = parseEnvironment(process.env.EKO_ENV);
73
72
  if (!environment) {
74
73
  console.error(
75
- '[eps-transact-mcp] Invalid EKO_ENV. Use "uat" (default) or "production".'
74
+ `[eps-transact-mcp] Invalid EKO_ENV "${process.env.EKO_ENV ?? ""}". Use "uat" (default) or "production". Falling back to uat.`
76
75
  );
77
- process.exit(1);
76
+ environment = "sandbox";
78
77
  }
79
78
  const allowed = parseAllowed(process.env.EKO_ALLOWED_APIS) ?? "all";
80
79
  const { bundle } = await loadBundle();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekoindia/eps-transact-mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Transactional MCP server for Eko Platform Services (EPS) verification APIs — remote (streamable HTTP) and local (stdio).",
5
5
  "license": "MIT",
6
6
  "type": "module",