ContextFetch

dev.contextfetch由 contextfetch.dev 發布官方發布者v1.1.0更新於 Oct 29, 2026

Web search and any page as LLM-ready Markdown for AI agents. Free keyless tier, no signup.

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取知識與記憶

概覽

AI 產生的概覽

ContextFetch 讓助理進行網頁搜尋、把網頁轉成 Markdown、爬取網站與產出附引用的研究,回傳依查詢裁剪的段落而非原始頁面。

可以做什麼
  • 搜尋網頁,回傳標題、網址以及僅與查詢相關的段落
  • 將公開網頁擷取為乾淨的 Markdown,可依查詢裁剪,並找出與某網址相似的頁面
  • 在伺服器端執行研究或抽取式回答,回傳逐字引用的段落與編號來源
  • 在深度與頁數限制內爬取單一網站,或只從網站地圖列出網址而不擷取頁面
  • 查看剩餘額度與消耗速度、設定自動加值,並領取免費 API 金鑰
適用情境
適合需要最新網頁資訊、文件或事實查核且希望節省 token 的情境,也適合一次呼叫就取得附引用來源的研究包。需要整站閱讀或爬取、並偏好乾淨 Markdown 而非原始 HTML 時同樣適用。
執行需求
可作為遠端端點使用,也可透過 npx 在本機執行,需要 Node.js 18 或更新版本。免費層不需金鑰,每個 IP 每天 25 次請求;付費金鑰放在 CONTEXTFETCH_API_KEY 或 x-api-key 標頭中。CONTEXTFETCH_API_BASE 僅供自架引擎使用。需要網路連線。
安裝前請注意
付費使用依搜尋、頁面、爬取頁數或子查詢計費,自動加值可在額度低於門檻時用已儲存的卡片自動扣款,並有每月上限。免費金鑰工具會回傳一組金鑰,應存入 CONTEXTFETCH_API_KEY。查詢與網址會傳送給第三方 API,爬取與研究呼叫可能消耗較多額度。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 ContextFetch,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/dev.contextfetch%2Fmcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "contextfetch": {
      "type": "http",
      "url": "https://api.contextfetch.dev/mcp"
    }
  }
}

README

ContextFetch MCP server

Web search and clean, LLM-ready Markdown for AI agents: $1 per 1,000 searches, and 25 a day free with no key and no signup.

[npm] [MCP registry] [License: MIT]

bash
claude mcp add contextfetch -- npx -y @contextfetch/mcp

That is the whole setup for Claude Code. Then ask your agent something that needs the web:

Search for how Postgres SKIP LOCKED works for job queues

contextfetch_search returns each page as Markdown, cut down to the passages that answer the query:

markdown
## 1. PostgreSQL Job Queues with SKIP LOCKED | CodeNotes
https://codenotes.tech/blog/postgresql-job-queues-with-skip-locked · score 1.000
FOR UPDATE SKIP LOCKED is useful because it lets many workers claim different rows without blocking on rowsanother worker has already locked. But it is only the claiming primitive. A production queue also needs theright schema, indexes, retry policy, stuck-job recovery, cleanup, monitoring, and replay-safe handlers....

11 tools: search, page to Markdown, find similar, research, answer, crawl, site map, balance, free key and auto top-up. Exa- and Tavily-compatible API underneath, at contextfetch.dev.

Install

Claude Code (one line, keyless):

bash
claude mcp add contextfetch -- npx -y @contextfetch/mcp

With a paid key:

bash
claude mcp add contextfetch -e CONTEXTFETCH_API_KEY=your_key -- npx -y @contextfetch/mcp

Cursor: add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):

json
{  "mcpServers": {    "contextfetch": {      "command": "npx",      "args": ["-y", "@contextfetch/mcp"],      "env": { "CONTEXTFETCH_API_KEY": "your_key" }    }  }}

Windsurf: add to ~/.codeium/windsurf/mcp_config.json:

json
{  "mcpServers": {    "contextfetch": {      "command": "npx",      "args": ["-y", "@contextfetch/mcp"],      "env": { "CONTEXTFETCH_API_KEY": "your_key" }    }  }}

To use the free tier, drop the env block (or leave CONTEXTFETCH_API_KEY empty). The same JSON works in Claude Desktop's claude_desktop_config.json and in any other MCP client that launches stdio servers.

Requires Node.js 18 or newer.

Tools

ToolArgumentsWhat it doesCost
contextfetch_searchquery, num_results (1-25, default 5), include_domains?, exclude_domains?Web search. Each result comes back as title, URL and only the passages relevant to your query (cross-encoder pruned Markdown).$1 per 1,000
contextfetch_extract_urlurl, query?Any public page (docs, articles, GitHub files, arXiv) as clean Markdown with tables kept. With query, returns only the relevant passages.$1 per 1,000
contextfetch_find_similarurl, num_results (1-25, default 5)Pages similar to a URL, excluding its own domain.$1 per 1,000
contextfetch_researchquery, sub_queries? (up to 5), num_results_per_query (1-10, default 5)Server-side research: runs the sub-queries concurrently, dedupes pages by URL, ranks them all against query with the cross-encoder and returns one Markdown evidence pack (numbered [n] sources with their query-pruned passages, quoted verbatim; nothing generated), headed by the sub-queries, source count, tokens and credits used.$1 per 1,000 sub-queries (max 5)
contextfetch_deep_researchquery, sub_queries? (up to 3), num_results_per_query (1-25, default 5; at most 10 used)The earlier name of contextfetch_research, kept for existing setups: same server-side evidence pack, up to 3 sub-queries.$1 per 1,000 sub-queries (max 3)
contextfetch_answerquery, num_results (1-10, default 5)Extractive answer: the best-scoring passages of the top pages, quoted verbatim with [n] markers and a numbered source list. No text is generated, so it suits factual lookups more than open-ended questions.$1 per 1,000
contextfetch_crawlurl, max_depth (0-3, default 1), limit (1-50, default 10), query?, include_paths?, exclude_paths? (regexes on the URL path)Crawls one site from url (same-site links, robots.txt obeyed) and returns each page as Markdown with its depth. With query, pages are ranked by relevance and pruned to the relevant passages.$1 per 1,000 pages
contextfetch_mapurl, limit (1-5,000, default 100), include_paths?, exclude_paths?Lists a site's URLs from its sitemaps and the start page's links without fetching the pages.$1 per 1,000
contextfetch_balancenoneRemaining credits, burn rate (credits/day over the last 7 days) and auto-reload settings, including the last auto-reload error if a payment failed. Needs CONTEXTFETCH_API_KEY.free
contextfetch_get_free_keynoneClaims the network's free API key (2,500 searches, one per network) and uses it for the rest of the session. Give it to your user to keep in CONTEXTFETCH_API_KEY.free
contextfetch_auto_reloadenabled, threshold? (100-100,000), pack? (instant, builder, scale), monthly_max_usd? (max 500)Turns auto-reload on or off or changes it: when credits drop below threshold, the card saved at checkout buys pack again, up to the monthly cap. Needs CONTEXTFETCH_API_KEY and a saved card. The cap cannot go above $500 here.free

All tools return Markdown text. Without a key, contextfetch_balance and contextfetch_auto_reload return a short message saying they need one, with the buy link. On the free tier, results start with a one-line notice showing how many free searches are left today. When the API reports them, a closing line shows latency (total and per stage: recall, fetch, rerank), whether the answer came from cache, and token savings (pruned tokens vs raw page tokens).

contextfetch_research sub-queries

Pass your own sub_queries (different angles on the question); the tool description tells the calling model to do so. If you omit them, the API derives them from query with fixed rules:

  1. the query itself;
  2. the query + documentation;
  3. the query + benchmark when it mentions speed, performance, latency, memory or a comparison (vs, compare), otherwise the query + example.

A suffix the query already contains is skipped (so react useActionState example runs 2 searches, not 3). The whole research runs server-side in one /v1/research call that costs $1 per 1,000 sub-queries; a sub-query that fails is refunded and named in the header. If all fail, the tool returns the error.

Environment variables

VariableDefaultMeaning
CONTEXTFETCH_API_KEYunsetYour API key. Unset or empty uses the free keyless tier.
CONTEXTFETCH_API_BASEhttps://api.contextfetch.devAPI base URL. Point it at your own engine if you self-host.

Free tier and pricing

Price
No key25 searches a day per network, no signup
Free key (contextfetch_get_free_key)2,500 searches, one per network, no card
Search, page to Markdown, answer, find similar, map$1 per 1,000
Crawl$1 per 1,000 pages returned
Research$1 per 1,000 sub-queries

Pay as you go: top up from $10 (+10% from $100, +20% from $500). The balance never expires and one balance covers all your keys. Monthly plans and per-key limits are in the dashboard at contextfetch.dev/account.

When the balance or the free tier runs out (HTTP 402), the tool returns a one-click top-up link (Stripe: card, Apple Pay, Google Pay) and a line to pass on to your user. Then set CONTEXTFETCH_API_KEY as shown above.

Retries and connections

Connection failures before the request is sent (refused, DNS, connect timeout), HTTP 429 and HTTP 5xx are retried with exponential backoff and jitter (about 0.25-0.5 s, then 0.5-1 s), at most 3 attempts per API call and 30 seconds in total, retries included. A 429 or 5xx with a Retry-After header waits exactly that long, unless that would pass the 30 second budget. 400, 401, 402, 422 and other 4xx responses are never retried. A connection that drops after the request was sent is not retried either, since the search may already have been billed. Connections are pooled and kept alive by Node's built-in fetch (undici), so there is no extra HTTP dependency.

Errors

Errors never crash the server; they come back as tool results with isError: true and a plain explanation: invalid key (401), out of credits or free limit reached (402, lists the packs with their buy links), no saved card for auto-reload (409, with the buy link), URL not allowed (400, only public http(s) URLs), a page contextfetch_extract_url could not fetch (with the reason, such as HTTP 404), rate limited (429), server errors (5xx), network failures, and a 30 second limit per call (retries included).

Develop

bash
npm installnpm run build          # compiles src/ to dist/ and marks dist/index.js executablenpm test               # builds, then drives dist/index.js over stdio against a local mock API (no network)CONTEXTFETCH_API_BASE=http://localhost:8000 node dist/index.js

Publish

Publishing @contextfetch/mcp needs the npm organization contextfetch (create it at npmjs.com and add the publishing account as a member). Then npm publish from this folder; publishConfig.access is already public and prepublishOnly builds first.

License

MIT

來源:README.md,提交 14e36a9

工具

11

contextfetch_extract_url

ContextFetch URL to Markdown

Fetch a public web page (docs, articles, GitHub files, arXiv papers) as clean Markdown with tables preserved. Pass `query` to get only the passages relevant to it instead of the whole page.

輸入參數url必填query

contextfetch_find_similar

ContextFetch find similar pages

Find pages similar to a given URL (alternatives, related docs, competing libraries), excluding the source domain. Returns titles, URLs and the most relevant passages as Markdown.

輸入參數url必填num_results

contextfetch_research

ContextFetch research (evidence pack)

Research a question in one call, server-side: runs up to 5 web searches (sub-queries) concurrently, dedupes the pages by URL, ranks them all against the question with a cross-encoder and returns one Markdown evidence pack with numbered [n] sources and their query-pruned passages, quoted verbatim (no generated text). Costs 1 credit per sub-query. Pass your own `sub_queries` (distinct angles on the question) for better coverage. If omitted they are derived from `query`: the query itself, query + "documentation", and query + "benchmark" when it asks about speed, performance or comparisons, else query + "example" (a suffix the query already contains is skipped).

輸入參數query必填sub_queriesnum_results_per_query

contextfetch_deep_research

ContextFetch deep research

Deep research in one call, no LLM: a deep search of the question, its sub-topics (or your sub_queries) as searches of their own, and the pages its list and index results link to, returned as one cited report: summary, key facts, a section per sub-topic and the sources, every passage quoted verbatim with [n]. Costs 10 credits. For a quick evidence pack use contextfetch_research.

輸入參數query必填sub_queriesnum_results_per_query

contextfetch_answer

ContextFetch extractive answer

Answer a question with passages quoted verbatim from the web, never generated: searches, scores every passage of the top pages with a cross-encoder and returns the best ones with [n] citations to their sources. Use it for quick factual lookups; the quotes may not fully answer an open-ended question. Costs 1 credit.

輸入參數query必填num_results

contextfetch_crawl

ContextFetch site crawl

Crawl one website from a start URL and get its pages as Markdown: same-site links only, up to `max_depth` hops (<= 3) and `limit` pages (<= 50), robots.txt obeyed. Pass `query` to rank the pages by relevance and return only their relevant passages. Costs 1 credit per page returned.

輸入參數url必填limitquerymax_depthexclude_pathsinclude_paths

contextfetch_map

ContextFetch site map

List a website's URLs without fetching its pages: its sitemaps (from robots.txt, else /sitemap.xml) plus the start page's links, same site only, up to `limit` (<= 5,000). Use it to find the right pages before contextfetch_extract_url or contextfetch_crawl. Costs 1 credit.

輸入參數url必填limitexclude_pathsinclude_paths

contextfetch_balance

ContextFetch balance

Show the API key's remaining credits, daily burn rate (7-day average) and auto-reload settings, including the last auto-reload error if a payment failed. Needs CONTEXTFETCH_API_KEY; free. Check it before long jobs.

無需輸入參數。

contextfetch_auto_reload

ContextFetch auto-reload

Turn auto-reload on or off, or change it: when credits drop below `threshold`, the saved card buys `pack` again, up to `monthly_max_usd` per month. Needs CONTEXTFETCH_API_KEY and a card saved at checkout. The monthly cap cannot be raised above $500 here.

輸入參數packenabled必填thresholdmonthly_max_usd

contextfetch_get_free_key

ContextFetch free API key

Get a free ContextFetch API key with 2,500 searches (one per network, no sign-up). This session uses it right away; give it to your user so they can set CONTEXTFETCH_API_KEY to keep it.

無需輸入參數。

版本歷史

2
  1. v1.1.0最新Oct 22, 2026
  2. v1.0.1Oct 19, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分