@quackai/q402-mcp 0.3.3 → 0.3.5

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
@@ -5,6 +5,10 @@
5
5
  [![npm](https://img.shields.io/npm/v/@quackai/q402-mcp.svg)](https://www.npmjs.com/package/@quackai/q402-mcp)
6
6
  [![license](https://img.shields.io/npm/l/@quackai/q402-mcp.svg)](./LICENSE)
7
7
 
8
+ > **🎟️ Free trial available (2026-05-13 → 2026-05-20)** — 2,000 gasless transactions on BNB Chain (USDC + USDT), 30-day window, no card. One wallet signature: <https://q402.quackai.ai>.
9
+ >
10
+ > **BNB-focus sprint window:** while the sprint is on, `q402_pay` accepts `chain: "bnb"` with `token: "USDC"` or `"USDT"` only; the other 6 chains and RLUSD return after the sprint. `q402_quote` is narrowed to BNB Chain accordingly. Source-of-truth flag: [`feature-flags.ts`](https://github.com/bitgett/Q402-Institutional/blob/feat/bnb-focus-sprint/app/lib/feature-flags.ts).
11
+
8
12
  Claude can now reason about stablecoin payments end to end — quote a transfer across 7 chains, pick the cheapest route, and (optionally) settle the transaction over [Q402](https://q402.quackai.ai)'s EIP-7702 relayer infrastructure. The recipient receives the full amount; the sender pays $0 in gas.
9
13
 
10
14
  ---
package/dist/index.js CHANGED
@@ -163,12 +163,24 @@ var CHAIN_CONFIG = {
163
163
  note: "USDT only until Circle CCTP native USDC ships (announced for Q2 2026)."
164
164
  }
165
165
  };
166
+ var BNB_FOCUS_MODE = true;
167
+ var BNB_FOCUS_REJECTION_MESSAGE = 'BNB-focus sprint: this chain/token is temporarily hidden. Full multi-chain support returns after the sprint window. Pass chain: "bnb" with token "USDC" or "USDT".';
168
+ if (BNB_FOCUS_MODE) {
169
+ for (const key of CHAIN_KEYS) {
170
+ if (key !== "bnb") {
171
+ CHAIN_CONFIG[key].supportedTokens = [];
172
+ }
173
+ }
174
+ }
166
175
  function getChain(key) {
167
176
  const cfg = CHAIN_CONFIG[key];
168
177
  if (!cfg) throw new Error(`Unsupported chain: ${key}. Supported: ${CHAIN_KEYS.join(", ")}`);
169
178
  return cfg;
170
179
  }
171
180
  function tokenFor(cfg, token) {
181
+ if (BNB_FOCUS_MODE && !(cfg.supportedTokens?.includes(token) ?? false)) {
182
+ throw new Error(BNB_FOCUS_REJECTION_MESSAGE);
183
+ }
172
184
  if (token === "RLUSD") {
173
185
  if (!cfg.rlusd) {
174
186
  throw new Error(
@@ -207,6 +219,7 @@ function runQuote(input) {
207
219
  const filterChain = input.chain;
208
220
  const filterToken = input.token;
209
221
  const candidates = (filterChain ? [filterChain] : CHAIN_KEYS).map((k) => CHAIN_CONFIG[k]).filter((cfg) => {
222
+ if (cfg.supportedTokens && cfg.supportedTokens.length === 0) return false;
210
223
  if (!filterToken) return true;
211
224
  if (cfg.supportedTokens && !cfg.supportedTokens.includes(filterToken)) return false;
212
225
  return true;
@@ -227,7 +240,7 @@ function runQuote(input) {
227
240
  }
228
241
  var QUOTE_TOOL = {
229
242
  name: "q402_quote",
230
- description: "Compare gas costs and supported tokens across the 7 chains Q402 relays for. Read-only \u2014 no API key needed, no funds move. Use this before q402_pay so the user can pick the cheapest chain.",
243
+ description: "Compare gas costs and supported tokens for the chains Q402 relays for. BNB-focus sprint: results are currently restricted to BNB Chain + USDC/USDT (other chains and RLUSD return after the sprint window). Read-only \u2014 no API key needed, no funds move. Use this before q402_pay so the user sees what's currently routable.",
231
244
  // Plain JSON schema mirroring the Zod schema above; MCP servers receive parameters as JSON.
232
245
  inputSchema: {
233
246
  type: "object",
@@ -518,7 +531,7 @@ function describeSandboxReason() {
518
531
  }
519
532
  var PAY_TOOL = {
520
533
  name: "q402_pay",
521
- description: "Send a gasless USDC, USDT, or RLUSD payment via Q402. RLUSD (Ripple USD, NY DFS regulated, decimals 18) is supported on Ethereum mainnet only; USDC/USDT span all seven Q402 chains (Injective is USDT-only). SANDBOX BY DEFAULT \u2014 no funds move unless Q402_API_KEY (live tier), Q402_PRIVATE_KEY, and Q402_ENABLE_REAL_PAYMENTS=1 are all set. The recipient receives the full amount; the sender pays $0 in gas. ALWAYS get explicit user confirmation of the exact recipient address, amount, chain, and token in conversation immediately before calling this tool.",
534
+ description: 'Send a gasless USDC or USDT payment via Q402. BNB-FOCUS SPRINT IS ACTIVE: only chain: "bnb" with token "USDC" or "USDT" is accepted; every other chain and RLUSD return an error directing the caller back to BNB. (The other 6 chains and RLUSD return after the sprint window.) SANDBOX BY DEFAULT \u2014 no funds move unless Q402_API_KEY (live tier), Q402_PRIVATE_KEY, and Q402_ENABLE_REAL_PAYMENTS=1 are all set. The recipient receives the full amount; the sender pays $0 in gas. ALWAYS get explicit user confirmation of the exact recipient address, amount, chain, and token in conversation immediately before calling this tool.',
522
535
  inputSchema: {
523
536
  type: "object",
524
537
  properties: {
@@ -573,16 +586,24 @@ async function runBalance() {
573
586
  body: JSON.stringify({ apiKey: CONFIG.apiKey })
574
587
  });
575
588
  const verifyJson = resp.ok ? await resp.json() : { error: `HTTP ${resp.status}` };
589
+ const v = verifyJson;
590
+ const trialMeta = v && v.isTrial && typeof v.trialExpiresAt === "string" ? {
591
+ daysLeft: typeof v.trialDaysLeft === "number" ? v.trialDaysLeft : 0,
592
+ expiresAt: v.trialExpiresAt,
593
+ creditsRemaining: typeof v.remainingCredits === "number" ? v.remainingCredits : 0,
594
+ signupUrl: "https://q402.quackai.ai"
595
+ } : void 0;
576
596
  return {
577
597
  apiKeyKind: CONFIG.apiKeyKind,
578
598
  apiKeyMasked: mask(CONFIG.apiKey),
579
599
  verify: verifyJson,
580
- dashboardUrl: "https://q402.quackai.ai/dashboard"
600
+ dashboardUrl: "https://q402.quackai.ai/dashboard",
601
+ ...trialMeta ? { trial: trialMeta } : {}
581
602
  };
582
603
  }
583
604
  var BALANCE_TOOL = {
584
605
  name: "q402_balance",
585
- description: "Verify the configured API key and report its plan tier (live vs sandbox). Read-only. For remaining daily quota and per-chain gas tank balances, point the user at https://q402.quackai.ai/dashboard \u2014 those need a wallet signature, not a bare key.",
606
+ description: "Verify the configured API key and report its plan tier (live vs sandbox vs trial). Read-only. When the key is on the free trial, returns the days-left and credits-remaining summary so the agent can surface it. Free trial available at https://q402.quackai.ai \u2014 2,000 gasless TX over 30 days, one wallet signature. For per-chain gas tank balances, point the user at https://q402.quackai.ai/dashboard \u2014 those need a wallet signature, not a bare key.",
586
607
  inputSchema: {
587
608
  type: "object",
588
609
  properties: {},
@@ -755,7 +776,7 @@ var RECEIPT_TOOL = {
755
776
 
756
777
  // src/index.ts
757
778
  var PACKAGE_NAME = "@quackai/q402-mcp";
758
- var PACKAGE_VERSION = "0.3.3";
779
+ var PACKAGE_VERSION = "0.3.5";
759
780
  function jsonText(value) {
760
781
  return { type: "text", text: JSON.stringify(value, null, 2) };
761
782
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quackai/q402-mcp",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "MCP server for Q402 — gasless USDC, USDT, and RLUSD payments across 7 EVM chains, callable directly from Claude Desktop and any other Model Context Protocol client.",
5
5
  "mcpName": "io.github.bitgett/q402-mcp",
6
6
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  "start": "node dist/index.js"
40
40
  },
41
41
  "dependencies": {
42
- "@modelcontextprotocol/sdk": "^1.0.4",
42
+ "@modelcontextprotocol/sdk": "^1.29.0",
43
43
  "ethers": "^6.16.0",
44
44
  "zod": "^3.23.8"
45
45
  },