@agentsearchhq/agentsearch-mcp 1.3.1 → 1.3.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.
package/README.md CHANGED
@@ -2,14 +2,23 @@
2
2
 
3
3
  MCP (Model Context Protocol) server from [AgentSearch](https://agentsearchhq.com/?utm_source=github&utm_medium=readme&utm_campaign=mcp) for Cursor, Claude Desktop, and other MCP hosts over **stdio**. It has two groups of tools:
4
4
 
5
+ - **Free web search with no setup:** with no configuration, `agentsearch_web_search` uses the free AgentSearch relay (`https://relay.agentsearchhq.com/v1/search`): **25 searches per day per user**, search only, no key or wallet. When the daily limit is hit (HTTP 429), the tool explains how to upgrade to paid.
5
6
  - **Web search, extract and render, pay per call:** `agentsearch_web_search`, `agentsearch_extract` and `agentsearch_render`. Add a wallet key and each call goes through the [Pocket Network Agentic Portal](https://agent.pocket.network) and pays **$0.005 in USDC on Base** over [x402](https://x402.org). No account, no API key, no ETH for gas. Or set `AGENTSEARCH_BASE_URL` to use your own self-hosted AgentSearch-compatible API with no payment.
6
7
  - **AgentSearch Review Board (works out of the box, free):** `agentsearch_review_lookup` checks which Pocket Network, x402 and remote MCP services work right now for a task before you pick one; `agentsearch_review_submit` posts a short structured review after you use one. No configuration or key needed; the board is at https://reviews.agentsearchhq.com.
7
8
 
8
9
  ```bash
9
- npx -y @agentsearchhq/agentsearch-mcp # review tools work immediately
10
+ npx -y @agentsearchhq/agentsearch-mcp # free search + review tools work immediately
10
11
  ```
11
12
 
12
- With neither a wallet key nor `AGENTSEARCH_BASE_URL`, the server still starts and the three web tools return setup instructions without making any network call.
13
+ ### Modes
14
+
15
+ | Config | `agentsearch_web_search` | `agentsearch_extract` / `agentsearch_render` |
16
+ |--------|--------------------------|-----------------------------------------------|
17
+ | Nothing set (default) | Free relay, 25/day per user | Paid tools: return a message ($0.005 per call via the Pocket portal) with how to add a wallet; no network call |
18
+ | `AGENTSEARCH_WALLET_PRIVATE_KEY` | Paid, $0.005 per call via the Pocket portal | Paid, $0.005 per call via the Pocket portal |
19
+ | `AGENTSEARCH_BASE_URL` (takes precedence) | Your self-hosted API | Your self-hosted API |
20
+
21
+ To upgrade from the free relay, set `AGENTSEARCH_WALLET_PRIVATE_KEY` (a new wallet with a little USDC on Base) in this server's `env` and restart your client.
13
22
 
14
23
  ### How the paid mode works
15
24
 
@@ -44,7 +53,7 @@ If `AGENTSEARCH_BASE_URL` is set, it takes precedence and no payment is made:
44
53
  - Extract: `POST {AGENTSEARCH_BASE_URL}/v1/extract`
45
54
  - Render: `POST {AGENTSEARCH_BASE_URL}/v1/render` (headless Chromium; [OpenAPI spec](https://agentsearchhq.com/specs/render-openapi.json))
46
55
 
47
- > **Free relay limitation:** `https://relay.agentsearchhq.com` serves **search only**. With it as `AGENTSEARCH_BASE_URL`, `agentsearch_extract` and `agentsearch_render` return a clear error (instead of a bare `404 {"detail":"Not Found"}`). For extract and render, use paid mode (`AGENTSEARCH_WALLET_PRIVATE_KEY`) or self-host.
56
+ > **Free relay limitation:** `https://relay.agentsearchhq.com` serves **search only**. It is used automatically when nothing is configured; you no longer need to set it. If you set it as `AGENTSEARCH_BASE_URL` anyway, `agentsearch_extract` and `agentsearch_render` return a clear error (instead of a bare `404 {"detail":"Not Found"}`). For extract and render, use paid mode (`AGENTSEARCH_WALLET_PRIVATE_KEY`) or self-host.
48
57
 
49
58
  ---
50
59
 
@@ -96,7 +105,7 @@ Binary: `agentsearch-mcp` → `dist/index.js`
96
105
 
97
106
  | Variable | Required | Notes |
98
107
  |----------|----------|--------|
99
- | `AGENTSEARCH_WALLET_PRIVATE_KEY` | no | Private key (64 hex, `0x` optional) of a dedicated wallet holding USDC on Base. Enables paid mode. Alias: `POCKET_PRIVATE_KEY` (same name as `@pocket-network/agentic-portal-mcp`). |
108
+ | `AGENTSEARCH_WALLET_PRIVATE_KEY` | no | Without it, search uses the free relay (25/day) and extract/render are unavailable. Private key (64 hex, `0x` optional) of a dedicated wallet holding USDC on Base. Enables paid mode. Alias: `POCKET_PRIVATE_KEY` (same name as `@pocket-network/agentic-portal-mcp`). |
100
109
  | `AGENTSEARCH_MAX_TOTAL_ATOMIC` | no | Session spend cap in USDC atomic units. Default `1000000` ($1.00). Alias: `POCKET_MAX_TOTAL_ATOMIC`. |
101
110
  | `AGENTSEARCH_MAX_PER_CALL_ATOMIC` | no | Lower per-call cap; default and maximum `5000` ($0.005). Alias: `POCKET_MAX_PER_CALL_ATOMIC`. |
102
111
  | `AGENTSEARCH_BASE_URL` | no | Base URL of your self-hosted API (no trailing slash). When set, search/extract/render use it instead of the paid portal. |
package/dist/backend.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- /** Chooses how search/extract/render are served: self-hosted base URL, Pocket portal (x402), or a setup message. */
1
+ /** Chooses how search/extract/render are served: self-hosted base URL, Pocket portal (x402), or the free relay (search only). */
2
2
  import { type ExtractRequest, type RenderRequest, type SearchRequest } from "./client.js";
3
3
  import { type PortalOperation } from "./pocket.js";
4
- export type BackendMode = "self-hosted" | "pocket" | "unconfigured";
4
+ export type BackendMode = "self-hosted" | "pocket" | "free-relay";
5
5
  export declare function backendMode(): BackendMode;
6
6
  type ToolResult = {
7
7
  content: {
package/dist/backend.js CHANGED
@@ -1,12 +1,14 @@
1
- /** Chooses how search/extract/render are served: self-hosted base URL, Pocket portal (x402), or a setup message. */
1
+ /** Chooses how search/extract/render are served: self-hosted base URL, Pocket portal (x402), or the free relay (search only). */
2
2
  import { extractPage, hasBaseUrl, loadConfig, renderPage, webSearch } from "./client.js";
3
- import { callPortal, hasWalletKey, PortalError, SETUP_MESSAGE } from "./pocket.js";
3
+ import { callPortal, hasWalletKey, PortalError } from "./pocket.js";
4
+ import { AgentSearchHttpError } from "./client.js";
5
+ import { paidOnlyMessage, relaySearch } from "./relay.js";
4
6
  export function backendMode() {
5
7
  if (hasBaseUrl())
6
8
  return "self-hosted";
7
9
  if (hasWalletKey())
8
10
  return "pocket";
9
- return "unconfigured";
11
+ return "free-relay";
10
12
  }
11
13
  const text = (v) => (typeof v === "string" ? v : JSON.stringify(v, null, 2));
12
14
  const ok = (v) => ({ content: [{ type: "text", text: text(v) }] });
@@ -22,8 +24,11 @@ export async function runOperation(op, body) {
22
24
  : await renderPage(cfg, body);
23
25
  return ok(data);
24
26
  }
25
- if (mode === "unconfigured")
26
- return fail(SETUP_MESSAGE);
27
+ if (mode === "free-relay") {
28
+ if (op === "search")
29
+ return ok(await relaySearch(body));
30
+ return fail(paidOnlyMessage(op === "extract" ? "agentsearch_extract" : "agentsearch_render"));
31
+ }
27
32
  const clean = {};
28
33
  for (const [k, v] of Object.entries(body))
29
34
  if (v !== undefined && v !== null)
@@ -35,6 +40,8 @@ export async function runOperation(op, body) {
35
40
  if (err instanceof PortalError) {
36
41
  return fail(Object.keys(err.detail).length ? { message: err.message, ...err.detail } : err.message);
37
42
  }
43
+ if (err instanceof AgentSearchHttpError && err.status === 429 && mode === "free-relay")
44
+ return fail(err.body);
38
45
  return fail(err instanceof Error ? err.message : String(err));
39
46
  }
40
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAA+D,MAAM,aAAa,CAAC;AACtJ,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAwB,MAAM,aAAa,CAAC;AAIzG,MAAM,UAAU,WAAW;IACzB,IAAI,UAAU,EAAE;QAAE,OAAO,aAAa,CAAC;IACvC,IAAI,YAAY,EAAE;QAAE,OAAO,QAAQ,CAAC;IACpC,OAAO,cAAc,CAAC;AACxB,CAAC;AAID,MAAM,IAAI,GAAG,CAAC,CAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC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GED
@@ -19,7 +19,7 @@ async function main() {
19
19
  ? `base=${process.env.AGENTSEARCH_BASE_URL.trim().replace(/\/+$/, "")}`
20
20
  : mode === "pocket"
21
21
  ? "search/extract/render: pay-per-call via Pocket portal (x402, USDC on Base)"
22
- : "no wallet key or AGENTSEARCH_BASE_URL: search/extract/render will return setup instructions";
22
+ : "no wallet key or AGENTSEARCH_BASE_URL: search uses the free AgentSearch relay (25/day per user); extract/render need a wallet key";
23
23
  console.error(`agentsearch-mcp listening on stdio (${base}; reviews=${loadReviewsConfig().baseUrl})`);
24
24
  }
25
25
  main().catch((err) => {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAE9B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,0DAA0D;IAC1D,2CAA2C;IAC3C,MAAM,IAAI,GAAG,WAAW,EAAE,CAAC;IAC3B,MAAM,IAAI,GACR,IAAI,KAAK,aAAa;QACpB,CAAC,CAAC,QAAQ,OAAO,CAAC,GAAG,CAAC,oBAAqB,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QACxE,CAAC,CAAC,IAAI,KAAK,QAAQ;YACjB,CAAC,CAAC,4EAA4E;YAC9E,CAAC,CAAC,6FAA6F,CAAC;IACtG,OAAO,CAAC,KAAK,CACX,uCAA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aAAa,iBAAiB,EAAE,CAAC,OAAO,GAAG,CACvF,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,OAAO,CAAC,KAAK,CAAC,oCAAoC,OAAO,EAAE,CAAC,CAAC;IAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /** Free AgentSearch relay: search only, 25 searches per day per user, no key or wallet needed. */
2
+ import { type SearchRequest } from "./client.js";
3
+ export declare const FREE_RELAY_URL = "https://relay.agentsearchhq.com";
4
+ export declare const FREE_RELAY_DAILY_LIMIT = 25;
5
+ export declare const FREE_RELAY_LIMIT_MESSAGE: string;
6
+ export declare function paidOnlyMessage(tool: "agentsearch_extract" | "agentsearch_render"): string;
7
+ /** Search through the free relay. Throws AgentSearchHttpError(429, FREE_RELAY_LIMIT_MESSAGE) when the daily limit is hit. */
8
+ export declare function relaySearch(req: SearchRequest): Promise<unknown>;
package/dist/relay.js ADDED
@@ -0,0 +1,49 @@
1
+ /** Free AgentSearch relay: search only, 25 searches per day per user, no key or wallet needed. */
2
+ import { AgentSearchHttpError, requestTimeoutMs } from "./client.js";
3
+ export const FREE_RELAY_URL = "https://relay.agentsearchhq.com";
4
+ export const FREE_RELAY_DAILY_LIMIT = 25;
5
+ const ADD_WALLET = "To add a wallet: set AGENTSEARCH_WALLET_PRIVATE_KEY (or POCKET_PRIVATE_KEY) to the 64-hex private key of a NEW wallet made only for this, in the env block of this MCP server in your client config, fund it with a little USDC on Base (for example $1; no ETH needed), and restart the client.";
6
+ export const FREE_RELAY_LIMIT_MESSAGE = [
7
+ `Free search limit reached: the free AgentSearch relay allows ${FREE_RELAY_DAILY_LIMIT} searches per day per user. It resets daily.`,
8
+ "Upgrade to paid for unlimited search (plus agentsearch_extract and agentsearch_render): each call costs $0.005 in USDC on Base via the Pocket Network Agentic Portal (https://agent.pocket.network) over x402.",
9
+ ADD_WALLET,
10
+ "Or set AGENTSEARCH_BASE_URL to your own self-hosted AgentSearch-compatible API.",
11
+ ].join(" ");
12
+ export function paidOnlyMessage(tool) {
13
+ return [
14
+ `${tool} is a paid tool: $0.005 per call in USDC on Base, paid over x402 through the Pocket Network Agentic Portal (https://agent.pocket.network). No wallet is configured, so no call was made.`,
15
+ `The free relay covers agentsearch_web_search only (${FREE_RELAY_DAILY_LIMIT} searches per day per user).`,
16
+ ADD_WALLET,
17
+ "Spending is capped at $0.005 per call and AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00). Or set AGENTSEARCH_BASE_URL to your own self-hosted AgentSearch-compatible API.",
18
+ "The review tools (agentsearch_review_lookup, agentsearch_review_submit) are free and need no setup.",
19
+ ].join(" ");
20
+ }
21
+ /** Search through the free relay. Throws AgentSearchHttpError(429, FREE_RELAY_LIMIT_MESSAGE) when the daily limit is hit. */
22
+ export async function relaySearch(req) {
23
+ const body = { query: req.query };
24
+ if (req.max_results !== undefined)
25
+ body.max_results = req.max_results;
26
+ const res = await fetch(`${FREE_RELAY_URL}/v1/search`, {
27
+ method: "POST",
28
+ headers: { "content-type": "application/json", accept: "application/json" },
29
+ body: JSON.stringify(body),
30
+ signal: AbortSignal.timeout(requestTimeoutMs()),
31
+ });
32
+ const text = await res.text();
33
+ if (res.status === 429)
34
+ throw new AgentSearchHttpError(429, FREE_RELAY_LIMIT_MESSAGE);
35
+ if (!res.ok)
36
+ throw new AgentSearchHttpError(res.status, text || res.statusText);
37
+ let data;
38
+ try {
39
+ data = text ? JSON.parse(text) : null;
40
+ }
41
+ catch {
42
+ return { raw: text };
43
+ }
44
+ // Keep results provider-neutral.
45
+ if (data && typeof data === "object" && !Array.isArray(data))
46
+ delete data.provider;
47
+ return data;
48
+ }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AAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;QAAE,MAAM,IAAI,oBAAoB,CAAC,GAAG,EAAE,wBAAwB,CAAC,CAAC;IACtF,IAAI,CAAC,GAAG,CAAC,EAAE;QAAE,MAAM,IAAI,oBAAoB,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;IAChF,IAAI,IAAa,CAAC;IAClB,IAAI,CAAC;QACH,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;IACvB,CAAC;IACD,iCAAiC;IACjC,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAQ,IAAgC,CAAC,QAAQ,CAAC;IAChH,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -6,7 +6,7 @@ export const RENDER_DESCRIPTION = [
6
6
  "The response includes the final url, title, status_code, meta (render_ms, chars, truncated, js, lang …), warnings, error, and the rendered page body in each requested format: markdown (default), text, html, and/or links; plus an optional base64 screenshot.",
7
7
  "Use this when the page is a JavaScript-heavy app (SPA, client-rendered docs or dashboards) where agentsearch_extract returns empty or partial content; for static pages prefer agentsearch_extract (faster), and to find pages from a query use agentsearch_web_search.",
8
8
  PAYMENT_SENTENCE,
9
- "Note: the free relay (AGENTSEARCH_BASE_URL=https://relay.agentsearchhq.com) serves search only; this tool needs paid mode (AGENTSEARCH_WALLET_PRIVATE_KEY) or a self-hosted API.",
9
+ "Note: the free relay serves search only; this tool needs paid mode (AGENTSEARCH_WALLET_PRIVATE_KEY) or a self-hosted API.",
10
10
  "Read-only: it loads the page like a browser visit and does not click, submit, or change anything, but it uses the network, has a hard backend deadline of about 4.2 s, and can hit rate limits (HTTP 429).",
11
11
  "Target-site failures (DNS, TLS, timeouts, bot walls, robots.txt) come back as a normal result with a non-null error object {code, message, retryable} and empty or partial content; invalid input or a disallowed URL (HTTP 400, e.g. UPSTREAM_REJECTED), rate limits (429) and service faults (5xx) are MCP errors with the code and whether it is retryable.",
12
12
  "Optional fields are forwarded unchanged to the API, which applies its own defaults and limits.",
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/tools/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,2OAA2O;IAC3O,kQAAkQ;IAClQ,yQAAyQ;IACzQ,gBAAgB;IAChB,kLAAkL;IAClL,4MAA4M;IAC5M,gWAAgW;IAChW,gGAAgG;CACjG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IAClD,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE;YACX,KAAK,EAAE,wBAAwB;YAC/B,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;QACD,WAAW,EAAE;YACX,GAAG,EAAE,CAAC;iBACH,MAAM,EAAE;iBACR,GAAG,EAAE;iBACL,GAAG,CAAC,IAAI,CAAC;iBACT,QAAQ,CAAC,sDAAsD,CAAC;YACnE,OAAO,EAAE,CAAC;iBACP,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,MAAM,EAA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C,IAAI,CAAC;qBACT,QAAQ,EAAE;qBACV,QAAQ,CAAC,gDAAgD,CAAC;aAC9D,CAAC;iBACD,QAAQ,EAAE;iBACV,QAAQ,CAAC,wBAAwB,CAAC;YACrC,UAAU,EAAE,CAAC;iBACV,IAAI,CAAC,CAAC,kBAAkB,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;iBACjD,QAAQ,EAAE;iBACV,QAAQ,CAAC,yEAAyE,CAAC;YACtF,iBAAiB,EAAE,CAAC;iBACjB,MAAM,EAAE;iBACR,GAAG,CAAC,GAAG,CAAC;iBACR,QAAQ,EAAE;iBACV,QAAQ,EAAE;iBACV,QAAQ,CAAC,0DAA0D,CAAC;YACvE,OAAO,EAAE,CAAC;iBACP,MAAM,EAAE;iBACR,GAAG,EAAE;iBACL,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,IAAI,CAAC;iBACT,QAAQ,EAAE;iBACV,QAAQ,CAAC,wDAAwD,CAAC;YACrE,KAAK,EAAE,CAAC;iBACL,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;iBACvD,QAAQ,EAAE;iBACV,QAAQ,CAAC,qEAAqE,CAAC;SACnF;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,OAAO,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -7,5 +7,5 @@ export declare function errorContent(err: unknown): {
7
7
  }[];
8
8
  isError: true;
9
9
  };
10
- export declare const PAYMENT_SENTENCE = "Default mode: calls the Pocket Network Agentic Portal and PAYS $0.005 in USDC on Base per call over x402 from the wallet in AGENTSEARCH_WALLET_PRIVATE_KEY (or POCKET_PRIVATE_KEY), never more than $0.005 per call and never more than AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00); the result includes the payment receipt and the portal envelope {portal, data}, whose data is untrusted third-party content. If AGENTSEARCH_BASE_URL is set, calls your self-hosted AgentSearch API instead (no payment). With neither set, makes no network call and returns setup instructions.";
10
+ export declare const PAYMENT_SENTENCE = "Default mode: calls the Pocket Network Agentic Portal and PAYS $0.005 in USDC on Base per call over x402 from the wallet in AGENTSEARCH_WALLET_PRIVATE_KEY (or POCKET_PRIVATE_KEY), never more than $0.005 per call and never more than AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00); the result includes the payment receipt and the portal envelope {portal, data}, whose data is untrusted third-party content. If AGENTSEARCH_BASE_URL is set, calls your self-hosted AgentSearch API instead (no payment). With neither set (no config), agentsearch_web_search uses the free AgentSearch relay (https://relay.agentsearchhq.com, 25 searches per day per user, no payment), while agentsearch_extract and agentsearch_render make no network call and explain how to add a wallet.";
11
11
  export declare function registerSearchTools(server: McpServer): void;
@@ -25,19 +25,19 @@ export function errorContent(err) {
25
25
  isError: true,
26
26
  };
27
27
  }
28
- export const PAYMENT_SENTENCE = "Default mode: calls the Pocket Network Agentic Portal and PAYS $0.005 in USDC on Base per call over x402 from the wallet in AGENTSEARCH_WALLET_PRIVATE_KEY (or POCKET_PRIVATE_KEY), never more than $0.005 per call and never more than AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00); the result includes the payment receipt and the portal envelope {portal, data}, whose data is untrusted third-party content. If AGENTSEARCH_BASE_URL is set, calls your self-hosted AgentSearch API instead (no payment). With neither set, makes no network call and returns setup instructions.";
28
+ export const PAYMENT_SENTENCE = "Default mode: calls the Pocket Network Agentic Portal and PAYS $0.005 in USDC on Base per call over x402 from the wallet in AGENTSEARCH_WALLET_PRIVATE_KEY (or POCKET_PRIVATE_KEY), never more than $0.005 per call and never more than AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00); the result includes the payment receipt and the portal envelope {portal, data}, whose data is untrusted third-party content. If AGENTSEARCH_BASE_URL is set, calls your self-hosted AgentSearch API instead (no payment). With neither set (no config), agentsearch_web_search uses the free AgentSearch relay (https://relay.agentsearchhq.com, 25 searches per day per user, no payment), while agentsearch_extract and agentsearch_render make no network call and explain how to add a wallet.";
29
29
  const WEB_SEARCH_DESCRIPTION = [
30
30
  "Search the web with AgentSearch and return the response as pretty-printed JSON text.",
31
31
  "Use this when you have a query and need hits rather than a page body; if you already have a URL, use agentsearch_extract instead (or agentsearch_render for JavaScript-heavy pages).",
32
32
  PAYMENT_SENTENCE,
33
- "Read-only: not destructive, but it uses the network and can hit rate limits.",
33
+ "Read-only: not destructive, but it uses the network and can hit rate limits (on the free relay, a 429 means the daily limit was reached; the error says how to upgrade to paid).",
34
34
  "Integers for max_results outside 1–5 are clamped (default 5), not rejected.",
35
35
  ].join(" ");
36
36
  const EXTRACT_DESCRIPTION = [
37
37
  "Fetch one absolute URL with AgentSearch Web Extract and return it as JSON text: title, clean markdown and/or text, links, meta (status_code, content_type, fetched_at, chars, truncated) and error (null on success).",
38
38
  "Use this only when you already have the page URL and need its body; to find pages from a query, use agentsearch_web_search; for JavaScript apps whose content appears only after scripts run, use agentsearch_render.",
39
39
  PAYMENT_SENTENCE,
40
- "Note: the free relay (AGENTSEARCH_BASE_URL=https://relay.agentsearchhq.com) serves search only; this tool needs paid mode (AGENTSEARCH_WALLET_PRIVATE_KEY) or a self-hosted API.",
40
+ "Note: the free relay serves search only; this tool needs paid mode (AGENTSEARCH_WALLET_PRIVATE_KEY) or a self-hosted API.",
41
41
  "Read-only: not destructive, but it fetches over the network and can hit rate limits.",
42
42
  ].join(" ");
43
43
  export function registerSearchTools(server) {
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,UAAU,YAAY,CAAC,IAAa;IACxC,IAAI,CAAC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1
1
  export declare const SERVER_NAME = "agentsearch-mcp";
2
2
  /** Keep in sync with package.json, manifest.json and server.json (checked by tests). */
3
- export declare const SERVER_VERSION = "1.3.1";
3
+ export declare const SERVER_VERSION = "1.3.3";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export const SERVER_NAME = "agentsearch-mcp";
2
2
  /** Keep in sync with package.json, manifest.json and server.json (checked by tests). */
3
- export const SERVER_VERSION = "1.3.1";
3
+ export const SERVER_VERSION = "1.3.3";
4
4
  //# sourceMappingURL=version.js.map
package/manifest.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "manifest_version": "0.3",
3
3
  "name": "agentsearch-mcp",
4
4
  "display_name": "AgentSearch (agentsearchhq.com)",
5
- "version": "1.3.1",
6
- "description": "Web search, page extract and JS render, paid per call ($0.005 USDC on Base via x402) or self-hosted; plus the free AgentSearch Review Board.",
7
- "long_description": "Stdio MCP server from AgentSearch. agentsearch_web_search, agentsearch_extract and agentsearch_render work out of the box with a wallet key: each call goes through the Pocket Network Agentic Portal and pays $0.005 in USDC on Base over x402 (gasless; no account or API key). The server never signs more than $0.005 per call or more than the session cap (default $1.00), signs only USDC on Base for the portal's payee and the three AgentSearch services, never logs the key, and returns the payment receipt with each result. Use a new wallet holding only a little USDC. Set AGENTSEARCH_BASE_URL instead to use your own self-hosted AgentSearch-compatible API with no payment. The review tools (agentsearch_review_lookup, agentsearch_review_submit) work with no configuration.",
5
+ "version": "1.3.3",
6
+ "description": "Free web search out of the box (25/day); web search, page extract and JS render paid per call ($0.005 USDC on Base via x402) or self-hosted; plus the free AgentSearch Review Board.",
7
+ "long_description": "Stdio MCP server from AgentSearch. With no configuration, agentsearch_web_search uses the free AgentSearch relay (25 searches per day per user, search only); agentsearch_extract and agentsearch_render need a wallet key. agentsearch_web_search, agentsearch_extract and agentsearch_render work out of the box with a wallet key: each call goes through the Pocket Network Agentic Portal and pays $0.005 in USDC on Base over x402 (gasless; no account or API key). The server never signs more than $0.005 per call or more than the session cap (default $1.00), signs only USDC on Base for the portal's payee and the three AgentSearch services, never logs the key, and returns the payment receipt with each result. Use a new wallet holding only a little USDC. Set AGENTSEARCH_BASE_URL instead to use your own self-hosted AgentSearch-compatible API with no payment. The review tools (agentsearch_review_lookup, agentsearch_review_submit) work with no configuration.",
8
8
  "author": {
9
9
  "name": "AgentSearch",
10
10
  "url": "https://github.com/agentsearchhq-coder"
@@ -60,7 +60,7 @@
60
60
  "tools": [
61
61
  {
62
62
  "name": "agentsearch_web_search",
63
- "description": "Search the web and return JSON text. Pays $0.005 in USDC on Base per call via the Pocket portal (x402) when a wallet key is set; uses your self-hosted API if AGENTSEARCH_BASE_URL is set. Use extract when you already have a URL. Read-only."
63
+ "description": "Search the web and return JSON text. Free with no config (relay, 25/day per user). Pays $0.005 in USDC on Base per call via the Pocket portal (x402) when a wallet key is set; uses your self-hosted API if AGENTSEARCH_BASE_URL is set. Use extract when you already have a URL. Read-only."
64
64
  },
65
65
  {
66
66
  "name": "agentsearch_extract",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsearchhq/agentsearch-mcp",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "mcpName": "io.github.agentsearchhq-coder/agentsearch-mcp",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/server.json CHANGED
@@ -2,18 +2,18 @@
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.agentsearchhq-coder/agentsearch-mcp",
4
4
  "title": "AgentSearch (agentsearchhq.com)",
5
- "description": "Web search, extract and JS render at $0.005/call (x402, USDC on Base), plus a free Review Board.",
5
+ "description": "Free web search (25/day), plus paid extract/render at $0.005/call (x402) and a free Review Board.",
6
6
  "websiteUrl": "https://agentsearchhq.com/?utm_source=mcp-registry&utm_medium=directory&utm_campaign=listing",
7
7
  "repository": {
8
8
  "url": "https://github.com/agentsearchhq-coder/agentsearch-mcp",
9
9
  "source": "github"
10
10
  },
11
- "version": "1.3.1",
11
+ "version": "1.3.3",
12
12
  "packages": [
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "@agentsearchhq/agentsearch-mcp",
16
- "version": "1.3.1",
16
+ "version": "1.3.3",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  },