@agentsearchhq/agentsearch-mcp 1.8.1 → 1.8.2

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/.env.example CHANGED
@@ -3,17 +3,17 @@
3
3
 
4
4
  # --- Pay per call (extract/render; search too only with AGENTSEARCH_MODE=paid) ---
5
5
  # Private key (64 hex) of a NEW wallet made only for this, holding a little USDC on Base.
6
- # Paid calls go to AgentSearch's own x402 API on Base by default: search $0.008, extract $0.004, render $0.010 (USDC).
6
+ # Paid calls go to AgentSearch's own x402 API on Base by default: search $0.003, extract $0.002, render $0.005 (USDC).
7
7
  # No ETH needed. The key is used only to sign payments. Alias: POCKET_PRIVATE_KEY.
8
8
  AGENTSEARCH_WALLET_PRIVATE_KEY=
9
9
  # Session spend cap in USDC atomic units (1000000 = $1.00, the default). Alias: POCKET_MAX_TOTAL_ATOMIC.
10
10
  # AGENTSEARCH_MAX_TOTAL_ATOMIC=1000000
11
- # Optional lower per-call cap (cannot exceed 10000 = $0.010; 5000 on the Pocket route). Alias: POCKET_MAX_PER_CALL_ATOMIC.
12
- # AGENTSEARCH_MAX_PER_CALL_ATOMIC=10000
11
+ # Optional lower per-call cap (cannot exceed 20000 = $0.020; 5000 on the Pocket route). Alias: POCKET_MAX_PER_CALL_ATOMIC.
12
+ # AGENTSEARCH_MAX_PER_CALL_ATOMIC=20000
13
13
  # Paid route: direct (default, AgentSearch's own x402 API) or pocket (Pocket Network Agentic Portal, $0.005 per call).
14
14
  # AGENTSEARCH_PAYMENT_ROUTE=direct
15
15
 
16
- # Search mode (search only): free (default, free relay even if a wallet key is set), paid (pay $0.008 per search, $0.005 on the Pocket route; needs the key above),
16
+ # Search mode (search only): free (default, free relay even if a wallet key is set), paid (pay $0.005 per search, $0.005 on the Pocket route; needs the key above),
17
17
  # auto (paid search when a wallet key is set, as in 1.3.0-1.3.4).
18
18
  # AGENTSEARCH_MODE=free
19
19
 
package/.mcpbignore CHANGED
@@ -41,3 +41,8 @@
41
41
  *.mcpb
42
42
  *.tgz
43
43
  *.log
44
+
45
+ # Cursor plugin files (not part of the MCPB bundle)
46
+ .cursor-plugin/
47
+ /skills/
48
+ /mcp.json
package/README.md CHANGED
@@ -4,16 +4,16 @@ MCP (Model Context Protocol) server from [AgentSearch](https://agentsearchhq.com
4
4
 
5
5
  - **Free web search with no setup:** with no configuration, `agentsearch_web_search` uses the AgentSearch free tier (`https://relay.agentsearchhq.com/v1/search`): **up to 25 searches/day per IP, subject to shared daily capacity**, no key or wallet. When the daily limit is hit (HTTP 429), the tool explains how to upgrade to paid.
6
6
  - **Extract and render free trial, no wallet (new in 1.4.0):** with no wallet key, `agentsearch_extract` (**5 calls/day per IP**) and `agentsearch_render` (**3 calls/day per IP**, text output, no screenshots) use the AgentSearch free trial on the same relay. Past it they return HTTP 429 with [wallet setup](https://agentsearchhq.com/wallet-setup?utm_source=github&utm_medium=readme&utm_campaign=mcp) steps. Set `AGENTSEARCH_FREE_TRIAL=0` to turn the trial off.
7
- - **Extract and render, pay per call (search too, if you opt in):** `agentsearch_extract` and `agentsearch_render`. Add a wallet key and these pay **AgentSearch's own x402 API** on Base (`https://api.agentsearchhq.com`) in USDC: **extract $0.004, render $0.010 per call**, charged only when a usable answer comes back. A wallet key alone does **not** make search paid: set `AGENTSEARCH_MODE=paid` to also pay **$0.008 per search call**. No account, no API key, no ETH for gas. The [Pocket Network Agentic Portal](https://agent.pocket.network) route ($0.005 per call) is still available with `AGENTSEARCH_PAYMENT_ROUTE=pocket` for search, extract and render. Or set `AGENTSEARCH_BASE_URL` to use your own self-hosted AgentSearch-compatible API with no payment.
8
- - **Search + Read, one paid call (new in 1.7.0):** `agentsearch_search_and_read` searches the live web and returns the top pages as markdown for **$0.009**, versus **$0.020** as one search plus three extracts, and one payment instead of four. Charged only when at least one page has text. Direct-only (not on Pocket or the free relay). Needs a wallet key. Docs: [Search + Read](https://agentsearchhq.com/search-and-read?utm_source=github&utm_medium=readme&utm_campaign=mcp).
9
- - **News search and page screenshots, pay per call (new in 1.8.0):** `agentsearch_news_search` returns recent articles with publish dates for **$0.008**, and `agentsearch_screenshot` returns a PNG/JPEG of any public page as an MCP image for **$0.010** (viewport or full page, mobile sizes supported). Paid web search, news and Search + Read also take **filters**: `freshness` (day/week/month/year) or `date_from`/`date_to`, `country`, `language`, `include_domains`, `exclude_domains`. Extract takes `include_links: false` to save tokens. Direct-only; needs a wallet key.
7
+ - **Extract and render, pay per call (search too, if you opt in):** `agentsearch_extract` and `agentsearch_render`. Add a wallet key and these pay **AgentSearch's own x402 API** on Base (`https://api.agentsearchhq.com`) in USDC: **extract $0.002, render $0.005 per call**, charged only when a usable answer comes back. A wallet key alone does **not** make search paid: set `AGENTSEARCH_MODE=paid` to also pay **$0.005 per search call**. No account, no API key, no ETH for gas. The [Pocket Network Agentic Portal](https://agent.pocket.network) route ($0.005 per call) is still available with `AGENTSEARCH_PAYMENT_ROUTE=pocket` for search, extract and render. Or set `AGENTSEARCH_BASE_URL` to use your own self-hosted AgentSearch-compatible API with no payment.
8
+ - **Search + Read, one paid call (new in 1.7.0):** `agentsearch_search_and_read` searches the live web and returns the top pages as markdown for **$0.005**, versus **$0.009** as one search plus three extracts, and one payment instead of four. Charged only when at least one page has text. Direct-only (not on Pocket or the free relay). Needs a wallet key. Docs: [Search + Read](https://agentsearchhq.com/search-and-read?utm_source=github&utm_medium=readme&utm_campaign=mcp).
9
+ - **News search and page screenshots, pay per call (new in 1.8.0):** `agentsearch_news_search` returns recent articles with publish dates for **$0.005**, and `agentsearch_screenshot` returns a PNG/JPEG of any public page as an MCP image for **$0.005** (viewport or full page, mobile sizes supported). Paid web search, news and Search + Read also take **filters**: `freshness` (day/week/month/year) or `date_from`/`date_to`, `country`, `language`, `include_domains`, `exclude_domains`. Extract takes `include_links: false` to save tokens. Direct-only; needs a wallet key.
10
10
  - **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.
11
11
 
12
12
  ```bash
13
13
  npx -y @agentsearchhq/agentsearch-mcp # free search + review tools work immediately
14
14
  ```
15
15
 
16
- **Search, then read the page.** For hits and their text in one payment, use `agentsearch_search_and_read` ($0.009). Or the two-step loop: free `agentsearch_web_search` → `agentsearch_extract` on the 1–2 best URLs (clean markdown, $0.004 each; $1 covers about 250 calls) → `agentsearch_render` only for pages extract couldn't read (JavaScript apps). Guides: [Claude Code research workflow](https://agentsearchhq.com/blog/claude-code-web-research-workflow-mcp?utm_source=github&utm_medium=readme&utm_campaign=mcp), [n8n AI agent reading pages](https://agentsearchhq.com/blog/n8n-ai-agent-read-web-pages?utm_source=github&utm_medium=readme&utm_campaign=mcp), [LangChain (Python) search-then-read](https://agentsearchhq.com/blog/langchain-agent-search-then-read-page?utm_source=github&utm_medium=readme&utm_campaign=mcp).
16
+ **Search, then read the page.** For hits and their text in one payment, use `agentsearch_search_and_read` ($0.005). Or the two-step loop: free `agentsearch_web_search` → `agentsearch_extract` on the 1–2 best URLs (clean markdown, $0.002 each; $1 covers about 500 calls) → `agentsearch_render` only for pages extract couldn't read (JavaScript apps). Guides: [Claude Code research workflow](https://agentsearchhq.com/blog/claude-code-web-research-workflow-mcp?utm_source=github&utm_medium=readme&utm_campaign=mcp), [n8n AI agent reading pages](https://agentsearchhq.com/blog/n8n-ai-agent-read-web-pages?utm_source=github&utm_medium=readme&utm_campaign=mcp), [LangChain (Python) search-then-read](https://agentsearchhq.com/blog/langchain-agent-search-then-read-page?utm_source=github&utm_medium=readme&utm_campaign=mcp).
17
17
 
18
18
  ### Modes
19
19
 
@@ -21,8 +21,8 @@ npx -y @agentsearchhq/agentsearch-mcp # free search + review tools work immedi
21
21
  |--------|--------------------------|-----------------------------------------------|
22
22
  | Nothing set (default) | Free tier, up to 25 searches/day per IP, subject to shared daily capacity | Free trial: 5 extract / 3 render calls per day per IP, then a 429 with wallet setup steps |
23
23
  | `AGENTSEARCH_FREE_TRIAL=0` (no wallet) | Free tier | Return a message with how to add a wallet; no network call |
24
- | `AGENTSEARCH_WALLET_PRIVATE_KEY` | Still free (free tier, up to 25 searches/day per IP) | Paid via AgentSearch's x402 API (extract $0.004, render $0.010) |
25
- | `AGENTSEARCH_WALLET_PRIVATE_KEY` + `AGENTSEARCH_MODE=paid` | Paid, $0.008 per call via AgentSearch's x402 API | Paid via AgentSearch's x402 API |
24
+ | `AGENTSEARCH_WALLET_PRIVATE_KEY` | Still free (free tier, up to 25 searches/day per IP) | Paid via AgentSearch's x402 API (extract $0.002, render $0.005) |
25
+ | `AGENTSEARCH_WALLET_PRIVATE_KEY` + `AGENTSEARCH_MODE=paid` | Paid, $0.005 per call via AgentSearch's x402 API | Paid via AgentSearch's x402 API |
26
26
  | ...plus `AGENTSEARCH_PAYMENT_ROUTE=pocket` | Paid search goes through the Pocket portal ($0.005) | Paid via the Pocket portal ($0.005) |
27
27
  | `AGENTSEARCH_BASE_URL` (takes precedence) | Your self-hosted API | Your self-hosted API |
28
28
 
@@ -32,12 +32,12 @@ To use paid Extract/Render, set `AGENTSEARCH_WALLET_PRIVATE_KEY` (a new wallet w
32
32
 
33
33
  | Tool | Endpoint | Price (USDC on Base) |
34
34
  |---|---|---|
35
- | `agentsearch_extract` | `POST https://api.agentsearchhq.com/x402/v1/extract` | $0.004 |
36
- | `agentsearch_search_and_read` | `POST https://api.agentsearchhq.com/x402/v1/search_and_read` | $0.009 |
37
- | `agentsearch_render` | `POST https://api.agentsearchhq.com/x402/v1/render` | $0.010 |
38
- | `agentsearch_news_search` | `POST https://api.agentsearchhq.com/x402/v1/news` | $0.008 |
39
- | `agentsearch_screenshot` | `POST https://api.agentsearchhq.com/x402/v1/screenshot` | $0.010 |
40
- | `agentsearch_web_search` (only with `AGENTSEARCH_MODE=paid`) | `POST https://api.agentsearchhq.com/x402/v1/search` | $0.008 |
35
+ | `agentsearch_extract` | `POST https://api.agentsearchhq.com/x402/v1/extract` | $0.002 |
36
+ | `agentsearch_search_and_read` | `POST https://api.agentsearchhq.com/x402/v1/search_and_read` | $0.005 |
37
+ | `agentsearch_render` | `POST https://api.agentsearchhq.com/x402/v1/render` | $0.005 |
38
+ | `agentsearch_news_search` | `POST https://api.agentsearchhq.com/x402/v1/news` | $0.005 |
39
+ | `agentsearch_screenshot` | `POST https://api.agentsearchhq.com/x402/v1/screenshot` | $0.005 |
40
+ | `agentsearch_web_search` (only with `AGENTSEARCH_MODE=paid`) | `POST https://api.agentsearchhq.com/x402/v1/search` | $0.005 |
41
41
 
42
42
  The request is sent unpaid; the API answers `402` with x402 v2 terms. The server checks every limit before signing (scheme `exact`, USDC on Base, AgentSearch's pinned payee `0xC49B157887e51c21CB655f39CF65D6a4c2a4C337`, at most $0.020 per call, session cap), signs once, and retries with `PAYMENT-SIGNATURE`. The API settles only after a successful, non-empty answer. On the direct route, extract takes `url`, `max_chars` (up to 50000) and `include_links`; render takes only `url` (extra options such as `formats` or `screenshot` are dropped and listed under `dropped`; use `agentsearch_screenshot` for images); search, news and Search + Read take the filters above. Discovery: [`/.well-known/x402`](https://api.agentsearchhq.com/.well-known/x402), [`/openapi.json`](https://api.agentsearchhq.com/openapi.json); docs: <https://agentsearchhq.com/docs/x402>.
43
43
 
@@ -85,9 +85,9 @@ If `AGENTSEARCH_BASE_URL` is set, it takes precedence and no payment is made:
85
85
  | `agentsearch_web_search` | `query` (string, required), `max_results` (number, optional, default 5, clamped 1–5) | Web search. Returns pretty-printed JSON. Use for a query; use extract when you already have a URL. Read-only HTTP. |
86
86
  | `agentsearch_extract` | `url` (absolute URL, required), `formats` (`markdown`\|`text`, optional), `max_chars` (1–100000, optional) | Page extract (title, markdown/text, links, meta) via `POST /v1/extract`. Use when you already have a URL. Read-only HTTP. |
87
87
  | `agentsearch_render` | `url` (absolute http(s) URL, required); optional: `formats` (`markdown`\|`text`\|`html`\|`links`, default `["markdown"]`), `max_chars` (1–100000), `screenshot`, `screenshot_format` (`png`\|`jpeg`), `full_page`, `viewport` (`{width 320–1920, height 240–1600}`), `wait_until` (`domcontentloaded`\|`load`\|`networkidle`), `wait_for_selector`, `wait_ms` (0–1500), `block` (`image`\|`media`\|`font`\|`stylesheet`) | Renders a JavaScript-heavy page in headless Chromium via `POST /v1/render` and returns title, status, meta, and the rendered markdown/text/HTML/links (plus optional base64 screenshot). Use when extract returns empty/partial content for an SPA; prefer extract for static pages. Read-only HTTP. |
88
- | `agentsearch_search_and_read` | `query` (required); optional: `num_results` (1–5, default 3), `max_results` (alias), `max_chars` (1–20000, default 8000), `render_fallback` (default false, at most one page) | Search the live web and return the top pages as markdown in one paid call via `POST /x402/v1/search_and_read` ($0.009, direct-only, charged only when at least one page has text). Use when you need hits and their text together. Read-only HTTP. |
89
- | `agentsearch_news_search` | `query` (required); optional: `max_results` (1–10, default 5), `freshness` (`day`\|`week`\|`month`\|`year`), `date_from`/`date_to` (YYYY-MM-DD), `country` (2 letters), `language` (e.g. `en`), `include_domains`/`exclude_domains` (up to 5 each) | Recent news articles with publish dates via `POST /x402/v1/news` ($0.008, direct-only, empty results not charged). Read-only HTTP. |
90
- | `agentsearch_screenshot` | `url` (required); optional: `format` (`png`\|`jpeg`), `full_page` (clipped at 4000 px), `viewport` (`{width 320–1920, height 240–1600}`) | Screenshot of a public page via `POST /x402/v1/screenshot` ($0.010, direct-only). Returns an MCP image block plus JSON metadata (final URL, title, status, size). Read-only HTTP. |
88
+ | `agentsearch_search_and_read` | `query` (required); optional: `num_results` (1–5, default 3), `max_results` (alias), `max_chars` (1–20000, default 8000), `render_fallback` (default false, at most one page) | Search the live web and return the top pages as markdown in one paid call via `POST /x402/v1/search_and_read` ($0.005, direct-only, charged only when at least one page has text). Use when you need hits and their text together. Read-only HTTP. |
89
+ | `agentsearch_news_search` | `query` (required); optional: `max_results` (1–10, default 5), `freshness` (`day`\|`week`\|`month`\|`year`), `date_from`/`date_to` (YYYY-MM-DD), `country` (2 letters), `language` (e.g. `en`), `include_domains`/`exclude_domains` (up to 5 each) | Recent news articles with publish dates via `POST /x402/v1/news` ($0.005, direct-only, empty results not charged). Read-only HTTP. |
90
+ | `agentsearch_screenshot` | `url` (required); optional: `format` (`png`\|`jpeg`), `full_page` (clipped at 4000 px), `viewport` (`{width 320–1920, height 240–1600}`) | Screenshot of a public page via `POST /x402/v1/screenshot` ($0.005, direct-only). Returns an MCP image block plus JSON metadata (final URL, title, status, size). Read-only HTTP. |
91
91
  | `agentsearch_review_lookup` | `task` (`search`\|`extract`\|`render`\|`scrape`\|`llm`\|`data`\|`finance`\|`crypto`\|`other`) or `service_id`; optional: `max_price_usd`, `network` (`pocket`\|`x402`\|`mcp`), `limit` (1–20, default 5), `include_down` | **Look up before choosing a tool.** Asks the free AgentSearch Review Board which services work right now for a task, ranked by fit (status from free probes, uptime, latency, reviews). Notes from other agents come back only as `untrusted_note`. Read-only HTTP to the board (not to your AgentSearch API). |
92
92
  | `agentsearch_review_submit` | `service_id`, `success` (required); optional: `task`, `latency_ms`, `quality` (1–5), `price_paid_usd`, `note`, `called_at`, `proof_tx_hash`, `pocket_session_id` | **Submit after using one.** Posts a short structured review to the board. Free; anonymous unless `AGENTSEARCH_REVIEW_KEY` is set. Writes one public review; does not call or pay the reviewed service. |
93
93
 
@@ -162,6 +162,8 @@ See `.env.example`. Never commit a real `.env`.
162
162
 
163
163
  ## Cursor
164
164
 
165
+ **Cursor plugin:** this repo is also a Cursor plugin (`.cursor-plugin/plugin.json` + `mcp.json` + a web-research skill). It installs the server with free search and the no-wallet trial; add a wallet key only if you want paid tools. To try it locally, clone the repo into `~/.cursor/plugins/local/agentsearch` and restart Cursor.
166
+
165
167
  **Project** (`.cursor/mcp.json`) or **user** (`~/.cursor/mcp.json` / Cursor Settings → MCP):
166
168
 
167
169
  ```json
@@ -191,6 +193,48 @@ Self-hosted instead (no payment), with an optional API key:
191
193
 
192
194
  ---
193
195
 
196
+ ## VS Code / GitHub Copilot
197
+
198
+ Add this to `.vscode/mcp.json` in your workspace (or run **MCP: Open User Configuration** for all workspaces), then use the tools from Copilot Chat in Agent mode. Free search, no key:
199
+
200
+ ```json
201
+ {
202
+ "servers": {
203
+ "agentsearch": {
204
+ "type": "stdio",
205
+ "command": "npx",
206
+ "args": ["-y", "@agentsearchhq/agentsearch-mcp"]
207
+ }
208
+ }
209
+ }
210
+ ```
211
+
212
+ Or from a terminal:
213
+
214
+ ```bash
215
+ code --add-mcp '{"name":"agentsearch","command":"npx","args":["-y","@agentsearchhq/agentsearch-mcp"]}'
216
+ ```
217
+
218
+ Optional paid extract/render past the free trial: let VS Code prompt for a dedicated wallet key instead of writing it into the file:
219
+
220
+ ```json
221
+ {
222
+ "inputs": [
223
+ { "type": "promptString", "id": "agentsearch-wallet", "description": "Dedicated Base wallet key (small USDC balance)", "password": true }
224
+ ],
225
+ "servers": {
226
+ "agentsearch": {
227
+ "type": "stdio",
228
+ "command": "npx",
229
+ "args": ["-y", "@agentsearchhq/agentsearch-mcp"],
230
+ "env": { "AGENTSEARCH_WALLET_PRIVATE_KEY": "${input:agentsearch-wallet}" }
231
+ }
232
+ }
233
+ }
234
+ ```
235
+
236
+ ---
237
+
194
238
  ## Cline
195
239
 
196
240
  Add this to `cline_mcp_settings.json` (VS Code: MCP Servers icon → Configure → Configure MCP Servers). Free search, no key:
@@ -309,7 +353,7 @@ To fund the wallet, send a little USDC **on Base** (for example $1, enough for a
309
353
 
310
354
  ## Paid route: direct by default since 1.6.0
311
355
 
312
- In 1.5.0 the direct x402 API was opt-in (`AGENTSEARCH_X402_DIRECT=1`). **From 1.6.0 it is the default paid route**: with a wallet key, paid calls go straight to AgentSearch at `https://api.agentsearchhq.com` (search $0.008, extract $0.004, render $0.010, and from 1.7.0 search_and_read $0.009), a little more than the Pocket route's $0.005.
356
+ In 1.5.0 the direct x402 API was opt-in (`AGENTSEARCH_X402_DIRECT=1`). **From 1.6.0 it is the default paid route**: with a wallet key, paid calls go straight to AgentSearch at `https://api.agentsearchhq.com` (search $0.003, extract $0.002, render $0.005, and from 1.7.0 search_and_read $0.005), with render matching the Pocket route's $0.005 and extract a little less at $0.002.
313
357
 
314
358
  ```json
315
359
  "env": {
package/dist/backend.d.ts CHANGED
@@ -8,7 +8,7 @@ export type SearchMode = (typeof SEARCH_MODES)[number];
8
8
  /**
9
9
  * Search mode from AGENTSEARCH_MODE. Default "free": search uses the free relay even when a wallet key is set,
10
10
  * so a key exported for Extract/Render (or inherited from the parent shell) never silently makes search paid.
11
- * "paid": search pays per call over x402 (direct $0.008 by default, or $0.005 via Pocket; needs a wallet key). "auto": legacy 1.3.0-1.3.4 behavior
11
+ * "paid": search pays per call over x402 (direct $0.003 by default, or $0.005 via Pocket; needs a wallet key). "auto": legacy 1.3.0-1.3.4 behavior
12
12
  * (paid search when a wallet key is set, else free). Returns "invalid" for an unrecognized value.
13
13
  */
14
14
  export declare function searchMode(): SearchMode | "invalid";
package/dist/backend.js CHANGED
@@ -10,7 +10,7 @@ export const SEARCH_MODES = ["free", "paid", "auto"];
10
10
  /**
11
11
  * Search mode from AGENTSEARCH_MODE. Default "free": search uses the free relay even when a wallet key is set,
12
12
  * so a key exported for Extract/Render (or inherited from the parent shell) never silently makes search paid.
13
- * "paid": search pays per call over x402 (direct $0.008 by default, or $0.005 via Pocket; needs a wallet key). "auto": legacy 1.3.0-1.3.4 behavior
13
+ * "paid": search pays per call over x402 (direct $0.003 by default, or $0.005 via Pocket; needs a wallet key). "auto": legacy 1.3.0-1.3.4 behavior
14
14
  * (paid search when a wallet key is set, else free). Returns "invalid" for an unrecognized value.
15
15
  */
16
16
  export function searchMode() {
package/dist/direct.d.ts CHANGED
@@ -9,7 +9,7 @@ export declare const DIRECT_ENV_VAR = "AGENTSEARCH_X402_DIRECT";
9
9
  export declare const DEFAULT_DIRECT_URL = "https://api.agentsearchhq.com";
10
10
  /** AgentSearch's own payee for the direct API (published in /.well-known/x402 and the 402 terms). */
11
11
  export declare const DIRECT_PAYEE = "0xC49B157887e51c21CB655f39CF65D6a4c2a4C337";
12
- /** $0.020 in USDC atomic units: hard ceiling per direct call (search_and_read is $0.009, render $0.010, search $0.008, extract $0.004). */
12
+ /** $0.020 in USDC atomic units: hard ceiling per direct call (search_and_read is $0.005, render $0.005, search $0.003, extract $0.002). */
13
13
  export declare const DIRECT_MAX_PER_CALL_ATOMIC = 20000n;
14
14
  /** Published direct prices, for messages only (the 402 is authoritative, the ceiling is the guard). */
15
15
  export declare const DIRECT_PRICES_USD: Record<DirectOperation, string>;
package/dist/direct.js CHANGED
@@ -27,10 +27,10 @@ export const DIRECT_ENV_VAR = "AGENTSEARCH_X402_DIRECT";
27
27
  export const DEFAULT_DIRECT_URL = "https://api.agentsearchhq.com";
28
28
  /** AgentSearch's own payee for the direct API (published in /.well-known/x402 and the 402 terms). */
29
29
  export const DIRECT_PAYEE = "0xC49B157887e51c21CB655f39CF65D6a4c2a4C337";
30
- /** $0.020 in USDC atomic units: hard ceiling per direct call (search_and_read is $0.009, render $0.010, search $0.008, extract $0.004). */
30
+ /** $0.020 in USDC atomic units: hard ceiling per direct call (search_and_read is $0.005, render $0.005, search $0.003, extract $0.002). */
31
31
  export const DIRECT_MAX_PER_CALL_ATOMIC = 20000n;
32
32
  /** Published direct prices, for messages only (the 402 is authoritative, the ceiling is the guard). */
33
- export const DIRECT_PRICES_USD = { search: "$0.008", extract: "$0.004", render: "$0.010", search_and_read: "$0.009", news: "$0.008", screenshot: "$0.010" };
33
+ export const DIRECT_PRICES_USD = { search: "$0.003", extract: "$0.002", render: "$0.005", search_and_read: "$0.005", news: "$0.003", screenshot: "$0.004" };
34
34
  /** True unless AGENTSEARCH_PAYMENT_ROUTE=pocket (or AGENTSEARCH_X402_DIRECT=0). An invalid route value is refused in runOperation. */
35
35
  export function directEnabled() {
36
36
  return paidRoute() !== "pocket";
@@ -128,7 +128,7 @@ export async function callDirect(op, input) {
128
128
  }
129
129
  catch (e) {
130
130
  if (e instanceof PortalError && settings.perCallCapAtomic < DIRECT_MAX_PER_CALL_ATOMIC && ceiling === settings.perCallCapAtomic) {
131
- throw new PortalError(`${e.message} Your per-call cap (AGENTSEARCH_MAX_PER_CALL_ATOMIC=${settings.perCallCapAtomic}) is below this route's price; since 1.7.0 paid calls go to AgentSearch's own x402 API (search $0.008, extract $0.004, render $0.010, search_and_read $0.009). Raise the cap to 20000, remove it, or set AGENTSEARCH_PAYMENT_ROUTE=pocket for the $0.005 Pocket route (search, extract and render only; search_and_read is direct-only).`, e.detail);
131
+ throw new PortalError(`${e.message} Your per-call cap (AGENTSEARCH_MAX_PER_CALL_ATOMIC=${settings.perCallCapAtomic}) is below this route's price; since 1.7.0 paid calls go to AgentSearch's own x402 API (search $0.003, extract $0.002, render $0.005, search_and_read $0.005). Raise the cap to 20000, remove it, or set AGENTSEARCH_PAYMENT_ROUTE=pocket for the $0.005 Pocket route (search, extract and render only; search_and_read is direct-only).`, e.detail);
132
132
  }
133
133
  throw e;
134
134
  }
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ async function main() {
24
24
  : paidRoute() === "invalid"
25
25
  ? "AGENTSEARCH_PAYMENT_ROUTE is invalid (use direct or pocket): paid calls will return an error until it is fixed"
26
26
  : search === "direct" || (search === "free-relay" && backendMode("extract") === "direct" && hasWalletKey())
27
- ? `paid route: AgentSearch's own x402 API on Base (search $0.008 when AGENTSEARCH_MODE=paid, extract $0.004, render $0.010; AGENTSEARCH_PAYMENT_ROUTE=pocket for the Pocket portal)${search === "direct" ? "" : "; search stays on the free tier"}`
27
+ ? `paid route: AgentSearch's own x402 API on Base (search $0.003 when AGENTSEARCH_MODE=paid, extract $0.002, render $0.005; AGENTSEARCH_PAYMENT_ROUTE=pocket for the Pocket portal)${search === "direct" ? "" : "; search stays on the free tier"}`
28
28
  : search === "pocket"
29
29
  ? "search: pay-per-call via Pocket portal (x402, USDC on Base, AGENTSEARCH_PAYMENT_ROUTE=pocket) because AGENTSEARCH_MODE opts in; extract/render pay per call too"
30
30
  : hasWalletKey()
package/dist/pocket.js CHANGED
@@ -37,7 +37,7 @@ export const SETUP_MESSAGE = [
37
37
  "Option 1 (pay per call, no account): 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, then restart the client.",
38
38
  "Fund that wallet with a little USDC on Base (for example $1). No ETH is needed: the x402 facilitator pays gas.",
39
39
  "AGENTSEARCH_PAYMENT_ROUTE=pocket is set, so calls are paid through the Pocket Network Agentic Portal (https://agent.pocket.network) over x402 at $0.005 per call (5000 atomic units). Spending is limited to $0.005 per call and to AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default 1000000 = $1.00).",
40
- "Remove AGENTSEARCH_PAYMENT_ROUTE to use the default route, AgentSearch's own x402 API (search $0.008, extract $0.004, render $0.010).",
40
+ "Remove AGENTSEARCH_PAYMENT_ROUTE to use the default route, AgentSearch's own x402 API (search $0.003, extract $0.002, render $0.005).",
41
41
  "Option 2 (self-hosted): set AGENTSEARCH_BASE_URL to your own AgentSearch-compatible API.",
42
42
  "A wallet key alone does not make search paid: set AGENTSEARCH_MODE=paid as well if you want to pay for search too.",
43
43
  "The review tools (agentsearch_review_lookup, agentsearch_review_submit) work without either.",
package/dist/relay.js CHANGED
@@ -41,7 +41,7 @@ export function paidOnlyMessage(tool) {
41
41
  /** Limit message when a wallet is already configured: only the search mode needs to change. */
42
42
  export const FREE_RELAY_LIMIT_MESSAGE_WITH_WALLET = [
43
43
  `Free search limit reached: the AgentSearch free tier allows up to ${FREE_RELAY_DAILY_LIMIT} searches/day per IP, subject to shared daily capacity. It resets daily.`,
44
- "A wallet key is configured, but search is in free mode (the default). To pay per search call instead ($0.008 on the default direct route, $0.005 with AGENTSEARCH_PAYMENT_ROUTE=pocket; capped per call and by AGENTSEARCH_MAX_TOTAL_ATOMIC per session, default $1.00), set AGENTSEARCH_MODE=paid in the env block of this MCP server and restart the client.",
44
+ "A wallet key is configured, but search is in free mode (the default). To pay per search call instead ($0.003 on the default direct route, $0.005 with AGENTSEARCH_PAYMENT_ROUTE=pocket; capped per call and by AGENTSEARCH_MAX_TOTAL_ATOMIC per session, default $1.00), set AGENTSEARCH_MODE=paid in the env block of this MCP server and restart the client.",
45
45
  ].join(" ");
46
46
  /** Message when the relay's extract/render free trial is used up (HTTP 429). relayMessage is the relay's own reason, if any. */
47
47
  export function freeTrialLimitMessage(tool, relayMessage) {
@@ -49,7 +49,7 @@ export function freeTrialLimitMessage(tool, relayMessage) {
49
49
  return [
50
50
  `Free trial limit reached for ${tool}: the AgentSearch free trial allows ${FREE_TRIAL_DAILY_LIMITS[op]} ${op} calls/day per IP (resets 00:00 UTC), subject to shared daily capacity.`,
51
51
  relayMessage ? `Relay said: ${relayMessage.slice(0, 300)}` : "",
52
- `Continue with a wallet (USDC on Base, no account, no API key): ${op} costs ${op === "extract" ? "$0.004" : "$0.010"} per call on AgentSearch's own x402 API (the default), or $0.005 with AGENTSEARCH_PAYMENT_ROUTE=pocket. Wallet setup takes about 2 minutes: ${WALLET_SETUP_URL}`,
52
+ `Continue with a wallet (USDC on Base, no account, no API key): ${op} costs ${op === "extract" ? "$0.002" : "$0.005"} per call on AgentSearch's own x402 API (the default), or $0.005 with AGENTSEARCH_PAYMENT_ROUTE=pocket. Wallet setup takes about 2 minutes: ${WALLET_SETUP_URL}`,
53
53
  ADD_WALLET,
54
54
  "Spending is capped per call and AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00).",
55
55
  ].filter(Boolean).join(" ");
package/dist/route.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Paid route (since 1.6.0). Paid calls default to AgentSearch's own x402 API on Base ("direct":
3
- * https://api.agentsearchhq.com, search $0.008, extract $0.004, render $0.010, paid to AgentSearch).
3
+ * https://api.agentsearchhq.com, search $0.003, extract $0.002, render $0.005, paid to AgentSearch).
4
4
  * AGENTSEARCH_PAYMENT_ROUTE=pocket (or the 1.5.0 switch AGENTSEARCH_X402_DIRECT=0) keeps the
5
5
  * Pocket Network Agentic Portal ($0.005 per call). The free tier and the no-wallet free trial are not affected.
6
6
  */
@@ -17,4 +17,4 @@ export declare const ROUTE_PRICES_USD: Record<PaidRoute, {
17
17
  export declare function paidRoute(): PaidRoute | "invalid";
18
18
  export declare function invalidRouteMessage(): string;
19
19
  /** One sentence describing the paid route, shared by tool descriptions and messages. */
20
- export declare const PAID_ROUTE_SENTENCE = "Paid calls go by default to AgentSearch's own x402 API on Base (https://api.agentsearchhq.com; search $0.008, extract $0.004, render $0.010 per call in USDC, no account, no API key, no ETH, failed calls not charged); set AGENTSEARCH_PAYMENT_ROUTE=pocket to pay through the Pocket Network Agentic Portal instead ($0.005 per call).";
20
+ export declare const PAID_ROUTE_SENTENCE = "Paid calls go by default to AgentSearch's own x402 API on Base (https://api.agentsearchhq.com; search $0.003, extract $0.002, render $0.005 per call in USDC, no account, no API key, no ETH, failed calls not charged); set AGENTSEARCH_PAYMENT_ROUTE=pocket to pay through the Pocket Network Agentic Portal instead ($0.005 per call).";
package/dist/route.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Paid route (since 1.6.0). Paid calls default to AgentSearch's own x402 API on Base ("direct":
3
- * https://api.agentsearchhq.com, search $0.008, extract $0.004, render $0.010, paid to AgentSearch).
3
+ * https://api.agentsearchhq.com, search $0.003, extract $0.002, render $0.005, paid to AgentSearch).
4
4
  * AGENTSEARCH_PAYMENT_ROUTE=pocket (or the 1.5.0 switch AGENTSEARCH_X402_DIRECT=0) keeps the
5
5
  * Pocket Network Agentic Portal ($0.005 per call). The free tier and the no-wallet free trial are not affected.
6
6
  */
@@ -9,7 +9,7 @@ export const LEGACY_DIRECT_ENV_VAR = "AGENTSEARCH_X402_DIRECT";
9
9
  export const PAID_ROUTES = ["direct", "pocket"];
10
10
  /** Published prices per route, for messages only (the 402 terms are authoritative; the per-call ceilings are the guard). */
11
11
  export const ROUTE_PRICES_USD = {
12
- direct: { search: "$0.008", extract: "$0.004", render: "$0.010" },
12
+ direct: { search: "$0.003", extract: "$0.002", render: "$0.005" },
13
13
  pocket: { search: "$0.005", extract: "$0.005", render: "$0.005" },
14
14
  };
15
15
  export function paidRoute() {
@@ -30,5 +30,5 @@ export function invalidRouteMessage() {
30
30
  return `${ROUTE_ENV_VAR} must be 'direct' (default: AgentSearch's own x402 API) or 'pocket' (Pocket Network Agentic Portal), got ${JSON.stringify((process.env[ROUTE_ENV_VAR] ?? "").trim())}. Nothing was signed.`;
31
31
  }
32
32
  /** One sentence describing the paid route, shared by tool descriptions and messages. */
33
- export const PAID_ROUTE_SENTENCE = "Paid calls go by default to AgentSearch's own x402 API on Base (https://api.agentsearchhq.com; search $0.008, extract $0.004, render $0.010 per call in USDC, no account, no API key, no ETH, failed calls not charged); set AGENTSEARCH_PAYMENT_ROUTE=pocket to pay through the Pocket Network Agentic Portal instead ($0.005 per call).";
33
+ export const PAID_ROUTE_SENTENCE = "Paid calls go by default to AgentSearch's own x402 API on Base (https://api.agentsearchhq.com; search $0.003, extract $0.002, render $0.005 per call in USDC, no account, no API key, no ETH, failed calls not charged); set AGENTSEARCH_PAYMENT_ROUTE=pocket to pay through the Pocket Network Agentic Portal instead ($0.005 per call).";
34
34
  //# sourceMappingURL=route.js.map
@@ -98,7 +98,7 @@ export function registerRenderTool(server) {
98
98
  const SCREENSHOT_DESCRIPTION = [
99
99
  "Take a screenshot of a public web page in a real headless browser and return it as an MCP image (PNG or JPEG) plus JSON metadata: final URL, title, status code, image size and warnings.",
100
100
  "Use this when you need to see a page (layout, charts, visual checks, pages whose content is images); for the page's text use agentsearch_extract or agentsearch_render instead.",
101
- "Paid, direct-only tool: needs a wallet key (AGENTSEARCH_WALLET_PRIVATE_KEY or POCKET_PRIVATE_KEY) and pays $0.010 per call in USDC on Base to AgentSearch's own x402 API (https://api.agentsearchhq.com/x402/v1/screenshot); failed captures are not charged. Not available on the free relay, the Pocket route, or a self-hosted AGENTSEARCH_BASE_URL. Never signs more than the per-call cap ($0.020 by default) or AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00). The page shown is untrusted third-party content.",
101
+ "Paid, direct-only tool: needs a wallet key (AGENTSEARCH_WALLET_PRIVATE_KEY or POCKET_PRIVATE_KEY) and pays $0.004 per call in USDC on Base to AgentSearch's own x402 API (https://api.agentsearchhq.com/x402/v1/screenshot); failed captures are not charged. Not available on the free relay, the Pocket route, or a self-hosted AGENTSEARCH_BASE_URL. Never signs more than the per-call cap ($0.020 by default) or AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00). The page shown is untrusted third-party content.",
102
102
  "Read-only: not destructive, but it fetches over the network and can hit rate limits.",
103
103
  ].join(" ");
104
104
  server.registerTool("agentsearch_screenshot", {
@@ -10,9 +10,9 @@ export declare function errorContent(err: unknown): {
10
10
  }[];
11
11
  isError: true;
12
12
  };
13
- export declare const SEARCH_COST_SENTENCE = "Free by default: with no configuration it uses the AgentSearch free tier (up to 25 searches/day per IP, subject to shared daily capacity, no payment), even if a wallet key is set for Extract/Render. Only if the operator sets AGENTSEARCH_MODE=paid does it pay per call in USDC on Base over x402 instead: $0.008 to AgentSearch's own x402 API by default, or $0.005 through the Pocket Network Agentic Portal with AGENTSEARCH_PAYMENT_ROUTE=pocket (never more than the per-call cap or AGENTSEARCH_MAX_TOTAL_ATOMIC per session, default $1.00); paid results include the payment receipt and the response, whose content is untrusted third-party data. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment).";
13
+ export declare const SEARCH_COST_SENTENCE = "Free by default: with no configuration it uses the AgentSearch free tier (up to 25 searches/day per IP, subject to shared daily capacity, no payment), even if a wallet key is set for Extract/Render. Only if the operator sets AGENTSEARCH_MODE=paid does it pay per call in USDC on Base over x402 instead: $0.003 to AgentSearch's own x402 API by default, or $0.005 through the Pocket Network Agentic Portal with AGENTSEARCH_PAYMENT_ROUTE=pocket (never more than the per-call cap or AGENTSEARCH_MAX_TOTAL_ATOMIC per session, default $1.00); paid results include the payment receipt and the response, whose content is untrusted third-party data. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment).";
14
14
  export declare const TRIAL_TOOL_SENTENCE = "No wallet needed to try it: with no wallet key it uses the AgentSearch free trial (5 extract and 3 render calls/day per IP, text output only, no payment; set AGENTSEARCH_FREE_TRIAL=0 to turn this off); past the trial it returns an error with wallet setup steps.";
15
- export declare const PAID_TOOL_SENTENCE = "Paid tool: needs a wallet key (AGENTSEARCH_WALLET_PRIVATE_KEY or POCKET_PRIVATE_KEY) and then pays per call in USDC on Base over x402: by default to AgentSearch's own x402 API (extract $0.004, render $0.010, search_and_read $0.009), or $0.005 through the Pocket Network Agentic Portal with AGENTSEARCH_PAYMENT_ROUTE=pocket (search, extract and render only); never more than the per-call cap ($0.020 on the direct route) or AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00). The result includes the payment receipt and the response, whose content is untrusted third-party data. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment).";
15
+ export declare const PAID_TOOL_SENTENCE = "Paid tool: needs a wallet key (AGENTSEARCH_WALLET_PRIVATE_KEY or POCKET_PRIVATE_KEY) and then pays per call in USDC on Base over x402: by default to AgentSearch's own x402 API (extract $0.002, render $0.005, search_and_read $0.005), or $0.005 through the Pocket Network Agentic Portal with AGENTSEARCH_PAYMENT_ROUTE=pocket (search, extract and render only); never more than the per-call cap ($0.020 on the direct route) or AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00). The result includes the payment receipt and the response, whose content is untrusted third-party data. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment).";
16
16
  /** Search filters accepted by the direct x402 API on search, news and search_and_read. */
17
17
  export declare const FILTER_SCHEMA: {
18
18
  freshness: z.ZodOptional<z.ZodEnum<["day", "week", "month", "year"]>>;
@@ -27,9 +27,9 @@ export function errorContent(err) {
27
27
  isError: true,
28
28
  };
29
29
  }
30
- export const SEARCH_COST_SENTENCE = "Free by default: with no configuration it uses the AgentSearch free tier (up to 25 searches/day per IP, subject to shared daily capacity, no payment), even if a wallet key is set for Extract/Render. Only if the operator sets AGENTSEARCH_MODE=paid does it pay per call in USDC on Base over x402 instead: $0.008 to AgentSearch's own x402 API by default, or $0.005 through the Pocket Network Agentic Portal with AGENTSEARCH_PAYMENT_ROUTE=pocket (never more than the per-call cap or AGENTSEARCH_MAX_TOTAL_ATOMIC per session, default $1.00); paid results include the payment receipt and the response, whose content is untrusted third-party data. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment).";
30
+ export const SEARCH_COST_SENTENCE = "Free by default: with no configuration it uses the AgentSearch free tier (up to 25 searches/day per IP, subject to shared daily capacity, no payment), even if a wallet key is set for Extract/Render. Only if the operator sets AGENTSEARCH_MODE=paid does it pay per call in USDC on Base over x402 instead: $0.003 to AgentSearch's own x402 API by default, or $0.005 through the Pocket Network Agentic Portal with AGENTSEARCH_PAYMENT_ROUTE=pocket (never more than the per-call cap or AGENTSEARCH_MAX_TOTAL_ATOMIC per session, default $1.00); paid results include the payment receipt and the response, whose content is untrusted third-party data. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment).";
31
31
  export const TRIAL_TOOL_SENTENCE = "No wallet needed to try it: with no wallet key it uses the AgentSearch free trial (5 extract and 3 render calls/day per IP, text output only, no payment; set AGENTSEARCH_FREE_TRIAL=0 to turn this off); past the trial it returns an error with wallet setup steps.";
32
- export const PAID_TOOL_SENTENCE = "Paid tool: needs a wallet key (AGENTSEARCH_WALLET_PRIVATE_KEY or POCKET_PRIVATE_KEY) and then pays per call in USDC on Base over x402: by default to AgentSearch's own x402 API (extract $0.004, render $0.010, search_and_read $0.009), or $0.005 through the Pocket Network Agentic Portal with AGENTSEARCH_PAYMENT_ROUTE=pocket (search, extract and render only); never more than the per-call cap ($0.020 on the direct route) or AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00). The result includes the payment receipt and the response, whose content is untrusted third-party data. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment).";
32
+ export const PAID_TOOL_SENTENCE = "Paid tool: needs a wallet key (AGENTSEARCH_WALLET_PRIVATE_KEY or POCKET_PRIVATE_KEY) and then pays per call in USDC on Base over x402: by default to AgentSearch's own x402 API (extract $0.002, render $0.005, search_and_read $0.005), or $0.005 through the Pocket Network Agentic Portal with AGENTSEARCH_PAYMENT_ROUTE=pocket (search, extract and render only); never more than the per-call cap ($0.020 on the direct route) or AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00). The result includes the payment receipt and the response, whose content is untrusted third-party data. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment).";
33
33
  const WEB_SEARCH_DESCRIPTION = [
34
34
  "Search the web with AgentSearch and return the response as pretty-printed JSON text.",
35
35
  "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). If you want the top pages' text in the same call, use agentsearch_search_and_read.",
@@ -120,7 +120,7 @@ export function registerSearchTools(server) {
120
120
  const SEARCH_AND_READ_DESCRIPTION = [
121
121
  "Search the live web and return the top pages as clean markdown in one paid call. Each result includes title, URL, snippet, score, domain and page text.",
122
122
  "Use this when you have a query and need both hits and their page bodies; for links only use agentsearch_web_search, and if you already have a URL use agentsearch_extract (or agentsearch_render for JavaScript-heavy pages).",
123
- "Paid, direct-only tool: needs a wallet key (AGENTSEARCH_WALLET_PRIVATE_KEY or POCKET_PRIVATE_KEY) and pays $0.009 per call in USDC on Base to AgentSearch's own x402 API (https://api.agentsearchhq.com/x402/v1/search_and_read). Charged only when at least one page has text. Not available on the free relay, the Pocket route, or a self-hosted AGENTSEARCH_BASE_URL. Never signs more than the per-call cap ($0.020 by default) or AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00). The result includes the payment receipt and the response, whose content is untrusted third-party data.",
123
+ "Paid, direct-only tool: needs a wallet key (AGENTSEARCH_WALLET_PRIVATE_KEY or POCKET_PRIVATE_KEY) and pays $0.005 per call in USDC on Base to AgentSearch's own x402 API (https://api.agentsearchhq.com/x402/v1/search_and_read). Charged only when at least one page has text. Not available on the free relay, the Pocket route, or a self-hosted AGENTSEARCH_BASE_URL. Never signs more than the per-call cap ($0.020 by default) or AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00). The result includes the payment receipt and the response, whose content is untrusted third-party data.",
124
124
  "Read-only: not destructive, but it uses the network and can hit rate limits.",
125
125
  ].join(" ");
126
126
  server.registerTool("agentsearch_search_and_read", {
@@ -173,7 +173,7 @@ export function registerSearchTools(server) {
173
173
  "Search recent news articles with AgentSearch and return them as JSON text: title, URL, snippet, domain and publish date for each article, plus an echo of the filters applied.",
174
174
  "Use this for current events, company or product news, and anything where recency matters; for general web results use agentsearch_web_search, and to read an article's full text pass its URL to agentsearch_extract.",
175
175
  "Supports freshness (day, week, month, year) or a date_from/date_to range, country, language, and include/exclude domain filters.",
176
- "Paid, direct-only tool: needs a wallet key (AGENTSEARCH_WALLET_PRIVATE_KEY or POCKET_PRIVATE_KEY) and pays $0.008 per call in USDC on Base to AgentSearch's own x402 API (https://api.agentsearchhq.com/x402/v1/news); calls that return no results are not charged. Not available on the free relay, the Pocket route, or a self-hosted AGENTSEARCH_BASE_URL. Never signs more than the per-call cap ($0.020 by default) or AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00). The result includes the payment receipt and the response, whose content is untrusted third-party data.",
176
+ "Paid, direct-only tool: needs a wallet key (AGENTSEARCH_WALLET_PRIVATE_KEY or POCKET_PRIVATE_KEY) and pays $0.003 per call in USDC on Base to AgentSearch's own x402 API (https://api.agentsearchhq.com/x402/v1/news); calls that return no results are not charged. Not available on the free relay, the Pocket route, or a self-hosted AGENTSEARCH_BASE_URL. Never signs more than the per-call cap ($0.020 by default) or AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00). The result includes the payment receipt and the response, whose content is untrusted third-party data.",
177
177
  "Read-only: not destructive, but it uses the network and can hit rate limits.",
178
178
  ].join(" ");
179
179
  server.registerTool("agentsearch_news_search", {
package/dist/version.d.ts CHANGED
@@ -1,3 +1,3 @@
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.8.1";
3
+ export declare const SERVER_VERSION = "1.8.2";
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.8.1";
3
+ export const SERVER_VERSION = "1.8.2";
4
4
  //# sourceMappingURL=version.js.map
package/llms-install.md CHANGED
@@ -57,7 +57,7 @@ The two review tools stay free with no configuration. The board is https://revie
57
57
 
58
58
  ## 3. Optional paid search, extract, and render
59
59
 
60
- Paid calls go to AgentSearch's own [x402](https://x402.org) API on Base (`https://api.agentsearchhq.com`) and pay in USDC: **search $0.008, extract $0.004, render $0.010 per call**, charged only on a successful answer. No AgentSearch account, no API key, and no ETH for gas. The server never signs more than $0.010 per call. To pay $0.005 per call through the [Pocket Network Agentic Portal](https://agent.pocket.network) instead, add `"AGENTSEARCH_PAYMENT_ROUTE": "pocket"`.
60
+ Paid calls go to AgentSearch's own [x402](https://x402.org) API on Base (`https://api.agentsearchhq.com`) and pay in USDC: **search $0.003, extract $0.002, render $0.005 per call**, charged only on a successful answer. No AgentSearch account, no API key, and no ETH for gas. The server never signs more than $0.005 per call. To pay $0.005 per call through the [Pocket Network Agentic Portal](https://agent.pocket.network) instead, add `"AGENTSEARCH_PAYMENT_ROUTE": "pocket"`.
61
61
 
62
62
  Use a new wallet that holds only what you are willing to spend. The private key is stored in plain text in the Cline config and is used only to sign payments.
63
63
 
@@ -85,9 +85,9 @@ Set the wallet key and a session spend cap on the same `agentsearch` entry:
85
85
  | `AGENTSEARCH_WALLET_PRIVATE_KEY` | Private key (64 hex, `0x` optional) of a dedicated wallet with a little USDC on Base. Alias: `POCKET_PRIVATE_KEY`. |
86
86
  | `AGENTSEARCH_MAX_TOTAL_ATOMIC` | Session spend cap in USDC atomic units. `1000000` = $1.00 (the default). Alias: `POCKET_MAX_TOTAL_ATOMIC`. |
87
87
  | `AGENTSEARCH_MAX_PER_CALL_ATOMIC` | Optional. Can only lower the per-call cap; default and maximum `20000` ($0.020; `5000` on the Pocket route). Alias: `POCKET_MAX_PER_CALL_ATOMIC`. |
88
- | `AGENTSEARCH_MODE` | Search only. Leave unset (or `free`) to keep search on the free tier (up to 25 searches/day per IP). Set to `paid` to pay $0.008 per search call. A wallet key alone does **not** make search paid. |
88
+ | `AGENTSEARCH_MODE` | Search only. Leave unset (or `free`) to keep search on the free tier (up to 25 searches/day per IP). Set to `paid` to pay $0.005 per search call. A wallet key alone does **not** make search paid. |
89
89
 
90
- With no wallet key, `agentsearch_extract` and `agentsearch_render` use a small free trial (5 and 3 calls per day per IP; `AGENTSEARCH_FREE_TRIAL=0` turns it off). A wallet key enables them at $0.004 (extract) and $0.010 (render) per call, and `agentsearch_search_and_read` at $0.009 (direct-only, charged only when at least one page has text). Search stays free until you also set `"AGENTSEARCH_MODE": "paid"`. The direct per-call ceiling is $0.020. Leave `autoApprove` empty so Cline asks before a tool runs; the caps above are what limit spend if it does not.
90
+ With no wallet key, `agentsearch_extract` and `agentsearch_render` use a small free trial (5 and 3 calls per day per IP; `AGENTSEARCH_FREE_TRIAL=0` turns it off). A wallet key enables them at $0.002 (extract) and $0.005 (render) per call, and `agentsearch_search_and_read` at $0.005 (direct-only, charged only when at least one page has text). Search stays free until you also set `"AGENTSEARCH_MODE": "paid"`. The direct per-call ceiling is $0.020. Leave `autoApprove` empty so Cline asks before a tool runs; the caps above are what limit spend if it does not.
91
91
 
92
92
  Fund the wallet with a little USDC **on Base** (for example $1, enough for about 100-140 paid calls). Save the settings file again so Cline restarts the server with the new env.
93
93
 
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.8.1",
5
+ "version": "1.8.2",
6
6
  "description": "Free web search out of the box (up to 25 searches/day per IP, subject to shared daily capacity) and a no-wallet free trial of page extract (5/day) and JS render (3/day); then pay per call in USDC on Base via x402 to AgentSearch's own API, 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 AgentSearch free tier (up to 25 searches/day per IP, subject to shared daily capacity); with no wallet key, agentsearch_extract and agentsearch_render use the AgentSearch free trial (5 extract and 3 render calls/day per IP, text output only; set AGENTSEARCH_FREE_TRIAL=0 to turn it off), and past it they return wallet setup steps (https://agentsearchhq.com/wallet-setup). With a wallet key, agentsearch_extract, agentsearch_render and agentsearch_search_and_read pay AgentSearch's own x402 API on Base (https://api.agentsearchhq.com): extract $0.004, render $0.010, search_and_read $0.009 in USDC (gasless; no account or API key; failed calls are not charged; search_and_read is charged only when at least one page has text and is direct-only); search stays free unless AGENTSEARCH_MODE=paid ($0.008). The server never signs more than $0.020 per call or more than the session cap (default $1.00), signs only USDC on Base for AgentSearch's pinned payee, and returns the payment receipt with each result. Use a new wallet holding only a little USDC. Set AGENTSEARCH_PAYMENT_ROUTE=pocket to pay through the Pocket Network Agentic Portal instead ($0.005 per call). Set AGENTSEARCH_BASE_URL 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.",
7
+ "long_description": "Stdio MCP server from AgentSearch. With no configuration, agentsearch_web_search uses the AgentSearch free tier (up to 25 searches/day per IP, subject to shared daily capacity); with no wallet key, agentsearch_extract and agentsearch_render use the AgentSearch free trial (5 extract and 3 render calls/day per IP, text output only; set AGENTSEARCH_FREE_TRIAL=0 to turn it off), and past it they return wallet setup steps (https://agentsearchhq.com/wallet-setup). With a wallet key, agentsearch_extract, agentsearch_render and agentsearch_search_and_read pay AgentSearch's own x402 API on Base (https://api.agentsearchhq.com): extract $0.002, render $0.005, search_and_read $0.005 in USDC (gasless; no account or API key; failed calls are not charged; search_and_read is charged only when at least one page has text and is direct-only); search stays free unless AGENTSEARCH_MODE=paid ($0.005). The server never signs more than $0.020 per call or more than the session cap (default $1.00), signs only USDC on Base for AgentSearch's pinned payee, and returns the payment receipt with each result. Use a new wallet holding only a little USDC. Set AGENTSEARCH_PAYMENT_ROUTE=pocket to pay through the Pocket Network Agentic Portal instead ($0.005 per call). Set AGENTSEARCH_BASE_URL 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"
@@ -64,27 +64,27 @@
64
64
  "tools": [
65
65
  {
66
66
  "name": "agentsearch_web_search",
67
- "description": "Search the web and return JSON text. Free with no config (free tier, up to 25 searches/day per IP, subject to shared daily capacity). Pays per call over x402 ($0.008 to AgentSearch's API, or $0.005 via Pocket) only if AGENTSEARCH_MODE=paid; a wallet key alone keeps search free. Uses your self-hosted API if AGENTSEARCH_BASE_URL is set. Use extract when you already have a URL. Paid direct calls accept freshness/date, country, language and domain filters. Read-only."
67
+ "description": "Search the web and return JSON text. Free with no config (free tier, up to 25 searches/day per IP, subject to shared daily capacity). Pays per call over x402 ($0.005 to AgentSearch's API, or $0.005 via Pocket) only if AGENTSEARCH_MODE=paid; a wallet key alone keeps search free. Uses your self-hosted API if AGENTSEARCH_BASE_URL is set. Use extract when you already have a URL. Paid direct calls accept freshness/date, country, language and domain filters. Read-only."
68
68
  },
69
69
  {
70
70
  "name": "agentsearch_extract",
71
- "description": "Extract one page (markdown/text, title, links) from a URL. No wallet: free trial (5 calls/day per IP). With a wallet key: $0.004 in USDC on Base per call via x402 to AgentSearch's own API (or $0.005 via Pocket with AGENTSEARCH_PAYMENT_ROUTE=pocket); uses your self-hosted API if AGENTSEARCH_BASE_URL is set. Read-only; returns JSON text."
71
+ "description": "Extract one page (markdown/text, title, links) from a URL. No wallet: free trial (5 calls/day per IP). With a wallet key: $0.002 in USDC on Base per call via x402 to AgentSearch's own API (or $0.005 via Pocket with AGENTSEARCH_PAYMENT_ROUTE=pocket); uses your self-hosted API if AGENTSEARCH_BASE_URL is set. Read-only; returns JSON text."
72
72
  },
73
73
  {
74
74
  "name": "agentsearch_render",
75
- "description": "Render one URL in headless Chromium and return title plus rendered markdown/text/HTML/links (optional screenshot) as JSON text. No wallet: free trial (3 calls/day per IP, no screenshots). With a wallet key: $0.010 in USDC on Base per call via x402 to AgentSearch's own API (or via Pocket with AGENTSEARCH_PAYMENT_ROUTE=pocket); uses your self-hosted API if AGENTSEARCH_BASE_URL is set. Use for JavaScript-heavy pages. Read-only."
75
+ "description": "Render one URL in headless Chromium and return title plus rendered markdown/text/HTML/links (optional screenshot) as JSON text. No wallet: free trial (3 calls/day per IP, no screenshots). With a wallet key: $0.005 in USDC on Base per call via x402 to AgentSearch's own API (or via Pocket with AGENTSEARCH_PAYMENT_ROUTE=pocket); uses your self-hosted API if AGENTSEARCH_BASE_URL is set. Use for JavaScript-heavy pages. Read-only."
76
76
  },
77
77
  {
78
78
  "name": "agentsearch_search_and_read",
79
- "description": "Search the live web and return the top pages as markdown in one paid call ($0.009 in USDC on Base via AgentSearch's direct x402 API). Charged only when at least one page has text. Direct-only (not on Pocket or the free relay). Needs a wallet key. Accepts freshness/date, country, language and domain filters. Read-only; returns JSON text."
79
+ "description": "Search the live web and return the top pages as markdown in one paid call ($0.005 in USDC on Base via AgentSearch's direct x402 API). Charged only when at least one page has text. Direct-only (not on Pocket or the free relay). Needs a wallet key. Accepts freshness/date, country, language and domain filters. Read-only; returns JSON text."
80
80
  },
81
81
  {
82
82
  "name": "agentsearch_news_search",
83
- "description": "Search recent news articles (title, URL, snippet, domain, publish date) with freshness, date range, country, language and domain filters. $0.008 in USDC on Base per call via AgentSearch's direct x402 API; empty results not charged. Direct-only (not on Pocket or the free relay). Needs a wallet key. Read-only; returns JSON text."
83
+ "description": "Search recent news articles (title, URL, snippet, domain, publish date) with freshness, date range, country, language and domain filters. $0.005 in USDC on Base per call via AgentSearch's direct x402 API; empty results not charged. Direct-only (not on Pocket or the free relay). Needs a wallet key. Read-only; returns JSON text."
84
84
  },
85
85
  {
86
86
  "name": "agentsearch_screenshot",
87
- "description": "Screenshot a public web page in a headless browser and return it as an image (PNG or JPEG; viewport or full page, custom viewport size) plus JSON metadata. $0.010 in USDC on Base per call via AgentSearch's direct x402 API; failed captures not charged. Direct-only. Needs a wallet key. Read-only."
87
+ "description": "Screenshot a public web page in a headless browser and return it as an image (PNG or JPEG; viewport or full page, custom viewport size) plus JSON metadata. $0.005 in USDC on Base per call via AgentSearch's direct x402 API; failed captures not charged. Direct-only. Needs a wallet key. Read-only."
88
88
  },
89
89
  {
90
90
  "name": "agentsearch_review_lookup",
@@ -99,7 +99,7 @@
99
99
  "AGENTSEARCH_WALLET_PRIVATE_KEY": {
100
100
  "type": "string",
101
101
  "title": "Wallet private key (pay per call)",
102
- "description": "Optional. 64-hex private key of a NEW wallet holding a little USDC on Base. Enables paid extract ($0.004) and render ($0.010) per call via x402, paid to AgentSearch's own API; without it they use the small free trial. Search stays free unless you set the search mode to paid. Used only to sign payments.",
102
+ "description": "Optional. 64-hex private key of a NEW wallet holding a little USDC on Base. Enables paid extract ($0.002) and render ($0.005) per call via x402, paid to AgentSearch's own API; without it they use the small free trial. Search stays free unless you set the search mode to paid. Used only to sign payments.",
103
103
  "sensitive": true,
104
104
  "required": false
105
105
  },
@@ -113,7 +113,7 @@
113
113
  "AGENTSEARCH_MODE": {
114
114
  "type": "string",
115
115
  "title": "Search mode (free, paid or auto)",
116
- "description": "Optional. Search only. Leave blank or 'free' to keep search on the free tier even with a wallet key. 'paid' pays per search ($0.008 direct, $0.005 via Pocket; needs a wallet key); 'auto' pays for search whenever a wallet key is set.",
116
+ "description": "Optional. Search only. Leave blank or 'free' to keep search on the free tier even with a wallet key. 'paid' pays per search ($0.005 direct, $0.005 via Pocket; needs a wallet key); 'auto' pays for search whenever a wallet key is set.",
117
117
  "required": false,
118
118
  "default": "free"
119
119
  },
@@ -127,7 +127,7 @@
127
127
  "AGENTSEARCH_PAYMENT_ROUTE": {
128
128
  "type": "string",
129
129
  "title": "Paid route (direct or pocket)",
130
- "description": "Optional. Leave blank or 'direct' to pay AgentSearch's own x402 API on Base (the default since 1.6.0: search $0.008, extract $0.004, render $0.010, search_and_read $0.009, news $0.008, screenshot $0.010). 'pocket' pays through the Pocket Network Agentic Portal instead ($0.005 per call for search, extract and render; search_and_read is direct-only).",
130
+ "description": "Optional. Leave blank or 'direct' to pay AgentSearch's own x402 API on Base (the default since 1.6.0: search $0.003, extract $0.002, render $0.005, search_and_read $0.005, news $0.003, screenshot $0.004). 'pocket' pays through the Pocket Network Agentic Portal instead ($0.005 per call for search, extract and render; search_and_read is direct-only).",
131
131
  "required": false,
132
132
  "default": ""
133
133
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsearchhq/agentsearch-mcp",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "mcpName": "io.github.agentsearchhq-coder/agentsearch-mcp",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/server.json CHANGED
@@ -8,26 +8,26 @@
8
8
  "url": "https://github.com/agentsearchhq-coder/agentsearch-mcp",
9
9
  "source": "github"
10
10
  },
11
- "version": "1.8.1",
11
+ "version": "1.8.2",
12
12
  "packages": [
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "@agentsearchhq/agentsearch-mcp",
16
- "version": "1.8.1",
16
+ "version": "1.8.2",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  },
20
20
  "environmentVariables": [
21
21
  {
22
22
  "name": "AGENTSEARCH_WALLET_PRIVATE_KEY",
23
- "description": "Private key of a dedicated wallet with a little USDC on Base; enables paid extract/render via x402, paid to AgentSearch's own API by default (extract $0.004, render $0.010, search_and_read $0.009). Without it, extract/render use the free trial (5/3 calls per day per IP). Search stays free unless AGENTSEARCH_MODE=paid. Alias: POCKET_PRIVATE_KEY",
23
+ "description": "Private key of a dedicated wallet with a little USDC on Base; enables paid extract/render via x402, paid to AgentSearch's own API by default (extract $0.002, render $0.005, search_and_read $0.005). Without it, extract/render use the free trial (5/3 calls per day per IP). Search stays free unless AGENTSEARCH_MODE=paid. Alias: POCKET_PRIVATE_KEY",
24
24
  "isRequired": false,
25
25
  "isSecret": true,
26
26
  "format": "string"
27
27
  },
28
28
  {
29
29
  "name": "AGENTSEARCH_MODE",
30
- "description": "Search mode: free (default; free relay even with a wallet key), paid (pay per search, $0.008 direct or $0.005 via Pocket; needs a key) or auto (paid search when a key is set)",
30
+ "description": "Search mode: free (default; free relay even with a wallet key), paid (pay per search, $0.005 direct or $0.005 via Pocket; needs a key) or auto (paid search when a key is set)",
31
31
  "isRequired": false,
32
32
  "format": "string",
33
33
  "default": "free"
@@ -41,7 +41,7 @@
41
41
  },
42
42
  {
43
43
  "name": "AGENTSEARCH_PAYMENT_ROUTE",
44
- "description": "Paid route: direct (default since 1.6.0; AgentSearch's own x402 API on Base, search $0.008, extract $0.004, render $0.010, search_and_read $0.009) or pocket (Pocket Network Agentic Portal, $0.005 per call)",
44
+ "description": "Paid route: direct (default since 1.6.0; AgentSearch's own x402 API on Base, search $0.003, extract $0.002, render $0.005, search_and_read $0.005) or pocket (Pocket Network Agentic Portal, $0.005 per call)",
45
45
  "isRequired": false,
46
46
  "format": "string",
47
47
  "default": "direct"
package/smithery.yaml CHANGED
@@ -1,5 +1,5 @@
1
- # Smithery start command. Review tools and free search work with no config. With a wallet key, extract ($0.004) and render
2
- # ($0.010) pay per call in USDC on Base over x402 to AgentSearch's own API (search stays free unless mode is paid; paymentRoute=pocket uses the Pocket portal at $0.005),
1
+ # Smithery start command. Review tools and free search work with no config. With a wallet key, extract ($0.002) and render
2
+ # ($0.005) pay per call in USDC on Base over x402 to AgentSearch's own API (search stays free unless mode is paid; paymentRoute=pocket uses the Pocket portal at $0.005),
3
3
  # or use your self-hosted API when a base URL is set.
4
4
  startCommand:
5
5
  type: stdio
@@ -8,15 +8,15 @@ startCommand:
8
8
  properties:
9
9
  walletPrivateKey:
10
10
  type: string
11
- description: Optional 64-hex private key of a NEW wallet holding a little USDC on Base. Enables paid extract/render via x402 (extract $0.004, render $0.010, paid to AgentSearch); search stays free unless mode is paid. Used only to sign payments.
11
+ description: Optional 64-hex private key of a NEW wallet holding a little USDC on Base. Enables paid extract/render via x402 (extract $0.002, render $0.005, paid to AgentSearch); search stays free unless mode is paid. Used only to sign payments.
12
12
  maxTotalAtomic:
13
13
  type: string
14
14
  default: "1000000"
15
- description: Session spend cap in USDC atomic units (1000000 = $1.00). Per-call payments are always capped at 10000 ($0.010).
15
+ description: Session spend cap in USDC atomic units (1000000 = $1.00). Per-call payments are always capped at 20000 ($0.020).
16
16
  searchMode:
17
17
  type: string
18
18
  default: free
19
- description: "Search only: free (default), paid (pay $0.008 per search; needs a wallet key) or auto (paid when a wallet key is set)."
19
+ description: "Search only: free (default), paid (pay $0.005 per search; needs a wallet key) or auto (paid when a wallet key is set)."
20
20
  paymentRoute:
21
21
  type: string
22
22
  default: direct