netintel-mcp 1.1.61 → 1.1.63
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 +28 -14
- package/dist/client.js +1 -1
- package/dist/index.js +24 -1
- package/dist/pay-handoff.js +75 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -2,33 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
MCP server for NetIntel — 123 network intelligence tools for AI agents.
|
|
4
4
|
DNS, SSL, WHOIS, email security, cloud fingerprinting, OSINT and more.
|
|
5
|
-
Pay-per-call via x402 — the NetIntel API accepts USDC on Base or Solana
|
|
5
|
+
Pay-per-call via x402 — the NetIntel API accepts USDC on Base or Solana. No API keys, and no private key to paste: pay from the wallet your agent already has (AgentCash, Coinbase Agentic Wallet or Coinbase Wallet MCP), or give this server a dedicated wallet key.
|
|
6
6
|
Plus 3 router tools that find the best x402 endpoint for a job from **any** provider — [details below](#find-the-right-x402-endpoint-from-any-provider).
|
|
7
7
|
|
|
8
8
|
## Install as a Claude Code plugin (recommended)
|
|
9
9
|
|
|
10
|
-
The plugin installs the MCP server **and** a skill that knows which NetIntel endpoint fits a task
|
|
10
|
+
The plugin installs the MCP server **and** a skill that knows which NetIntel endpoint fits a task, what it costs and how to pay it from the agent's wallet. It asks for an optional agent wallet key (stored in Claude Code's secure storage, never in settings files) — leave it empty if you use AgentCash or the Coinbase Agentic Wallet:
|
|
11
11
|
|
|
12
12
|
```
|
|
13
13
|
/plugin marketplace add kjgueye/netintel-mcp
|
|
14
14
|
/plugin install netintel@netintel
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Then just ask — "is this IP malicious?", "does this domain have DMARC?", "fetch this URL as JSON" — and
|
|
17
|
+
Then just ask — "is this IP malicious?", "does this domain have DMARC?", "fetch this URL as JSON" — and each call is paid from your wallet.
|
|
18
|
+
|
|
19
|
+
## Pay with the wallet you already have
|
|
20
|
+
|
|
21
|
+
With no `EVM_PRIVATE_KEY` set, every paid tool answers with the exact request — URL, method, body — and its price, ready for the agent's own wallet:
|
|
22
|
+
|
|
23
|
+
- **AgentCash** — the agent calls its `fetch` tool with that request. Install: `claude mcp add agentcash --scope user -- npx -y agentcash@latest`.
|
|
24
|
+
- **Coinbase Agentic Wallet** — `npx awal@latest x402 pay '<url>' [-X POST -d '<json>'] --max-amount <atomic>`. Log in once with `npx awal@latest auth login <email>`.
|
|
25
|
+
- **Coinbase Wallet MCP** — `initiate_x402_request`, approve the payment in Coinbase Wallet, then `complete_x402_request`.
|
|
26
|
+
|
|
27
|
+
That wallet's own spending limits apply. The bundled skill (`skills/netintel/SKILL.md`) calls NetIntel the same way even without this server.
|
|
18
28
|
|
|
19
29
|
## Install
|
|
20
30
|
|
|
21
31
|
```bash
|
|
22
|
-
|
|
32
|
+
# pay from AgentCash, Coinbase Agentic Wallet or Coinbase Wallet MCP
|
|
33
|
+
claude mcp add netintel -- npx -y netintel-mcp
|
|
34
|
+
# or let this server pay from a dedicated wallet
|
|
35
|
+
claude mcp add netintel -e EVM_PRIVATE_KEY=0xYOUR_PRIVATE_KEY -- npx -y netintel-mcp
|
|
23
36
|
```
|
|
24
37
|
|
|
25
|
-
Or add manually to your Claude Desktop config:
|
|
38
|
+
Or add manually to your Claude Desktop config (the `env` block is optional — leave it out to pay from your own wallet as above):
|
|
26
39
|
```json
|
|
27
40
|
{
|
|
28
41
|
"mcpServers": {
|
|
29
42
|
"netintel": {
|
|
30
43
|
"command": "npx",
|
|
31
|
-
"args": ["netintel-mcp"],
|
|
44
|
+
"args": ["-y", "netintel-mcp"],
|
|
32
45
|
"env": {
|
|
33
46
|
"EVM_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY"
|
|
34
47
|
}
|
|
@@ -38,8 +51,9 @@ Or add manually to your Claude Desktop config:
|
|
|
38
51
|
```
|
|
39
52
|
|
|
40
53
|
## Requirements
|
|
41
|
-
- **
|
|
42
|
-
- **
|
|
54
|
+
- **None to start.** Without a key every paid tool hands back a ready-to-pay request (see above), and `netintel_wallet_status` explains the options.
|
|
55
|
+
- **Optional:** `EVM_PRIVATE_KEY` — a dedicated agent wallet holding USDC on Base mainnet (gasless; a few dollars is plenty). With it, this server pays every tool's listed price automatically.
|
|
56
|
+
- **Spending limits (≥1.1.55):** with a key, the server refuses to sign a payment above `NETINTEL_MAX_PER_CALL_USD` (default $0.25) or once it has authorized `NETINTEL_MAX_SESSION_USD` (default $5) in total per process; a refusal returns `SPEND_LIMIT: …` and nothing is paid. Listed prices are what a call costs, not a cap — with a key configured every 402 is paid automatically, so authorize paid calls with your user first.
|
|
43
57
|
|
|
44
58
|
## Tools
|
|
45
59
|
|
|
@@ -55,7 +69,7 @@ Or add manually to your Claude Desktop config:
|
|
|
55
69
|
| netintel_cloud_fingerprint | Fingerprints a domain's cloud infrastructure — DNS records, HTTP… | $0.01 |
|
|
56
70
|
| netintel_schema_parse | Extract structured data from any unstructured text into your own JSON… | $0.01 |
|
|
57
71
|
| netintel_asn_lookup | Resolves an IP address or domain to its Autonomous System Number (ASN)… | $0.03 |
|
|
58
|
-
| netintel_whois_lookup |
|
|
72
|
+
| netintel_whois_lookup | WHOIS domain lookup via RDAP — domain registration data: registrar… | $0.003 |
|
|
59
73
|
| netintel_cert_transparency | Query the crt.sh certificate transparency log database to enumerate all… | $0.01 |
|
|
60
74
|
| netintel_subnet_calc | Calculates IPv4/IPv6 subnet details from CIDR notation —… | $0.005 |
|
|
61
75
|
| netintel_dns_propagation | Query a domain's DNS record across 10 geographically distributed public… | $0.03 |
|
|
@@ -95,7 +109,7 @@ Or add manually to your Claude Desktop config:
|
|
|
95
109
|
| netintel_content_moderate | Moderate text content using Claude Haiku — flags categories like… | $0.005 |
|
|
96
110
|
| netintel_entity_extract | Extract named entities from text using Claude Haiku — people… | $0.05 |
|
|
97
111
|
| netintel_sentiment | Sentiment analysis API — analyze sentiment of text and get a text… | $0.002 |
|
|
98
|
-
| netintel_text_summarize |
|
|
112
|
+
| netintel_text_summarize | Summarize text, articles or documents — condense raw text, Markdown, or… | $0.005 |
|
|
99
113
|
| netintel_translate | Translate up to 2000 words between languages using Claude Haiku —… | $0.02 |
|
|
100
114
|
| netintel_translate_short | Translate text between languages — text translation API for short… | $0.01 |
|
|
101
115
|
| netintel_domain_due_diligence | One call combines domain availability, heuristic value appraisal, and… | $0.20 |
|
|
@@ -111,7 +125,7 @@ Or add manually to your Claude Desktop config:
|
|
|
111
125
|
| netintel_markdown | Convert messy HTML or text into clean, well-structured Markdown using… | $0.03 |
|
|
112
126
|
| netintel_normalize | Conform messy or inconsistent JSON to a target schema using Claude… | $0.05 |
|
|
113
127
|
| netintel_text_to_json | Turn unstructured text into structured JSON matching a caller-supplied… | $0.05 |
|
|
114
|
-
| netintel_web | Extract
|
|
128
|
+
| netintel_web | Extract web content from any page or PDF as clean Markdown — web page… | $0.003 |
|
|
115
129
|
| netintel_money | Normalize any messy money string into a typed decimal amount plus ISO… | $0.01 |
|
|
116
130
|
| netintel_calendar | Turn event fields into a valid RFC 5545 .ics calendar file — handles… | $0.005 |
|
|
117
131
|
| netintel_event_classify | Cheap, fast "is this a dateable event?" filter for social and web text… | $0.02 |
|
|
@@ -151,14 +165,14 @@ Or add manually to your Claude Desktop config:
|
|
|
151
165
|
| netintel_currency_exchange_batch | Convert one base currency to up to 30 targets in a single call — fiat… | $0.02 |
|
|
152
166
|
| netintel_currency_exchange_history | Daily historical exchange-rate series for any currency pair — fiat via… | $0.02 |
|
|
153
167
|
| netintel_token_info | Full profile for any ERC-20 token by contract address — name, symbol… | $0.02 |
|
|
154
|
-
| netintel_wallet_balance |
|
|
168
|
+
| netintel_wallet_balance | Token balance for any wallet — native coin, USDC and any ERC-20 on… | $0.005 |
|
|
155
169
|
| netintel_wallet_intel | Counterparty due-diligence for any Base or Ethereum wallet — age… | $0.05 |
|
|
156
170
|
| netintel_iban_validate | Validate any IBAN offline — mod-97 check digits, per-country structure… | $0.005 |
|
|
157
171
|
| netintel_market_snapshot | One-call market briefing for agents — BTC/ETH/SOL spot + 24h moves… | $0.05 |
|
|
158
172
|
| netintel_web_fetch | Fetch any URL and get the raw body back — JSON parsed, everything else… | $0.003 |
|
|
159
|
-
| netintel_weather_current |
|
|
173
|
+
| netintel_weather_current | Current weather for any city or lat/lon worldwide, plus a 3-day… | $0.002 |
|
|
160
174
|
| netintel_weather_forecast | Multi-day weather forecast for any city or lat/lon worldwide — up to 16… | $0.003 |
|
|
161
|
-
| netintel_prediction_markets | Live prediction
|
|
175
|
+
| netintel_prediction_markets | Live prediction market odds from Polymarket — list the top active… | $0.005 |
|
|
162
176
|
| netintel_prediction_market | Full detail for ONE Polymarket prediction market by id or slug —… | $0.003 |
|
|
163
177
|
| netintel_ssl_cert | SSL certificate check for any domain — issuer, subject, SANs, valid… | $0.003 |
|
|
164
178
|
| netintel_text_chunk | Split text into overlapping chunks for RAG ingestion — by characters or… | $0.001 |
|
package/dist/client.js
CHANGED
|
@@ -69,7 +69,7 @@ export async function createClient() {
|
|
|
69
69
|
if (!key) {
|
|
70
70
|
console.error("[netintel-mcp] No EVM_PRIVATE_KEY set — running wallet-less. " +
|
|
71
71
|
(FREE_TOOLS.length ? `Free-tier tools work (${FREE_TOOLS.join(", ")}); ` : "") +
|
|
72
|
-
"paid tools
|
|
72
|
+
"paid tools hand back a ready-to-pay request for the agent's own wallet (AgentCash, Coinbase Agentic Wallet or Coinbase Wallet MCP).");
|
|
73
73
|
return plain;
|
|
74
74
|
}
|
|
75
75
|
const signer = privateKeyToAccount(key);
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { createClient, configuredWallet, walletUsdcBalance, spendStatus, FREE_TOOLS } from "./client.js";
|
|
6
|
+
import { requestFromAxios, payHandoffText } from "./pay-handoff.js";
|
|
6
7
|
function ok(data) {
|
|
7
8
|
return { content: [{ type: "text", text: JSON.stringify(data) }] };
|
|
8
9
|
}
|
|
@@ -16,6 +17,22 @@ function err(e) {
|
|
|
16
17
|
if (limitAt >= 0) {
|
|
17
18
|
return { content: [{ type: "text", text: `Payment refused by your spending limit — nothing was paid. ${msg.slice(limitAt)}` }], isError: true };
|
|
18
19
|
}
|
|
20
|
+
if (status === 402 && !configuredWallet()) {
|
|
21
|
+
// No key here: hand over the exact request so the agent can buy it with a
|
|
22
|
+
// wallet it already has (AgentCash / awal / Coinbase Wallet MCP). See
|
|
23
|
+
// src/pay-handoff.ts. Falls through to the generic text if the request
|
|
24
|
+
// cannot be rebuilt.
|
|
25
|
+
const req = requestFromAxios(ax.config, ax.response?.data);
|
|
26
|
+
if (req) {
|
|
27
|
+
return {
|
|
28
|
+
content: [
|
|
29
|
+
{ type: "text", text: payHandoffText(req) },
|
|
30
|
+
{ type: "text", text: JSON.stringify({ pay_with_your_wallet: req }) },
|
|
31
|
+
],
|
|
32
|
+
isError: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
19
36
|
if (status === 402) {
|
|
20
37
|
// The one error a user can act on: the call needs a payment that did not
|
|
21
38
|
// happen. Say what it costs and exactly what to do, instead of "402".
|
|
@@ -1355,7 +1372,13 @@ function registerWalletTool(server) {
|
|
|
1355
1372
|
? { free_without_wallet: [...FREE_TOOLS], note: "Free tools are rate-limited per client (about 30/hour); over the quota they cost their normal price." }
|
|
1356
1373
|
: {};
|
|
1357
1374
|
if (!address) {
|
|
1358
|
-
return ok({
|
|
1375
|
+
return ok({
|
|
1376
|
+
wallet_configured: false,
|
|
1377
|
+
pay_with_your_own_wallet: "No key is needed if the agent already has a wallet: every paid tool then answers with the exact request and its price, ready for AgentCash (`fetch` tool), Coinbase Agentic Wallet (`npx awal@latest x402 pay …`) or Coinbase Wallet MCP (`initiate_x402_request`). That wallet's own spending limits apply.",
|
|
1378
|
+
get_a_wallet: "AgentCash: `claude mcp add agentcash --scope user -- npx -y agentcash@latest`. Coinbase Agentic Wallet: `npx awal@latest auth login <email>`. Fund either with a few dollars of USDC on Base.",
|
|
1379
|
+
how_to_fund: "Or set EVM_PRIVATE_KEY (or the plugin's wallet config) to a dedicated agent wallet, then send it a few dollars of USDC on Base mainnet — no ETH needed, settlement is gasless. This server then pays directly, within its spending limits.",
|
|
1380
|
+
...free,
|
|
1381
|
+
});
|
|
1359
1382
|
}
|
|
1360
1383
|
try {
|
|
1361
1384
|
const usdc = await walletUsdcBalance();
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
// Wallet-less mode: hand the agent a request it can pay with a wallet it
|
|
3
|
+
// already has, instead of a dead end.
|
|
4
|
+
//
|
|
5
|
+
// Most people who install this server never paste a private key (2,000
|
|
6
|
+
// installs/month, zero paid calls). Agents increasingly carry their own funded
|
|
7
|
+
// wallet — AgentCash (MCP `fetch`), Coinbase Agentic Wallet (`awal` CLI) or
|
|
8
|
+
// Coinbase Wallet MCP (`initiate_x402_request`) — and every one of them pays a
|
|
9
|
+
// plain x402 URL. So when no key is configured, a paid tool answers with the
|
|
10
|
+
// exact request it would have made (URL incl. query, method, JSON body), its
|
|
11
|
+
// price, and the one call per wallet that buys it. The wallet's own spending
|
|
12
|
+
// limits apply; this server never signs anything in this mode.
|
|
13
|
+
/** USDC on Base — the only rail all three wallets pay on. */
|
|
14
|
+
const BASE = "eip155:8453";
|
|
15
|
+
/** The Base quote from a 402 body (v2 `amount` atomic, v1 `price` "$0.002"). */
|
|
16
|
+
export function priceFrom402(body) {
|
|
17
|
+
const accepts = body?.accepts;
|
|
18
|
+
if (!Array.isArray(accepts) || !accepts.length)
|
|
19
|
+
return undefined;
|
|
20
|
+
const a = accepts.find((x) => x?.network === BASE) ?? accepts[0];
|
|
21
|
+
if (/^\d+$/.test(String(a?.amount ?? "")))
|
|
22
|
+
return { usd: Number(a.amount) / 1_000_000, atomic: String(a.amount) };
|
|
23
|
+
const m = /^\$?(\d+(?:\.\d+)?)$/.exec(String(a?.price ?? "").trim());
|
|
24
|
+
if (m) {
|
|
25
|
+
const usd = Number(m[1]);
|
|
26
|
+
return { usd, atomic: String(Math.round(usd * 1_000_000)) };
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
/** Rebuild the exact request an axios call made (absolute URL with its query, method, body). */
|
|
31
|
+
export function requestFromAxios(config, body402) {
|
|
32
|
+
if (!config?.url)
|
|
33
|
+
return undefined;
|
|
34
|
+
const url = axios.getUri(config);
|
|
35
|
+
if (!/^https:\/\//.test(url))
|
|
36
|
+
return undefined;
|
|
37
|
+
const method = String(config.method ?? "get").toUpperCase() === "POST" ? "POST" : "GET";
|
|
38
|
+
let body;
|
|
39
|
+
if (method === "POST" && config.data !== undefined) {
|
|
40
|
+
try {
|
|
41
|
+
body = typeof config.data === "string" ? JSON.parse(config.data) : config.data;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
body = config.data;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const price = priceFrom402(body402);
|
|
48
|
+
return { url, method, ...(body !== undefined ? { body } : {}), ...(price ? { price_usd: price.usd, max_amount_atomic: price.atomic } : {}) };
|
|
49
|
+
}
|
|
50
|
+
/** Single-quote for a POSIX shell (agents paste these into a terminal). */
|
|
51
|
+
const sq = (s) => `'${s.replace(/'/g, `'\\''`)}'`;
|
|
52
|
+
/** The agent-facing text: price, then one exact call per wallet, then setup if it has none. */
|
|
53
|
+
export function payHandoffText(r) {
|
|
54
|
+
const usd = r.price_usd !== undefined ? `$${r.price_usd}` : undefined;
|
|
55
|
+
const json = r.body !== undefined ? JSON.stringify(r.body) : undefined;
|
|
56
|
+
const fetchArgs = { url: r.url, method: r.method, ...(json ? { body: json } : {}) };
|
|
57
|
+
const awal = [
|
|
58
|
+
"npx awal@latest x402 pay", sq(r.url),
|
|
59
|
+
...(r.method === "POST" ? ["-X POST"] : []),
|
|
60
|
+
...(json ? ["-d", sq(json)] : []),
|
|
61
|
+
...(r.max_amount_atomic ? ["--max-amount", r.max_amount_atomic] : []),
|
|
62
|
+
].join(" ");
|
|
63
|
+
const initiate = {
|
|
64
|
+
url: r.url, method: r.method,
|
|
65
|
+
...(r.body !== undefined ? { body: r.body } : {}),
|
|
66
|
+
maxPayment: r.price_usd !== undefined ? String(r.price_usd) : "0.01",
|
|
67
|
+
};
|
|
68
|
+
return [
|
|
69
|
+
`Payment required — this call costs ${usd ?? "a listed price"} (USDC on Base). No NetIntel wallet key is set here, so pay it with a wallet you already have; tell the user the price first.`,
|
|
70
|
+
`• AgentCash: call its \`fetch\` tool with ${JSON.stringify(fetchArgs)}`,
|
|
71
|
+
`• Coinbase Agentic Wallet (shell): ${awal}`,
|
|
72
|
+
`• Coinbase Wallet MCP: \`initiate_x402_request\` with ${JSON.stringify(initiate)}, ask the user to approve the payment, then \`complete_x402_request\` with the requestId.`,
|
|
73
|
+
"No wallet yet? The quickest are AgentCash (`claude mcp add agentcash --scope user -- npx -y agentcash@latest`, then fund it) or Coinbase Agentic Wallet (`npx awal@latest auth login <email>`, then fund it). Or set EVM_PRIVATE_KEY to a dedicated wallet holding USDC on Base and this server pays directly. Never ask the user to paste a private key into the chat.",
|
|
74
|
+
].join("\n");
|
|
75
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netintel-mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.63",
|
|
4
4
|
"mcpName": "io.github.kjgueye/netintel-mcp",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsc",
|
|
21
|
+
"test": "tsc && node --test tests/*.test.mjs",
|
|
22
|
+
"test:live": "tsc && node tests/walletless-live.mjs",
|
|
21
23
|
"dev": "ts-node src/index.ts",
|
|
22
24
|
"prepublishOnly": "npm run build"
|
|
23
25
|
},
|