verifystack-x402-mcp 0.2.0 → 0.4.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 CHANGED
@@ -22,12 +22,16 @@ No API keys. No subscriptions. Agents pay per request using standard `PAYMENT-RE
22
22
  | `GET` | `/api/defi-yields` | **$0.005** | Live DeFi yield & stablecoin APY scanner powered by **DefiLlama**: filters by chain/symbol/TVL & scores organic Base APY vs reward emissions (60s cache). |
23
23
  | `POST` | `/api/decode-tx` | **$0.005** | EVM transaction decoder & calldata firewall resolving selectors via **OpenChain + EVM RPC** and flagging unlimited ERC-20/NFT approvals. |
24
24
  | `POST` | `/api/domain-intel` | **$0.004** | Domain anti-phishing & trust profiler using **Cloudflare DoH** (`A/MX/SPF/DMARC`), **RDAP** domain age, and HTTPS security headers (60s cache). |
25
+ | `GET` | `/api/web-research` | **$0.004** | Universal tech, news & academic search across **HackerNews, GitHub, arXiv, and Wikipedia** with zero API keys (60s cache). Query: `?q=x402&sources=all&limit=5` |
25
26
  | `POST` | `/api/clean-url` | **$0.005** | Web-to-LLM Markdown & metadata extractor: strips ads, scripts, and navigation boilerplate, returning compact Markdown + token estimate (60s cache). |
26
27
  | `POST` | `/api/wallet-profile` | **$0.008** | Multichain EVM wallet counterparty & gas profiler across **Base, Ethereum, Arbitrum, Optimism, and Polygon** (native/USDC balances, EOA vs contract, nonce activity, live gas fees; 20s cache). |
27
28
  | `POST` | `/api/token-safety` | **$0.008** | Pre-trade token security & liquidity risk audit combining **GoPlus Security**, **Honeypot.is**, and **DexScreener** (`base`, `ethereum`, `arbitrum`, `bsc`, `polygon`, `solana`). |
28
29
  | `POST` | `/api/verify-signature` | **$0.005** | Deterministic signature verifier for `evm_personal` (EIP-191), `evm_eip712`, `evm_erc1271` (live on-chain Smart Wallet RPC), and `ed25519` (Solana Base58/Hex/Base64). |
29
30
  | `POST` | `/api/arb-net-profit` | **$0.005** | Exact arbitrage net profit, break-even spread, and APR after fees, slippage, transfer gas, and funding. |
30
31
  | `POST` | `/api/liquidation-sim` | **$0.005** | Isolated-margin liquidation price, distance-to-liquidation %, risk/reward, and half-Kelly collateral sizing. |
32
+ | `POST` | `/api/contract-intel` | **$0.008** | Smart contract firewall & EIP-1967 proxy inspector via **EVM RPC, Blockscout ABI verification, and Sourcify** (`base`, `ethereum`, `arbitrum`, `optimism`, `polygon`). |
33
+ | `GET` | `/api/spot-perp-basis` | **$0.008** | Live cross-exchange cash-and-carry **Spot vs Perpetual** basis, executable BBO spread & combined 30d carry APR across **Gate.io, OKX, and Hyperliquid**. |
34
+ | `GET` | `/api/dex-market-intel` | **$0.006** | Live multi-chain DEX liquidity, 24h volume, price changes & buy/sell order-flow oracle via **DexScreener and GeckoTerminal**. |
31
35
 
32
36
  ---
33
37
 
@@ -111,12 +115,19 @@ npm install
111
115
 
112
116
  ---
113
117
 
114
- ## Quickstart Script (Node.js)
118
+ ## Code Examples (Python, Node.js, Trading & Agent Bots)
115
119
 
116
- See [examples/quickstart.mjs](./examples/quickstart.mjs):
120
+ See [examples/README.md](./examples/README.md) for all ready-to-run templates:
121
+
122
+ - **Python (`x402[httpx,evm]`):** [examples/python-x402-quickstart.py](./examples/python-x402-quickstart.py)
123
+ - **Autonomous AI Agent Workflow (5 tools):** [examples/agent-workflow.mjs](./examples/agent-workflow.mjs)
124
+ - **4-Layer Pre-Trade Security Gatekeeper:** [examples/pretrade-safety-gate.mjs](./examples/pretrade-safety-gate.mjs)
125
+ - **Automated Yield & Arb Monitor Loop:** [examples/arb-monitor-loop.mjs](./examples/arb-monitor-loop.mjs)
126
+ - **MCP Client Configs (Claude, Cursor, Windsurf):** [examples/mcp-configs.json](./examples/mcp-configs.json)
127
+ - **Minimal Node.js Quickstart:** [examples/quickstart.mjs](./examples/quickstart.mjs)
117
128
 
118
129
  ```bash
119
- X402_BUYER_KEY="0xYOUR_BASE_BUYER_PRIVATE_KEY" node examples/quickstart.mjs
130
+ X402_BUYER_KEY="0xYOUR_BASE_BUYER_PRIVATE_KEY" node examples/agent-workflow.mjs
120
131
  ```
121
132
 
122
133
  Inspect payment requirements directly with `curl`:
@@ -113,6 +113,26 @@ export const TOOLS = [
113
113
  },
114
114
  },
115
115
  },
116
+ {
117
+ name: "verifystack_web_research",
118
+ description:
119
+ "Paid x402 API ($0.004 USDC on Base): Universal multi-source research & news search across HackerNews, GitHub Repositories, arXiv papers, and Wikipedia with zero API keys (60s cache).",
120
+ inputSchema: {
121
+ type: "object",
122
+ required: ["q"],
123
+ properties: {
124
+ q: { type: "string", description: "Search query (2-200 characters)" },
125
+ sources: {
126
+ type: "string",
127
+ description: "Comma-separated: hackernews, github, arxiv, wikipedia, or all",
128
+ },
129
+ limit: {
130
+ type: "number",
131
+ description: "Max items per source (1-15, default 5)",
132
+ },
133
+ },
134
+ },
135
+ },
116
136
  {
117
137
  name: "verifystack_clean_url",
118
138
  description:
@@ -248,6 +268,82 @@ export const TOOLS = [
248
268
  },
249
269
  },
250
270
  },
271
+ {
272
+ name: "verifystack_contract_intel",
273
+ description:
274
+ "Paid x402 API ($0.008 USDC on Base): Smart contract firewall & EIP-1967 proxy inspector via EVM RPC, Blockscout verification/ABI, and Sourcify across Base, Ethereum, Arbitrum, Optimism, and Polygon.",
275
+ inputSchema: {
276
+ type: "object",
277
+ required: ["address"],
278
+ properties: {
279
+ address: {
280
+ type: "string",
281
+ description: "0x EVM smart contract address to inspect",
282
+ },
283
+ chain: {
284
+ type: "string",
285
+ enum: ["base", "ethereum", "arbitrum", "optimism", "polygon"],
286
+ description: "Target EVM chain (default: base)",
287
+ },
288
+ },
289
+ },
290
+ },
291
+ {
292
+ name: "verifystack_spot_perp_basis",
293
+ description:
294
+ "Paid x402 API ($0.008 USDC on Base): Live cross-exchange cash-and-carry Spot vs Perpetual basis, executable BBO spread, and combined 30d carry APR scanner across Gate.io, OKX, and Hyperliquid.",
295
+ inputSchema: {
296
+ type: "object",
297
+ properties: {
298
+ symbol: {
299
+ type: "string",
300
+ description: "Optional asset ticker filter (e.g. BTC, ETH, SOL)",
301
+ },
302
+ minBasisBps: {
303
+ type: "number",
304
+ description: "Minimum absolute executable basis spread in bps (0-5000)",
305
+ },
306
+ notionalUsd: {
307
+ type: "number",
308
+ description: "Optional position size in USD to estimate 30d carry return",
309
+ },
310
+ limit: {
311
+ type: "number",
312
+ description: "Max opportunities returned (1-100, default 15)",
313
+ },
314
+ },
315
+ },
316
+ },
317
+ {
318
+ name: "verifystack_dex_market_intel",
319
+ description:
320
+ "Paid x402 API ($0.006 USDC on Base): Multi-chain DEX liquidity, 24h volume, price changes, and buy/sell order-flow oracle powered by DexScreener and GeckoTerminal.",
321
+ inputSchema: {
322
+ type: "object",
323
+ properties: {
324
+ q: {
325
+ type: "string",
326
+ description: "Token symbol or name query (e.g. AERO, VIRTUAL, PEPE)",
327
+ },
328
+ address: {
329
+ type: "string",
330
+ description: "Optional token contract/mint address",
331
+ },
332
+ chain: {
333
+ type: "string",
334
+ description: "Optional chain filter (base, ethereum, solana, arbitrum, bsc, polygon)",
335
+ },
336
+ minLiquidityUsd: {
337
+ type: "number",
338
+ description: "Minimum pool liquidity in USD (default 5000)",
339
+ },
340
+ limit: {
341
+ type: "number",
342
+ description: "Max pools returned (1-30, default 10)",
343
+ },
344
+ },
345
+ },
346
+ },
251
347
  ];
252
348
 
253
349
  let cachedHttpClientPromise = null;
@@ -311,9 +407,46 @@ function buildRequestSpec(toolName, args = {}, baseUrl = DEFAULT_BASE_URL) {
311
407
  init: { method: "GET" },
312
408
  };
313
409
  }
410
+ if (toolName === "verifystack_web_research") {
411
+ const params = new URLSearchParams();
412
+ if (args.q) params.set("q", String(args.q));
413
+ if (args.sources) params.set("sources", String(args.sources));
414
+ if (args.limit !== undefined) params.set("limit", String(args.limit));
415
+ const qs = params.toString();
416
+ return {
417
+ url: `${baseUrl}/api/web-research${qs ? `?${qs}` : ""}`,
418
+ init: { method: "GET" },
419
+ };
420
+ }
421
+ if (toolName === "verifystack_spot_perp_basis") {
422
+ const params = new URLSearchParams();
423
+ if (args.symbol) params.set("symbol", String(args.symbol));
424
+ if (args.minBasisBps !== undefined) params.set("minBasisBps", String(args.minBasisBps));
425
+ if (args.notionalUsd !== undefined) params.set("notionalUsd", String(args.notionalUsd));
426
+ if (args.limit !== undefined) params.set("limit", String(args.limit));
427
+ const qs = params.toString();
428
+ return {
429
+ url: `${baseUrl}/api/spot-perp-basis${qs ? `?${qs}` : ""}`,
430
+ init: { method: "GET" },
431
+ };
432
+ }
433
+ if (toolName === "verifystack_dex_market_intel") {
434
+ const params = new URLSearchParams();
435
+ if (args.q) params.set("q", String(args.q));
436
+ if (args.address) params.set("address", String(args.address));
437
+ if (args.chain) params.set("chain", String(args.chain));
438
+ if (args.minLiquidityUsd !== undefined) params.set("minLiquidityUsd", String(args.minLiquidityUsd));
439
+ if (args.limit !== undefined) params.set("limit", String(args.limit));
440
+ const qs = params.toString();
441
+ return {
442
+ url: `${baseUrl}/api/dex-market-intel${qs ? `?${qs}` : ""}`,
443
+ init: { method: "GET" },
444
+ };
445
+ }
314
446
 
315
447
  const postRoutes = {
316
448
  verifystack_clean_url: "/api/clean-url",
449
+ verifystack_contract_intel: "/api/contract-intel",
317
450
  verifystack_decode_tx: "/api/decode-tx",
318
451
  verifystack_domain_intel: "/api/domain-intel",
319
452
  verifystack_wallet_profile: "/api/wallet-profile",
@@ -418,7 +551,7 @@ export async function handleRpcMessage(msg, deps = {}) {
418
551
  result: {
419
552
  protocolVersion: "2024-11-05",
420
553
  capabilities: { tools: {} },
421
- serverInfo: { name: "verifystack-x402-mcp", version: "0.2.0" },
554
+ serverInfo: { name: "verifystack-x402-mcp", version: "0.4.0" },
422
555
  },
423
556
  };
424
557
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "verifystack-x402-mcp",
3
3
  "mcpName": "io.github.verifystack-dev/verifystack-x402",
4
- "version": "0.2.0",
5
- "description": "MCP server and x402 client for VerifyStack DeFi Yields, Tx Decoder, Prediction Markets, Domain Intel, Web-to-Markdown & Wallet Oracle (Base USDC)",
4
+ "version": "0.4.0",
5
+ "description": "MCP server and x402 client for 15 pay-per-request VerifyStack crypto, DeFi, contract audit, DEX flow & web research tools (Base USDC)",
6
6
  "type": "module",
7
7
  "bin": {
8
8
  "verifystack-mcp": "bin/verifystack-mcp.mjs",