@quackai/q402-mcp 0.8.4 → 0.8.6
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/dist/index.js +24 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -211,7 +211,7 @@ var isValidPrivateKey = (s) => typeof s === "string" && PRIVATE_KEY_RE.test(s);
|
|
|
211
211
|
|
|
212
212
|
// src/version.ts
|
|
213
213
|
var PACKAGE_NAME = "@quackai/q402-mcp";
|
|
214
|
-
var PACKAGE_VERSION = "0.8.
|
|
214
|
+
var PACKAGE_VERSION = "0.8.6";
|
|
215
215
|
|
|
216
216
|
// src/tools/quote.ts
|
|
217
217
|
import { z } from "zod";
|
|
@@ -2806,6 +2806,12 @@ var BridgeQuoteInputSchema = z10.object({
|
|
|
2806
2806
|
dst: z10.enum(["eth", "avax", "arbitrum"]).describe("Destination chain"),
|
|
2807
2807
|
amount: z10.string().regex(/^\d+$/).describe("USDC amount in raw 6-decimal units (e.g. '1000000' = 1 USDC)"),
|
|
2808
2808
|
destReceiver: z10.string().regex(/^0x[0-9a-fA-F]{40}$/).describe("Destination receiver address (Agentic Wallet on destination)")
|
|
2809
|
+
}).refine((d) => d.src !== d.dst, {
|
|
2810
|
+
// Mirror the rejection in BridgeSendInputSchema so an agent that
|
|
2811
|
+
// accidentally quotes a same-chain "bridge" fails locally instead of
|
|
2812
|
+
// burning a round-trip through /api/ccip/quote.
|
|
2813
|
+
message: "src must differ from dst",
|
|
2814
|
+
path: ["dst"]
|
|
2809
2815
|
});
|
|
2810
2816
|
var BRIDGE_QUOTE_TOOL = {
|
|
2811
2817
|
name: "q402_bridge_quote",
|
|
@@ -2872,6 +2878,12 @@ var BridgeSendInputSchema = z11.object({
|
|
|
2872
2878
|
walletId: z11.string().describe("Agentic Wallet ID (from q402_agentic_info)"),
|
|
2873
2879
|
feeToken: z11.enum(["LINK", "native", "auto"]).optional().describe("Fee token. 'auto' picks cheaper of the two; defaults to LINK."),
|
|
2874
2880
|
sandbox: z11.boolean().optional().describe("Sandbox mode (default true). Set to false for live bridge.")
|
|
2881
|
+
}).refine((d) => d.src !== d.dst, {
|
|
2882
|
+
// Local Zod rejection saves a network round-trip + a Q402 backend log
|
|
2883
|
+
// entry. The /api/ccip/send route also rejects same-chain bridges but
|
|
2884
|
+
// the agent only finds out after burning a request.
|
|
2885
|
+
message: "src must differ from dst",
|
|
2886
|
+
path: ["dst"]
|
|
2875
2887
|
});
|
|
2876
2888
|
var BRIDGE_SEND_TOOL = {
|
|
2877
2889
|
name: "q402_bridge_send",
|
|
@@ -2945,7 +2957,7 @@ var BridgeHistoryInputSchema = z12.object({
|
|
|
2945
2957
|
});
|
|
2946
2958
|
var BRIDGE_HISTORY_TOOL = {
|
|
2947
2959
|
name: "q402_bridge_history",
|
|
2948
|
-
description: "
|
|
2960
|
+
description: "READ-ONLY GUIDANCE TOOL \u2014 bridge history via MCP is not yet wired in this release. It requires owner-sig auth which is dashboard-bound until session-binding lands (same follow-up as live q402_bridge_send). This tool returns a pointer to the dashboard and intentionally surfaces as an error so an LLM does not interpret the prose as an empty result. Future shape (already finalized): most-recent-first list of up to 50 CCIP bridges with messageId, source/destination chains, USDC amount, fee paid, and CCIP Explorer link. Until then, point the user at https://q402.quackai.ai/dashboard \u2192 Agent tab \u2192 Bridge History.",
|
|
2949
2961
|
inputSchema: {
|
|
2950
2962
|
type: "object",
|
|
2951
2963
|
properties: {
|
|
@@ -2961,9 +2973,13 @@ async function runBridgeHistory(_input) {
|
|
|
2961
2973
|
return {
|
|
2962
2974
|
content: [{
|
|
2963
2975
|
type: "text",
|
|
2964
|
-
text:
|
|
2965
|
-
|
|
2966
|
-
|
|
2976
|
+
text: JSON.stringify({
|
|
2977
|
+
implemented: false,
|
|
2978
|
+
reason: "Bridge history via MCP requires owner-sig auth, which is dashboard-bound until session-binding lands in a follow-up release.",
|
|
2979
|
+
dashboardUrl: "https://q402.quackai.ai/dashboard",
|
|
2980
|
+
dashboardPath: "Agent tab \u2192 Bridge History"
|
|
2981
|
+
}, null, 2)
|
|
2982
|
+
}]
|
|
2967
2983
|
};
|
|
2968
2984
|
}
|
|
2969
2985
|
|
|
@@ -2986,6 +3002,7 @@ var BRIDGE_GAS_TANK_TOOL = {
|
|
|
2986
3002
|
}
|
|
2987
3003
|
}
|
|
2988
3004
|
};
|
|
3005
|
+
var GASTANK_ADDRESS = "0x10fb078594b70ee8024b2ded3d67fc3aa9ea747a";
|
|
2989
3006
|
async function runBridgeGasTank(_input) {
|
|
2990
3007
|
return {
|
|
2991
3008
|
content: [{
|
|
@@ -2997,9 +3014,9 @@ async function runBridgeGasTank(_input) {
|
|
|
2997
3014
|
" \u2022 LINK (default, ~10% cheaper)",
|
|
2998
3015
|
" \u2022 native (ETH / AVAX / ETH respectively)",
|
|
2999
3016
|
"",
|
|
3000
|
-
|
|
3017
|
+
`Top up by sending LINK or native to the Q402 Gas Tank address ${GASTANK_ADDRESS} on the source chain. The deposit-scan cron (every ~5 min) credits your Gas Tank automatically; the dashboard's "Verify" button is the immediate self-serve path.`,
|
|
3001
3018
|
"",
|
|
3002
|
-
"Live balance + deposit
|
|
3019
|
+
"Live balance + per-chain deposit detail: https://q402.quackai.ai/dashboard \u2192 Agent tab \u2192 Bridge Gas Tank"
|
|
3003
3020
|
].join("\n")
|
|
3004
3021
|
}]
|
|
3005
3022
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quackai/q402-mcp",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "MCP server for Q402 — gasless USDC/USDT/RLUSD payments + Chainlink CCIP bridge
|
|
3
|
+
"version": "0.8.6",
|
|
4
|
+
"description": "MCP server for Q402 — gasless USDC/USDT/RLUSD payments on 10 EVM chains + Chainlink CCIP USDC bridge on the eth/avax/arbitrum triangle, callable from Claude (Desktop / Code), OpenAI Codex CLI, and any other Model Context Protocol client.",
|
|
5
5
|
"mcpName": "io.github.bitgett/q402-mcp",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"mcp",
|