@quackai/q402-mcp 0.8.2 → 0.8.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 +6 -2
- package/dist/index.js +73 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -153,7 +153,7 @@ Then export the values in `~/.zshrc` / `~/.bashrc`. See the [Codex config refere
|
|
|
153
153
|
|
|
154
154
|
## Tools exposed
|
|
155
155
|
|
|
156
|
-
**
|
|
156
|
+
**20 tools** — read-only by default; live mode needs an API key + signing path + `Q402_ENABLE_REAL_PAYMENTS=1`.
|
|
157
157
|
|
|
158
158
|
| Tool | Auth | Purpose |
|
|
159
159
|
|---|---|---|
|
|
@@ -173,8 +173,12 @@ Then export the values in `~/.zshrc` / `~/.bashrc`. See the [Codex config refere
|
|
|
173
173
|
| `q402_recurring_resume` | api key | Resume a paused / stopped rule. |
|
|
174
174
|
| `q402_recurring_skip_next` | api key | Skip only the next scheduled fire. |
|
|
175
175
|
| `q402_recurring_cancel` | api key | Permanently stop a rule. |
|
|
176
|
+
| `q402_bridge_quote` | none | Quote a Chainlink CCIP USDC bridge across eth/avax/arbitrum. Returns LINK + native fee. |
|
|
177
|
+
| `q402_bridge_send` | live mode | Execute the bridge. v0.8.2 ships sandbox-only; live execution lands once session-binding ships. |
|
|
178
|
+
| `q402_bridge_history` | api key | Recent CCIP bridges (50 most recent). |
|
|
179
|
+
| `q402_bridge_gas_tank` | api key | Per-chain LINK + native Gas Tank balance for bridge fees. |
|
|
176
180
|
|
|
177
|
-
`q402_pay` + `q402_batch_pay` require explicit in-chat confirmation. Batch confirmation = full batch, not per-row.
|
|
181
|
+
`q402_pay` + `q402_batch_pay` + `q402_bridge_send` require explicit in-chat confirmation. Batch confirmation = full batch, not per-row.
|
|
178
182
|
|
|
179
183
|
> ℹ️ `q402_pay` expects a 0x address — ENS isn't resolved server-side. Resolve client-side first.
|
|
180
184
|
> Per-chain Gas Tank balances + full TX history live in the [dashboard](https://q402.quackai.ai/dashboard) (wallet-signature only).
|
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.3";
|
|
215
215
|
|
|
216
216
|
// src/tools/quote.ts
|
|
217
217
|
import { z } from "zod";
|
|
@@ -2813,10 +2813,26 @@ var BRIDGE_QUOTE_TOOL = {
|
|
|
2813
2813
|
inputSchema: {
|
|
2814
2814
|
type: "object",
|
|
2815
2815
|
properties: {
|
|
2816
|
-
src: {
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2816
|
+
src: {
|
|
2817
|
+
type: "string",
|
|
2818
|
+
enum: ["eth", "avax", "arbitrum"],
|
|
2819
|
+
description: "Source chain."
|
|
2820
|
+
},
|
|
2821
|
+
dst: {
|
|
2822
|
+
type: "string",
|
|
2823
|
+
enum: ["eth", "avax", "arbitrum"],
|
|
2824
|
+
description: "Destination chain (MUST differ from src; pool only routes inside the 3-chain triangle)."
|
|
2825
|
+
},
|
|
2826
|
+
amount: {
|
|
2827
|
+
type: "string",
|
|
2828
|
+
pattern: "^[0-9]+$",
|
|
2829
|
+
description: "USDC amount in raw 6-decimal units (e.g. '1000000' = 1 USDC). Integer string only."
|
|
2830
|
+
},
|
|
2831
|
+
destReceiver: {
|
|
2832
|
+
type: "string",
|
|
2833
|
+
pattern: "^0x[0-9a-fA-F]{40}$",
|
|
2834
|
+
description: "Destination receiver (0x 20-byte address). Same EOA on the destination chain."
|
|
2835
|
+
}
|
|
2820
2836
|
},
|
|
2821
2837
|
required: ["src", "dst", "amount", "destReceiver"]
|
|
2822
2838
|
}
|
|
@@ -2832,9 +2848,17 @@ async function runBridgeQuote(input) {
|
|
|
2832
2848
|
if (!res.ok) {
|
|
2833
2849
|
return { content: [{ type: "text", text: `Quote failed (HTTP ${res.status}): ${JSON.stringify(data)}` }], isError: true };
|
|
2834
2850
|
}
|
|
2851
|
+
const recommended = data.recommended;
|
|
2852
|
+
const link = data.fee?.link;
|
|
2853
|
+
const native = data.fee?.native;
|
|
2854
|
+
const otherKey = recommended === "link" ? "native" : "link";
|
|
2855
|
+
const recUsd = recommended ? data.fee?.[recommended]?.usd : void 0;
|
|
2856
|
+
const otherUsd = recommended ? data.fee?.[otherKey]?.usd : void 0;
|
|
2857
|
+
const cheaper = recommended && typeof recUsd === "number" ? `Cheaper: ${recommended.toUpperCase()} (~$${recUsd.toFixed(4)} vs $${(otherUsd ?? 0).toFixed(4)})` : "Quote returned.";
|
|
2835
2858
|
return {
|
|
2836
2859
|
content: [
|
|
2837
|
-
{ type: "text", text:
|
|
2860
|
+
{ type: "text", text: cheaper },
|
|
2861
|
+
{ type: "text", text: JSON.stringify({ recommended, link, native }, null, 2) }
|
|
2838
2862
|
]
|
|
2839
2863
|
};
|
|
2840
2864
|
}
|
|
@@ -2855,12 +2879,34 @@ var BRIDGE_SEND_TOOL = {
|
|
|
2855
2879
|
inputSchema: {
|
|
2856
2880
|
type: "object",
|
|
2857
2881
|
properties: {
|
|
2858
|
-
src: {
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2882
|
+
src: {
|
|
2883
|
+
type: "string",
|
|
2884
|
+
enum: ["eth", "avax", "arbitrum"],
|
|
2885
|
+
description: "Source chain."
|
|
2886
|
+
},
|
|
2887
|
+
dst: {
|
|
2888
|
+
type: "string",
|
|
2889
|
+
enum: ["eth", "avax", "arbitrum"],
|
|
2890
|
+
description: "Destination chain (MUST differ from src)."
|
|
2891
|
+
},
|
|
2892
|
+
amount: {
|
|
2893
|
+
type: "string",
|
|
2894
|
+
pattern: "^[0-9]+$",
|
|
2895
|
+
description: "USDC amount in raw 6-decimal units (e.g. '1000000' = 1 USDC). Integer string only."
|
|
2896
|
+
},
|
|
2897
|
+
walletId: {
|
|
2898
|
+
type: "string",
|
|
2899
|
+
description: "Agentic Wallet ID (from q402_agentic_info)."
|
|
2900
|
+
},
|
|
2901
|
+
feeToken: {
|
|
2902
|
+
type: "string",
|
|
2903
|
+
enum: ["LINK", "native", "auto"],
|
|
2904
|
+
description: "Fee token. Default: LINK (~10% cheaper). 'auto' picks cheaper at quote time."
|
|
2905
|
+
},
|
|
2906
|
+
sandbox: {
|
|
2907
|
+
type: "boolean",
|
|
2908
|
+
description: "Sandbox-only in v0.8.3 (live bridging requires dashboard session-binding). Default true."
|
|
2909
|
+
}
|
|
2864
2910
|
},
|
|
2865
2911
|
required: ["src", "dst", "amount", "walletId"]
|
|
2866
2912
|
}
|
|
@@ -2903,7 +2949,11 @@ var BRIDGE_HISTORY_TOOL = {
|
|
|
2903
2949
|
inputSchema: {
|
|
2904
2950
|
type: "object",
|
|
2905
2951
|
properties: {
|
|
2906
|
-
ownerAddress: {
|
|
2952
|
+
ownerAddress: {
|
|
2953
|
+
type: "string",
|
|
2954
|
+
pattern: "^0x[0-9a-fA-F]{40}$",
|
|
2955
|
+
description: "Owner EOA (0x address, optional \u2014 defaults to configured wallet)."
|
|
2956
|
+
}
|
|
2907
2957
|
}
|
|
2908
2958
|
}
|
|
2909
2959
|
};
|
|
@@ -2911,8 +2961,9 @@ async function runBridgeHistory(_input) {
|
|
|
2911
2961
|
return {
|
|
2912
2962
|
content: [{
|
|
2913
2963
|
type: "text",
|
|
2914
|
-
text: "Bridge history via MCP requires owner-sig auth, which is dashboard-managed in v0.8.
|
|
2915
|
-
}]
|
|
2964
|
+
text: "Bridge history via MCP requires owner-sig auth, which is dashboard-managed in v0.8.3. View at https://q402.quackai.ai/dashboard \u2192 Agent tab \u2192 Bridge History."
|
|
2965
|
+
}],
|
|
2966
|
+
isError: true
|
|
2916
2967
|
};
|
|
2917
2968
|
}
|
|
2918
2969
|
|
|
@@ -2923,11 +2974,15 @@ var BridgeGasTankInputSchema = z13.object({
|
|
|
2923
2974
|
});
|
|
2924
2975
|
var BRIDGE_GAS_TANK_TOOL = {
|
|
2925
2976
|
name: "q402_bridge_gas_tank",
|
|
2926
|
-
description: "Report the user's Bridge Gas Tank state \u2014 LINK + native balance per CCIP chain (eth/avax/arbitrum). Q402 charges no markup on bridges; users pay only the actual Chainlink CCIP fee, debited from this Gas Tank. LINK fees are ~10% cheaper than native. Tool returns guidance + dashboard URL in v0.8.
|
|
2977
|
+
description: "Report the user's Bridge Gas Tank state \u2014 LINK + native balance per CCIP chain (eth/avax/arbitrum). Q402 charges no markup on bridges; users pay only the actual Chainlink CCIP fee, debited from this Gas Tank. LINK fees are ~10% cheaper than native. Tool returns guidance + dashboard URL in v0.8.3.",
|
|
2927
2978
|
inputSchema: {
|
|
2928
2979
|
type: "object",
|
|
2929
2980
|
properties: {
|
|
2930
|
-
ownerAddress: {
|
|
2981
|
+
ownerAddress: {
|
|
2982
|
+
type: "string",
|
|
2983
|
+
pattern: "^0x[0-9a-fA-F]{40}$",
|
|
2984
|
+
description: "Owner EOA (0x address, optional \u2014 defaults to configured wallet)."
|
|
2985
|
+
}
|
|
2931
2986
|
}
|
|
2932
2987
|
}
|
|
2933
2988
|
};
|
|
@@ -2942,7 +2997,7 @@ async function runBridgeGasTank(_input) {
|
|
|
2942
2997
|
" \u2022 LINK (default, ~10% cheaper)",
|
|
2943
2998
|
" \u2022 native (ETH / AVAX / ETH respectively)",
|
|
2944
2999
|
"",
|
|
2945
|
-
"Top up by sending LINK or native to the Q402 facilitator address on the source chain. The next deposit-scan cron tick (
|
|
3000
|
+
"Top up by sending LINK or native to the Q402 facilitator address on the source chain. The next deposit-scan cron tick (~5 min) credits your Gas Tank.",
|
|
2946
3001
|
"",
|
|
2947
3002
|
"Live balance + deposit addresses: https://q402.quackai.ai/dashboard \u2192 Agent tab \u2192 Bridge Gas Tank"
|
|
2948
3003
|
].join("\n")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quackai/q402-mcp",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "MCP server for Q402 — gasless USDC/USDT/RLUSD payments + Chainlink CCIP bridge across 10 EVM chains, 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": [
|