@forgemeshlabs/x402-ads-mcp 0.2.2 → 0.2.4
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 +1 -0
- package/index.js +17 -1
- package/package.json +1 -1
- package/server.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# @forgemeshlabs/x402-ads-mcp
|
|
2
2
|
|
|
3
3
|
[](https://m8ven.ai/mcp/forgemeshlabs-x402-ads-mcp-lwf9ka)
|
|
4
|
+
[](https://mcpservers.org/servers/forgemeshlabs/x402-ads-mcp)
|
|
4
5
|
|
|
5
6
|
**Install one middleware. Monetize unused 402 responses with recommendations, discovery, and machine commerce analytics.**
|
|
6
7
|
|
package/index.js
CHANGED
|
@@ -16,6 +16,7 @@ const BASE_RPC_URL = process.env.BASE_RPC_URL || "https://mainnet.base.org";
|
|
|
16
16
|
const WINDOWS = ["24h", "7d", "30d", "all"];
|
|
17
17
|
|
|
18
18
|
const TOOL_SCHEMAS = {
|
|
19
|
+
list_tools: {},
|
|
19
20
|
get_network_counters: {},
|
|
20
21
|
preview_recommendations: {
|
|
21
22
|
service: z.string().max(120).optional().describe("Your service identifier, used only for self-exclusion in results"),
|
|
@@ -39,6 +40,18 @@ const TOOL_SCHEMAS = {
|
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
const TOOLS = [
|
|
43
|
+
{
|
|
44
|
+
name: "list_tools",
|
|
45
|
+
title: "List Tools",
|
|
46
|
+
annotations: {
|
|
47
|
+
readOnlyHint: true,
|
|
48
|
+
destructiveHint: false,
|
|
49
|
+
idempotentHint: true,
|
|
50
|
+
openWorldHint: true,
|
|
51
|
+
},
|
|
52
|
+
description:
|
|
53
|
+
"Free. Lists every x402 Ads tool with its live price, so an agent can pick before paying. Fetches GET /menu with no payment.",
|
|
54
|
+
},
|
|
42
55
|
{
|
|
43
56
|
name: "get_network_counters",
|
|
44
57
|
title: "Get Network Counters",
|
|
@@ -241,6 +254,9 @@ function qs(params) {
|
|
|
241
254
|
}
|
|
242
255
|
|
|
243
256
|
async function callTool(name, args = {}) {
|
|
257
|
+
// list_tools is free: plain fetch of /menu, no wallet, never touches paidGet.
|
|
258
|
+
// The server may attach a labeled `sponsored` data field; pass it through untouched.
|
|
259
|
+
if (name === "list_tools") return freeGet("/menu");
|
|
244
260
|
if (name === "get_network_counters") return freeGet("/v1/counters");
|
|
245
261
|
|
|
246
262
|
if (name === "preview_recommendations") {
|
|
@@ -276,7 +292,7 @@ function textResult(value) {
|
|
|
276
292
|
return { content: [{ type: "text", text: JSON.stringify(value, null, 2) }] };
|
|
277
293
|
}
|
|
278
294
|
|
|
279
|
-
const server = new McpServer({ name: "x402-ads-mcp", version: "0.
|
|
295
|
+
const server = new McpServer({ name: "x402-ads-mcp", version: "0.2.4" });
|
|
280
296
|
server.server.onerror = (error) => {
|
|
281
297
|
console.error(error instanceof Error ? error.message : String(error));
|
|
282
298
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgemeshlabs/x402-ads-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"mcpName": "io.github.forgemeshlabs/x402-ads-mcp",
|
|
5
5
|
"description": "Install one middleware. Monetize unused 402 responses with recommendations, discovery, and machine commerce analytics. MCP server: 7 tools for agent demand analytics, paid per call in USDC on Base; free for publishers on their own traffic.",
|
|
6
6
|
"main": "index.js",
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/forgemeshlabs/x402-ads-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.4",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "@forgemeshlabs/x402-ads-mcp",
|
|
14
|
-
"version": "0.2.
|
|
14
|
+
"version": "0.2.4",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|
|
@@ -56,4 +56,4 @@
|
|
|
56
56
|
]
|
|
57
57
|
}
|
|
58
58
|
]
|
|
59
|
-
}
|
|
59
|
+
}
|