@agentsearchhq/agentsearch-mcp 1.3.5 → 1.3.7
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 +58 -6
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/relay.js +3 -3
- package/dist/relay.js.map +1 -1
- package/dist/tools/render.js +1 -1
- package/dist/tools/render.js.map +1 -1
- package/dist/tools/search.d.ts +1 -1
- package/dist/tools/search.js +1 -1
- package/dist/tools/search.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/llms-install.md +95 -0
- package/manifest.json +3 -3
- package/package.json +8 -2
- package/server.json +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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
|
|
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**, search only, 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, pay per call (search too, if you opt in):** `agentsearch_extract` and `agentsearch_render`. Add a wallet key and these go through the [Pocket Network Agentic Portal](https://agent.pocket.network) and pay in USDC on Base (**$0.005 per extract call**) over [x402](https://x402.org). 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. Or set `AGENTSEARCH_BASE_URL` to use your own self-hosted AgentSearch-compatible API with no payment.
|
|
7
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.
|
|
8
8
|
|
|
@@ -10,15 +10,18 @@ MCP (Model Context Protocol) server from [AgentSearch](https://agentsearchhq.com
|
|
|
10
10
|
npx -y @agentsearchhq/agentsearch-mcp # free search + review tools work immediately
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
**Search, then read the page.** The usual agent loop is: free `agentsearch_web_search` → `agentsearch_extract` on the 1–2 best URLs (clean markdown, $0.005 each; $1 covers 200 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).
|
|
14
|
+
|
|
13
15
|
### Modes
|
|
14
16
|
|
|
15
17
|
| Config | `agentsearch_web_search` | `agentsearch_extract` / `agentsearch_render` |
|
|
16
18
|
|--------|--------------------------|-----------------------------------------------|
|
|
17
|
-
| Nothing set (default) | Free
|
|
18
|
-
| `AGENTSEARCH_WALLET_PRIVATE_KEY` |
|
|
19
|
+
| Nothing set (default) | Free tier, up to 25 searches/day per IP, subject to shared daily capacity | Paid tools: return a message with how to add a wallet; no network call |
|
|
20
|
+
| `AGENTSEARCH_WALLET_PRIVATE_KEY` | Still free (free tier, up to 25 searches/day per IP) | Paid via the Pocket portal (extract $0.005 per call) |
|
|
21
|
+
| `AGENTSEARCH_WALLET_PRIVATE_KEY` + `AGENTSEARCH_MODE=paid` | Paid, $0.005 per call via the Pocket portal | Paid via the Pocket portal |
|
|
19
22
|
| `AGENTSEARCH_BASE_URL` (takes precedence) | Your self-hosted API | Your self-hosted API |
|
|
20
23
|
|
|
21
|
-
To
|
|
24
|
+
To use paid Extract/Render, set `AGENTSEARCH_WALLET_PRIVATE_KEY` (a new wallet with a little USDC on Base) in this server's `env` and restart your client.
|
|
22
25
|
|
|
23
26
|
### How the paid mode works
|
|
24
27
|
|
|
@@ -87,6 +90,8 @@ npx -y @agentsearchhq/agentsearch-mcp
|
|
|
87
90
|
npm i @agentsearchhq/agentsearch-mcp
|
|
88
91
|
```
|
|
89
92
|
|
|
93
|
+
Cline setup: [llms-install.md](llms-install.md).
|
|
94
|
+
|
|
90
95
|
From a local checkout:
|
|
91
96
|
|
|
92
97
|
```bash
|
|
@@ -105,7 +110,7 @@ Binary: `agentsearch-mcp` → `dist/index.js`
|
|
|
105
110
|
|
|
106
111
|
| Variable | Required | Notes |
|
|
107
112
|
|----------|----------|--------|
|
|
108
|
-
| `AGENTSEARCH_WALLET_PRIVATE_KEY` | no | Without it, search uses the free
|
|
113
|
+
| `AGENTSEARCH_WALLET_PRIVATE_KEY` | no | Without it, search uses the free tier (up to 25 searches/day per IP, subject to shared daily capacity) 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`). |
|
|
109
114
|
| `AGENTSEARCH_MAX_TOTAL_ATOMIC` | no | Session spend cap in USDC atomic units. Default `1000000` ($1.00). Alias: `POCKET_MAX_TOTAL_ATOMIC`. |
|
|
110
115
|
| `AGENTSEARCH_MAX_PER_CALL_ATOMIC` | no | Lower per-call cap; default and maximum `5000` ($0.005). Alias: `POCKET_MAX_PER_CALL_ATOMIC`. |
|
|
111
116
|
| `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. |
|
|
@@ -149,6 +154,33 @@ Self-hosted instead (no payment), with an optional API key:
|
|
|
149
154
|
|
|
150
155
|
---
|
|
151
156
|
|
|
157
|
+
## Cline
|
|
158
|
+
|
|
159
|
+
Add this to `cline_mcp_settings.json` (VS Code: MCP Servers icon → Configure → Configure MCP Servers). Free search, no key:
|
|
160
|
+
|
|
161
|
+
```json
|
|
162
|
+
{
|
|
163
|
+
"mcpServers": {
|
|
164
|
+
"agentsearch": {
|
|
165
|
+
"command": "npx",
|
|
166
|
+
"args": ["-y", "@agentsearchhq/agentsearch-mcp"],
|
|
167
|
+
"disabled": false,
|
|
168
|
+
"autoApprove": []
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Or with the Cline CLI:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
cline mcp add agentsearch --yes -- npx -y @agentsearchhq/agentsearch-mcp
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
For paid Extract/Render, add an `env` block with `AGENTSEARCH_WALLET_PRIVATE_KEY` as in the Cursor example; search stays free unless you also set `AGENTSEARCH_MODE=paid`. Full guide: [Add free web search to Cline with MCP](https://agentsearchhq.com/blog/add-web-search-to-cline-mcp).
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
152
184
|
## Claude Code
|
|
153
185
|
|
|
154
186
|
Free search, no key (stdio is the default transport):
|
|
@@ -179,10 +211,30 @@ claude mcp add agentsearch-paid \
|
|
|
179
211
|
|
|
180
212
|
## Claude Desktop
|
|
181
213
|
|
|
182
|
-
Edit Claude Desktop config (`claude_desktop_config.json`):
|
|
214
|
+
Free web search needs no API key, wallet, or env vars. Edit Claude Desktop config (`claude_desktop_config.json`):
|
|
183
215
|
|
|
184
216
|
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
185
217
|
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
218
|
+
- Linux (beta): `~/.config/Claude/claude_desktop_config.json`
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"mcpServers": {
|
|
223
|
+
"agentsearch": {
|
|
224
|
+
"command": "npx",
|
|
225
|
+
"args": ["-y", "@agentsearchhq/agentsearch-mcp"]
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Restart Claude Desktop after saving. Full walkthrough: [Add web search to Claude Desktop with MCP](https://agentsearchhq.com/blog/add-web-search-to-claude-desktop-mcp).
|
|
232
|
+
|
|
233
|
+
Prefer a one-click install? Download the `.mcpb` extension from the [latest release](https://github.com/agentsearchhq-coder/agentsearch-mcp/releases/latest) and open it in Claude Desktop.
|
|
234
|
+
|
|
235
|
+
### Optional: paid Extract/Render
|
|
236
|
+
|
|
237
|
+
Only needed for paid `extract` / `render` tools. Add a wallet key and a spend cap:
|
|
186
238
|
|
|
187
239
|
```json
|
|
188
240
|
{
|
package/dist/client.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export const MISSING_BASE_URL_MESSAGE = "AGENTSEARCH_BASE_URL is not set, so agentsearch_web_search, agentsearch_extract and agentsearch_render are unavailable. Set AGENTSEARCH_BASE_URL to the base URL of your self-hosted AgentSearch-compatible API (no trailing slash) in this MCP server's env and restart it. The free relay (https://relay.agentsearchhq.com) serves search only; agentsearch_extract and agentsearch_render need paid mode (AGENTSEARCH_WALLET_PRIVATE_KEY) or a self-hosted API. The review tools (agentsearch_review_lookup, agentsearch_review_submit) work without it.";
|
|
6
6
|
/** Error for a base URL (e.g. the free relay) that does not serve /v1/extract or /v1/render. */
|
|
7
7
|
export function unsupportedEndpointMessage(path) {
|
|
8
|
-
return `This base URL does not serve ${path}. The free
|
|
8
|
+
return `This base URL does not serve ${path}. The free tier supports search only. Use paid mode (AGENTSEARCH_WALLET_PRIVATE_KEY) or self-host.`;
|
|
9
9
|
}
|
|
10
10
|
function isNotFoundDetail(text) {
|
|
11
11
|
try {
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["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AAC;AAED,mFAAmF;AACnF,MAAM,UAAU,eAAe,CAAC,CAAqB,EAAE,QAAQ,GAAG,CAAC;IACjE,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IACjF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACrC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -23,8 +23,8 @@ async function main() {
|
|
|
23
23
|
: search === "pocket"
|
|
24
24
|
? "search: pay-per-call via Pocket portal (x402, USDC on Base) because AGENTSEARCH_MODE opts in; extract/render pay per call too"
|
|
25
25
|
: hasWalletKey()
|
|
26
|
-
? "search: free
|
|
27
|
-
: "no wallet key or AGENTSEARCH_BASE_URL: search uses the free
|
|
26
|
+
? "search: AgentSearch free tier (up to 25 searches/day per IP, subject to shared daily capacity; set AGENTSEARCH_MODE=paid to pay for search); extract/render: pay-per-call via Pocket portal (x402, USDC on Base)"
|
|
27
|
+
: "no wallet key or AGENTSEARCH_BASE_URL: search uses the AgentSearch free tier (up to 25 searches/day per IP, subject to shared daily capacity); extract/render need a wallet key";
|
|
28
28
|
console.error(`agentsearch-mcp listening on stdio (${base}; reviews=${loadReviewsConfig().baseUrl})`);
|
|
29
29
|
}
|
|
30
30
|
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,UAAU,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,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AAC,SAAS,CAAC,CAAC;IAEhC,0DAA0D;IAC1D,2CAA2C;IAC3C,MAAM,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACrC,MAAM,IAAI,GACR,MAAM,KAAK,aAAa;QACtB,CAAC,CAAC,QAAQ,OAAO,CAAC,GAAG,CAAC,oBAAqB,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QACxE,CAAC,CAAC,UAAU,EAAE,KAAK,SAAS;YAC1B,CAAC,CAAC,2GAA2G;YAC7G,CAAC,CAAC,MAAM,KAAK,QAAQ;gBACnB,CAAC,CAAC,+HAA+H;gBACjI,CAAC,CAAC,YAAY,EAAE;oBACd,CAAC,CAAC,kNAAkN;oBACpN,CAAC,CAAC,iLAAiL,CAAC;IAC9L,OAAO,CAAC,KAAK,CACX,uCAAuC,IAAI,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"}
|
package/dist/relay.js
CHANGED
|
@@ -5,7 +5,7 @@ export const FREE_RELAY_URL = "https://relay.agentsearchhq.com";
|
|
|
5
5
|
export const FREE_RELAY_DAILY_LIMIT = 25;
|
|
6
6
|
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. A wallet key alone enables Extract and Render; search stays on the free tier unless you also set AGENTSEARCH_MODE=paid.";
|
|
7
7
|
export const FREE_RELAY_LIMIT_MESSAGE = [
|
|
8
|
-
`Free search limit reached: the free
|
|
8
|
+
`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.`,
|
|
9
9
|
"Upgrade to paid search (plus agentsearch_extract and agentsearch_render): each search or extract call costs $0.005 in USDC on Base via the Pocket Network Agentic Portal (https://agent.pocket.network) over x402.",
|
|
10
10
|
ADD_WALLET,
|
|
11
11
|
"Or set AGENTSEARCH_BASE_URL to your own self-hosted AgentSearch-compatible API.",
|
|
@@ -13,7 +13,7 @@ export const FREE_RELAY_LIMIT_MESSAGE = [
|
|
|
13
13
|
export function paidOnlyMessage(tool) {
|
|
14
14
|
return [
|
|
15
15
|
`${tool} is a paid tool${tool === "agentsearch_extract" ? ": $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.`,
|
|
16
|
-
`The free
|
|
16
|
+
`The free tier covers agentsearch_web_search only (up to ${FREE_RELAY_DAILY_LIMIT} searches/day per IP, subject to shared daily capacity).`,
|
|
17
17
|
ADD_WALLET,
|
|
18
18
|
"Spending is capped 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.",
|
|
19
19
|
"The review tools (agentsearch_review_lookup, agentsearch_review_submit) are free and need no setup.",
|
|
@@ -21,7 +21,7 @@ export function paidOnlyMessage(tool) {
|
|
|
21
21
|
}
|
|
22
22
|
/** Limit message when a wallet is already configured: only the search mode needs to change. */
|
|
23
23
|
export const FREE_RELAY_LIMIT_MESSAGE_WITH_WALLET = [
|
|
24
|
-
`Free search limit reached: the free
|
|
24
|
+
`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.`,
|
|
25
25
|
"A wallet key is configured, but search is in free mode (the default). To pay $0.005 per search call instead (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.",
|
|
26
26
|
].join(" ");
|
|
27
27
|
/** Search through the free relay. Throws AgentSearchHttpError(429, FREE_RELAY_LIMIT_MESSAGE) when the daily limit is hit. */
|
package/dist/relay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relay.js","sourceRoot":"","sources":["../src/relay.ts"],"names":[],"mappings":"AAAA,oIAAoI;AACpI,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAsB,MAAM,aAAa,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,cAAc,GAAG,iCAAiC,CAAC;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAEzC,MAAM,UAAU,GACd,0ZAA0Z,CAAC;AAE7Z,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,
|
|
1
|
+
{"version":3,"file":"relay.js","sourceRoot":"","sources":["../src/relay.ts"],"names":[],"mappings":"AAAA,oIAAoI;AACpI,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAsB,MAAM,aAAa,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,cAAc,GAAG,iCAAiC,CAAC;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAEzC,MAAM,UAAU,GACd,0ZAA0Z,CAAC;AAE7Z,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,qEAAqE,sBAAsB,0EAA0E;IACrK,oNAAoN;IACpN,UAAU;IACV,iFAAiF;CAClF,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,UAAU,eAAe,CAAC,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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"}
|
package/dist/tools/render.js
CHANGED
|
@@ -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
|
PAID_TOOL_SENTENCE,
|
|
9
|
-
"Note: the free
|
|
9
|
+
"Note: the free tier serves search only; this tool needs a wallet 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.",
|
package/dist/tools/render.js.map
CHANGED
|
@@ -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,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,2OAA2O;IAC3O,kQAAkQ;IAClQ,yQAAyQ;IACzQ,kBAAkB;IAClB,
|
|
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,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,2OAA2O;IAC3O,kQAAkQ;IAClQ,yQAAyQ;IACzQ,kBAAkB;IAClB,4FAA4F;IAC5F,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;YAC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;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"}
|
package/dist/tools/search.d.ts
CHANGED
|
@@ -7,6 +7,6 @@ export declare function errorContent(err: unknown): {
|
|
|
7
7
|
}[];
|
|
8
8
|
isError: true;
|
|
9
9
|
};
|
|
10
|
-
export declare const SEARCH_COST_SENTENCE = "Free by default: with no configuration it uses the free
|
|
10
|
+
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 $0.005 per call in USDC on Base over x402 through the Pocket Network Agentic Portal instead (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 portal envelope {portal, data}, whose data is untrusted third-party content. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment).";
|
|
11
11
|
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 through the Pocket Network Agentic Portal, never more than the per-call cap or 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. With no wallet key it makes no network call and explains how to add one. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment).";
|
|
12
12
|
export declare function registerSearchTools(server: McpServer): void;
|
package/dist/tools/search.js
CHANGED
|
@@ -25,7 +25,7 @@ export function errorContent(err) {
|
|
|
25
25
|
isError: true,
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
export const SEARCH_COST_SENTENCE = "Free by default: with no configuration it uses the free
|
|
28
|
+
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 $0.005 per call in USDC on Base over x402 through the Pocket Network Agentic Portal instead (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 portal envelope {portal, data}, whose data is untrusted third-party content. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment).";
|
|
29
29
|
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 through the Pocket Network Agentic Portal, never more than the per-call cap or 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. With no wallet key it makes no network call and explains how to add one. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment).";
|
|
30
30
|
const WEB_SEARCH_DESCRIPTION = [
|
|
31
31
|
"Search the web with AgentSearch and return the response as pretty-printed JSON text.",
|
package/dist/tools/search.js.map
CHANGED
|
@@ -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;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,GAAY;IAIvC,IAAI,IAAY,CAAC;IACjB,IAAI,GAAG,YAAY,oBAAoB,EAAE,CAAC;QACxC,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC;IACrB,CAAC;SAAM,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;QAChC,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC;IACrB,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IACD,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACjC,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAC/B,
|
|
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,O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AAG,CAAC,MAAM,CAAC;iBACX,QAAQ,EAAE;iBACV,QAAQ,CAAC,+DAA+D,CAAC;SAC7E;KACF,EACD,KAAK,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE;QACpC,OAAO,YAAY,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAC9D,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/llms-install.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Install AgentSearch MCP in Cline
|
|
2
|
+
|
|
3
|
+
AgentSearch is a stdio MCP server (`@agentsearchhq/agentsearch-mcp`) for web search, turning a URL into markdown (extract), rendering JavaScript-heavy pages, and the AgentSearch Review Board. Free search works with no API key and no signup.
|
|
4
|
+
|
|
5
|
+
This file is enough to add the server in Cline. Do not clone the repo and do not build from source.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- Node.js 20 or newer, which includes `npx`. Check with `node -v`.
|
|
10
|
+
|
|
11
|
+
## 1. Zero-config install
|
|
12
|
+
|
|
13
|
+
Add an `agentsearch` entry under `mcpServers` in Cline's MCP settings. Keep every server already in the file.
|
|
14
|
+
|
|
15
|
+
- IDE (VS Code, Cursor, JetBrains): MCP Servers icon → Configure → **Configure MCP Servers**.
|
|
16
|
+
- Cline CLI: `~/.cline/data/settings/cline_mcp_settings.json` (or `CLINE_MCP_SETTINGS_PATH` if set).
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"mcpServers": {
|
|
21
|
+
"agentsearch": {
|
|
22
|
+
"command": "npx",
|
|
23
|
+
"args": ["-y", "@agentsearchhq/agentsearch-mcp"],
|
|
24
|
+
"disabled": false,
|
|
25
|
+
"autoApprove": []
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Save the file. Cline starts the server over stdio. No restart of the whole app is required after the settings file is saved.
|
|
32
|
+
|
|
33
|
+
On Windows, if `npx` cannot be launched directly, use `"command": "cmd"` and `"args": ["/c", "npx", "-y", "@agentsearchhq/agentsearch-mcp"]`.
|
|
34
|
+
|
|
35
|
+
## 2. Confirm the five tools
|
|
36
|
+
|
|
37
|
+
After the server connects, it lists exactly these tools:
|
|
38
|
+
|
|
39
|
+
- `agentsearch_web_search`
|
|
40
|
+
- `agentsearch_extract`
|
|
41
|
+
- `agentsearch_render`
|
|
42
|
+
- `agentsearch_review_lookup`
|
|
43
|
+
- `agentsearch_review_submit`
|
|
44
|
+
|
|
45
|
+
With nothing else configured:
|
|
46
|
+
|
|
47
|
+
- `agentsearch_web_search` works immediately (free search, up to 25 searches/day per IP, no API key, no signup, no wallet).
|
|
48
|
+
- `agentsearch_review_lookup` and `agentsearch_review_submit` work immediately. No key.
|
|
49
|
+
- `agentsearch_extract` and `agentsearch_render` are listed, but they return setup instructions and make no network call until a wallet key or a self-hosted base URL is set.
|
|
50
|
+
|
|
51
|
+
## Free tier
|
|
52
|
+
|
|
53
|
+
Free search is per IP: up to 25 searches/day per IP, subject to shared daily capacity. It resets daily. There is no account. When the limit is hit, the tool explains how to switch that call to paid search.
|
|
54
|
+
|
|
55
|
+
The two review tools stay free with no configuration. The board is https://reviews.agentsearchhq.com.
|
|
56
|
+
|
|
57
|
+
## 3. Optional paid search, extract, and render
|
|
58
|
+
|
|
59
|
+
Paid calls go through the [Pocket Network Agentic Portal](https://agent.pocket.network) and pay **$0.005 per call** in USDC on Base over [x402](https://x402.org). No AgentSearch account, no API key, and no ETH for gas. The server never signs more than $0.005 per call.
|
|
60
|
+
|
|
61
|
+
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.
|
|
62
|
+
|
|
63
|
+
Set the wallet key and a session spend cap on the same `agentsearch` entry:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"mcpServers": {
|
|
68
|
+
"agentsearch": {
|
|
69
|
+
"command": "npx",
|
|
70
|
+
"args": ["-y", "@agentsearchhq/agentsearch-mcp"],
|
|
71
|
+
"env": {
|
|
72
|
+
"AGENTSEARCH_WALLET_PRIVATE_KEY": "0xYOUR_DEDICATED_WALLET_KEY",
|
|
73
|
+
"AGENTSEARCH_MAX_TOTAL_ATOMIC": "1000000"
|
|
74
|
+
},
|
|
75
|
+
"disabled": false,
|
|
76
|
+
"autoApprove": []
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
| Variable | Role |
|
|
83
|
+
|----------|------|
|
|
84
|
+
| `AGENTSEARCH_WALLET_PRIVATE_KEY` | Private key (64 hex, `0x` optional) of a dedicated wallet with a little USDC on Base. Alias: `POCKET_PRIVATE_KEY`. |
|
|
85
|
+
| `AGENTSEARCH_MAX_TOTAL_ATOMIC` | Session spend cap in USDC atomic units. `1000000` = $1.00 (the default). Alias: `POCKET_MAX_TOTAL_ATOMIC`. |
|
|
86
|
+
| `AGENTSEARCH_MAX_PER_CALL_ATOMIC` | Optional. Can only lower the per-call cap; default and maximum `5000` ($0.005). Alias: `POCKET_MAX_PER_CALL_ATOMIC`. |
|
|
87
|
+
| `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. |
|
|
88
|
+
|
|
89
|
+
A wallet key enables `agentsearch_extract` and `agentsearch_render` at $0.005 per call. Search stays free until you also set `"AGENTSEARCH_MODE": "paid"`. Leave `autoApprove` empty so Cline asks before a tool runs; the caps above are what limit spend if it does not.
|
|
90
|
+
|
|
91
|
+
Fund the wallet with a little USDC **on Base** (for example $1, enough for 200 calls). Save the settings file again so Cline restarts the server with the new env.
|
|
92
|
+
|
|
93
|
+
## Optional self-hosted API
|
|
94
|
+
|
|
95
|
+
To use your own AgentSearch-compatible API and skip payment, set `AGENTSEARCH_BASE_URL` (no trailing slash). It takes precedence over the free tier and the paid portal. `AGENTSEARCH_API_KEY` is an optional bearer token. The free tier serves search only; do not point `AGENTSEARCH_BASE_URL` at the free-tier host if you need extract or render.
|
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.
|
|
5
|
+
"version": "1.3.7",
|
|
6
6
|
"description": "Free web search out of the box (up to 25 searches/day per IP, subject to shared daily capacity); web search and page extract paid per call ($0.005 USDC on Base via x402), plus JS render, 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
|
|
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, search only); agentsearch_extract and agentsearch_render need a wallet key. With a wallet key, agentsearch_extract and agentsearch_render go through the Pocket Network Agentic Portal and pay $0.005 in USDC on Base over x402 for extract (gasless; no account or API key); search stays free unless AGENTSEARCH_MODE=paid. The server never signs more than the per-call cap or more than the session cap (default $1.00), signs only USDC on Base for the portal's payee and the three AgentSearch services, 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"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"tools": [
|
|
62
62
|
{
|
|
63
63
|
"name": "agentsearch_web_search",
|
|
64
|
-
"description": "Search the web and return JSON text. Free with no config (
|
|
64
|
+
"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 $0.005 per call via the Pocket portal (x402) 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. Read-only."
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"name": "agentsearch_extract",
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentsearchhq/agentsearch-mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"mcpName": "io.github.agentsearchhq-coder/agentsearch-mcp",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"description": "MCP server: web search
|
|
8
|
+
"description": "MCP server for AI agents: free web search (no key, up to 25/day per IP), plus URL-to-markdown extract and headless JS render at $0.005/call via x402 (USDC on Base). Also the free AgentSearch Review Board.",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"bin": {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"dist",
|
|
16
16
|
"README.md",
|
|
17
|
+
"llms-install.md",
|
|
17
18
|
".env.example",
|
|
18
19
|
"server.json",
|
|
19
20
|
"smithery.yaml",
|
|
@@ -40,6 +41,11 @@
|
|
|
40
41
|
"agentsearch",
|
|
41
42
|
"web-search",
|
|
42
43
|
"render",
|
|
44
|
+
"rag",
|
|
45
|
+
"web-scraping",
|
|
46
|
+
"markdown",
|
|
47
|
+
"url-to-markdown",
|
|
48
|
+
"web-extract",
|
|
43
49
|
"headless-browser",
|
|
44
50
|
"javascript-rendering",
|
|
45
51
|
"reviews",
|
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": "Free search
|
|
5
|
+
"description": "Free web search (no key) + URL-to-markdown extract and JS render, $0.005/call via x402 on Base.",
|
|
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.
|
|
11
|
+
"version": "1.3.7",
|
|
12
12
|
"packages": [
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "@agentsearchhq/agentsearch-mcp",
|
|
16
|
-
"version": "1.3.
|
|
16
|
+
"version": "1.3.7",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
},
|