auditor-mcp 0.1.2 → 0.1.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.
Files changed (2) hide show
  1. package/dist/index.js +13 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
7
7
  import { readFile } from "fs/promises";
8
8
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
9
9
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
10
- import { wrapFetchWithPayment, x402Client, x402HTTPClient } from "@x402/fetch";
10
+ import { wrapFetchWithPayment, x402Client, x402HTTPClient, decodePaymentResponseHeader } from "@x402/fetch";
11
11
  import { Mppx as MppxClient } from "mppx/client";
12
12
  import { stellar as stellarMpp } from "@stellar/mpp/charge/client";
13
13
  import { z } from "zod";
@@ -256,6 +256,17 @@ server.tool(
256
256
  isError: true
257
257
  };
258
258
  }
259
+ let stellarTxUrl = null;
260
+ try {
261
+ const paymentResponseHeader = response.headers.get("PAYMENT-RESPONSE");
262
+ if (paymentResponseHeader) {
263
+ const settlement = decodePaymentResponseHeader(paymentResponseHeader);
264
+ if (settlement && typeof settlement.transaction === "string" && settlement.transaction) {
265
+ stellarTxUrl = `https://stellar.expert/explorer/testnet/tx/${settlement.transaction}`;
266
+ }
267
+ }
268
+ } catch {
269
+ }
259
270
  const rawBody = await response.text();
260
271
  if (!response.ok) {
261
272
  return {
@@ -296,7 +307,7 @@ ${rawBody}` }],
296
307
  file: file_path,
297
308
  protocol: "x402 / Stellar Testnet",
298
309
  walletAddress: signer.address,
299
- stellarTxUrl: report?.stellarTxUrl ?? null,
310
+ stellarTxUrl,
300
311
  model: report?.model,
301
312
  summary: summary || "No vulnerabilities found",
302
313
  findings
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auditor-mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "MCP server that audits Soroban smart contracts via autonomous x402 / Stripe MPP payments on Stellar Testnet",
6
6
  "keywords": [