@true402.dev/mcp-server 0.2.2 → 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/dist/index.js CHANGED
@@ -21,13 +21,14 @@ const SERVER_URL = process.env.SERVER_URL ?? "https://true402.dev/api";
21
21
  const WALLET_PRIVATE_KEY = process.env.WALLET_PRIVATE_KEY;
22
22
  const server = new McpServer({
23
23
  name: "true402",
24
- version: "0.2.2",
24
+ version: "0.4.0",
25
25
  });
26
26
  // Register tools
27
27
  registerModelsTool(server, SERVER_URL);
28
28
  registerChatTool(server, SERVER_URL, WALLET_PRIVATE_KEY);
29
- // Non-LLM paid stalls: seo_audit, web_extract, link_preview,
30
- // robots_check, headers_check (all x402-gated, USDC on Base).
29
+ // Non-LLM paid stalls: web utilities (seo_audit, web_extract, link_preview,
30
+ // robots_check, headers_check) + Base on-chain signals (token_safety, new_pairs,
31
+ // liquidity_pulls, whale_swaps) — all x402-gated, USDC on Base.
31
32
  registerStallTools(server, SERVER_URL, WALLET_PRIVATE_KEY);
32
33
  // Start server with stdio transport
33
34
  async function main() {
@@ -1,6 +1,7 @@
1
1
  import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  /**
3
- * Register all five non-LLM paid stalls (seo_audit, web_extract, link_preview,
4
- * robots_check, headers_check) on the given MCP server.
3
+ * Register all nine non-LLM paid stalls on the given MCP server: the web utilities
4
+ * (seo_audit, web_extract, link_preview, robots_check, headers_check) and the Base
5
+ * on-chain trading signals (token_safety, new_pairs, liquidity_pulls, whale_swaps).
5
6
  */
6
7
  export declare function registerStallTools(server: McpServer, baseUrl: string, walletPrivateKey: string | undefined): void;
@@ -31,8 +31,9 @@ const urlField = z
31
31
  .url()
32
32
  .describe("Absolute http(s) URL of the page to process");
33
33
  /**
34
- * Register all five non-LLM paid stalls (seo_audit, web_extract, link_preview,
35
- * robots_check, headers_check) on the given MCP server.
34
+ * Register all nine non-LLM paid stalls on the given MCP server: the web utilities
35
+ * (seo_audit, web_extract, link_preview, robots_check, headers_check) and the Base
36
+ * on-chain trading signals (token_safety, new_pairs, liquidity_pulls, whale_swaps).
36
37
  */
37
38
  export function registerStallTools(server, baseUrl, walletPrivateKey) {
38
39
  // 1. SEO + GEO audit.
@@ -104,4 +105,118 @@ export function registerStallTools(server, baseUrl, walletPrivateKey) {
104
105
  inputSchema: { url: urlField },
105
106
  buildBody: ({ url }) => ({ url }),
106
107
  });
108
+ // 6. On-chain token safety — rug/honeypot pre-check for a Base ERC-20.
109
+ registerStall(server, baseUrl, walletPrivateKey, {
110
+ toolName: "token_safety",
111
+ path: "/v1/token-safety",
112
+ description: "Rug/honeypot safety check for an ERC-20 token on Base (on-chain reads, no " +
113
+ "API key): ERC-20 conformance, ownership renounce, mint capability, WETH/USDC " +
114
+ "liquidity depth (Uniswap V3 + Aerodrome), and a buy/sell honeypot simulation " +
115
+ "(a gas-free eth_call that round-trips a tiny WETH→token→WETH trade to catch " +
116
+ "tokens you can buy but not sell). Returns a 0-100 score + risk band + flags. " +
117
+ "PAID x402 service (USDC on Base) — needs a funded wallet on the MCP server.",
118
+ inputSchema: {
119
+ token: z
120
+ .string()
121
+ .regex(/^0x[a-fA-F0-9]{40}$/, "must be a 0x-prefixed 20-byte ERC-20 address")
122
+ .describe("ERC-20 contract address (0x…) on Base"),
123
+ chain: z
124
+ .literal("base")
125
+ .optional()
126
+ .describe("Chain to check; only 'base' is supported (default)"),
127
+ },
128
+ buildBody: ({ token, chain }) => {
129
+ const body = { token };
130
+ if (chain !== undefined)
131
+ body.chain = chain;
132
+ return body;
133
+ },
134
+ });
135
+ // 7. New token / new pair detection — recently-created Base DEX pairs.
136
+ registerStall(server, baseUrl, walletPrivateKey, {
137
+ toolName: "new_pairs",
138
+ path: "/v1/base/new-pairs",
139
+ description: "Recently-created Base DEX pairs (Uniswap V3 + Aerodrome) — fresh token launches for " +
140
+ "trading/sniper agents. Returns each new token, its quote (WETH/USDC), pool, fee|stable, " +
141
+ "block and approx age, newest first. Bundle with token_safety for a pre-trade rug/honeypot " +
142
+ "check. On-chain log indexing, no API key. PAID x402 service (USDC on Base) — needs a funded " +
143
+ "wallet on the MCP server.",
144
+ inputSchema: {
145
+ since: z.number().int().nonnegative().optional().describe("Only pairs first seen at or after this block"),
146
+ limit: z.number().int().min(1).max(200).optional().describe("Max pairs to return (1–200, default 50)"),
147
+ dex: z.enum(["uniswap-v3", "aerodrome"]).optional().describe("Filter by DEX"),
148
+ withToken: z.boolean().optional().describe("Only token launches (vs all pools); default true"),
149
+ },
150
+ buildBody: ({ since, limit, dex, withToken }) => {
151
+ const body = {};
152
+ if (since !== undefined)
153
+ body.since = since;
154
+ if (limit !== undefined)
155
+ body.limit = limit;
156
+ if (dex !== undefined)
157
+ body.dex = dex;
158
+ if (withToken !== undefined)
159
+ body.withToken = withToken;
160
+ return body;
161
+ },
162
+ });
163
+ // 8. Liquidity-pull / rug alerts — liquidity-removal (Burn) events on tracked Base pools.
164
+ registerStall(server, baseUrl, walletPrivateKey, {
165
+ toolName: "liquidity_pulls",
166
+ path: "/v1/base/liquidity-pulls",
167
+ description: "Liquidity-pull / rug alerts on Base — liquidity-removal (Burn) events on recently-launched " +
168
+ "DEX pools (Uniswap V3 + Aerodrome). Returns the pool, token, and WETH/USDC amount removed " +
169
+ "(the rug magnitude), newest first — an early rug warning. Cross-check the token with " +
170
+ "token_safety. On-chain log indexing, no API key. PAID x402 service (USDC on Base) — needs a " +
171
+ "funded wallet on the MCP server.",
172
+ inputSchema: {
173
+ since: z.number().int().nonnegative().optional().describe("Only pulls first seen at or after this block"),
174
+ limit: z.number().int().min(1).max(200).optional().describe("Max pulls to return (1–200, default 50)"),
175
+ dex: z.enum(["uniswap-v3", "aerodrome"]).optional().describe("Filter by DEX"),
176
+ minQuote: z.number().nonnegative().optional().describe("Only removals of at least this much WETH/USDC"),
177
+ },
178
+ buildBody: ({ since, limit, dex, minQuote }) => {
179
+ const body = {};
180
+ if (since !== undefined)
181
+ body.since = since;
182
+ if (limit !== undefined)
183
+ body.limit = limit;
184
+ if (dex !== undefined)
185
+ body.dex = dex;
186
+ if (minQuote !== undefined)
187
+ body.minQuote = minQuote;
188
+ return body;
189
+ },
190
+ });
191
+ // 9. Whale swaps — large ($-value) Base DEX Swap events (whale-follow / copy-trade signal).
192
+ registerStall(server, baseUrl, walletPrivateKey, {
193
+ toolName: "whale_swaps",
194
+ path: "/v1/base/whale-swaps",
195
+ description: "Recent large ($-value) Base DEX Swap events (whale trades) on tracked pools — a " +
196
+ "whale-following / copy-trade signal. Returns the pool, dex, token, quote (WETH/USDC), USD " +
197
+ "size, direction (buy/sell of the non-quote token), block and approx age, newest first. " +
198
+ "On-chain log indexing, no API key. PAID x402 service (USDC on Base) — needs a funded wallet " +
199
+ "on the MCP server.",
200
+ inputSchema: {
201
+ min: z.number().nonnegative().optional().describe("Only swaps of at least this USD size (default 10000)"),
202
+ dex: z.enum(["uniswap-v3", "aerodrome"]).optional().describe("Filter by DEX"),
203
+ since: z.number().int().nonnegative().optional().describe("Only swaps at or after this block"),
204
+ limit: z.number().int().min(1).max(200).optional().describe("Max swaps to return (1–200, default 50)"),
205
+ direction: z.enum(["buy", "sell"]).optional().describe("Filter by trade direction (of the non-quote token)"),
206
+ },
207
+ buildBody: ({ min, dex, since, limit, direction }) => {
208
+ const body = {};
209
+ if (min !== undefined)
210
+ body.min = min;
211
+ if (dex !== undefined)
212
+ body.dex = dex;
213
+ if (since !== undefined)
214
+ body.since = since;
215
+ if (limit !== undefined)
216
+ body.limit = limit;
217
+ if (direction !== undefined)
218
+ body.direction = direction;
219
+ return body;
220
+ },
221
+ });
107
222
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@true402.dev/mcp-server",
3
- "version": "0.2.2",
3
+ "version": "0.4.0",
4
4
  "mcpName": "dev.true402/mcp-server",
5
- "description": "MCP server for the true402 machine-native marketplace — pay-per-call AI + web tools over x402 (USDC on Base): LLM inference, SEO/GEO audit, web extract, link preview, robots/AI-crawler check, security headers.",
5
+ "description": "MCP server for the true402 machine-native marketplace — pay-per-call AI + web + Base on-chain tools over x402 (USDC on Base): LLM inference, SEO/GEO audit, web extract, link preview, robots/AI-crawler check, security headers, and on-chain DeFi trading signals (token rug/honeypot safety, new token pairs, liquidity-pull/rug alerts, whale swaps).",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "bin": {
@@ -31,7 +31,12 @@
31
31
  "seo",
32
32
  "geo",
33
33
  "web-scraping",
34
- "tools"
34
+ "tools",
35
+ "defi",
36
+ "trading",
37
+ "onchain",
38
+ "rug-check",
39
+ "honeypot"
35
40
  ],
36
41
  "homepage": "https://true402.dev",
37
42
  "license": "MIT",