Anyfetch

io.github.aliasmode由 GitHub 账号 aliasmode 发布v0.8.3更新于 Nov 4, 2026

Web search and web fetch with no API keys. Reads the sites that refuse AI agents.

概览

AI 生成的概览

Anyfetch 为助手提供无需 API 密钥的网页搜索与网页读取,以 Markdown 返回完整页面,并能读取拒绝 AI 代理的站点。

可以做什么
  • 搜索网页:合并 Brave、Yahoo 与 DuckDuckGo 结果,或使用 GitHub、Stack Overflow、Hacker News、arXiv、论文库及自建 SearXNG 等专用来源,支持站点、时间与翻页筛选
  • 按网址读取单个页面,返回 Markdown 或纯文本,可只返回与问题相关的片段,长页面分段返回,PDF 转为文本
  • 一次读取多个页面,按顺序为每个网址返回一条结果
  • 一次调用完成搜索与阅读,在结果列表中附带各页面匹配查询的内容
适用场景
适合助手需要最新网络信息,而内置抓取或搜索工具被 403 拒绝或只返回摘要的场景。适用于新闻、论坛、文档与论文站点的检索和阅读,也可设为代理的默认网页工具。
运行要求
作为本地 stdio 进程在用户机器上运行;可通过安装脚本、配合 Node.js 的 npx 使用 npm 包,或 Claude Code 插件安装。无需 API 密钥或账号。可选:用于需 JavaScript 校验站点的 Firefox、用于纯脚本页面的 Lightpanda,以及供服务器地址使用的代理配置文件。仅限桌面端。
安装前请注意
请求会模仿真实浏览器并通过部分机器人校验,可能与站点条款冲突;默认不登录、不破解验证码、不执行 JavaScript。它可能以隐藏方式启动你的 Firefox 并使用临时配置,还会在磁盘保存各站点的通行凭证。代理文件以明文保存密码。README 推广厂商自家的代理服务与浏览器。设置代理后,所有搜索与抓取都会经过该代理。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Anyfetch,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Anyfetch

Web search and web fetch for AI agents. One small binary, no API keys, and it reads the sites that refuse your agent.

Free and open source, from the makers of AliasMode.

Agent harnesses fetch pages with a bot identity, and a large part of the web answers 403. Anyfetch sends the request a real browser sends, so your agent gets the page.

97 popular sites that block AI agentsPages read
Anyfetch82
Anyfetch with a NobleProxy residential IP87
curl46
Reference MCP fetch server39
Claude Code built-in WebFetch36

Anyfetch read 28 sites that no other tool in the table could read. Among them: The New York Times, Reuters, Bloomberg, The Washington Post, The Economist, Medium, Reddit, Stack Overflow, IMDb and YouTube.

33 research questions, each asked twiceAnswered correctly both times
Agent with Anyfetch32
Same agent with Claude Code built-in WebSearch and WebFetch27

Thirteen of the questions are about a page on a site that blocks AI agents. The built-in fetch could not read any of those 13 pages. Its search found the answer in another source for 7 of them. Anyfetch answered 12 in both runs. The questions were written from pages that Anyfetch can read, so this group shows what the built-in tools miss.

One page, started freshTimePeak memory
Anyfetch0.19 s17 MB
Headless Chromium1.15 s544 MB

Sites: measured on 2026-10-12 with version 0.8.0. Questions: measured on 2026-10-12 with version 0.7.1. Time and memory: measured on 2026-10-11. All from a cloud server, with no proxy except in the proxy row. See how we measured and how to run it again.

What your agent gets

  • Search with no key. Brave, Yahoo and DuckDuckGo results, with domain and date filters, quoted phrases and paging. Specialist sources for GitHub, Stack Overflow, Hacker News, arXiv and research papers. Or your own SearXNG.
  • Search and read in one call. Ask for the top results together with the result list, and get the parts of each page that match your query.
  • Answers, not whole pages. Give a question with the URL, and get only the parts of the page that match it. The Python 3.15 release notes are 218,000 characters; the answer to one question about them came back in 2,200.
  • Clean Markdown. Links, tables and code blocks stay intact. Long pages come in parts.
  • PDFs. Papers and reports come back as text, page by page.
  • Sites that need JavaScript. Anyfetch reads the data inside the page, and uses the site's public API or feed for Stack Overflow, Reddit, IMDb, X posts, PyPI and crates.io. A Reddit thread comes with every comment and its score. No browser runs. For pages that hold nothing without their scripts, it can use Lightpanda, an optional small engine.
  • News and answers. Full articles on Reuters and Bloomberg, the latest articles of The Economist, and the answers on Quora, from the data that these sites send.
  • Home pages and listings. A page with no single article comes back as its headlines and links, in page order.
  • Browser-grade requests. Safari's TLS, HTTP/2 and header fingerprint. A refused fetch is retried automatically, as the same browser or as a second one. Bot checks that are one fixed step, as on Reddit and Behance, are passed.
  • Cloudflare checks. When a site insists on a JavaScript check, your own Firefox passes it once. After that, Anyfetch reads the site with plain requests.
  • Fast on repeat. Several pages in one call, fetched at the same time. A page fetched in the last 15 minutes comes from a local copy.
  • Lightweight. A 16 MB Rust binary. No bundled browser, no JavaScript engine, no Python, no Node.
  • Works everywhere. A stdio MCP server for agent harnesses, and a plain CLI for everything else.

Install

macOS and Linux:

sh
curl -fsSL https://aliasmode.github.io/anyfetch/install.sh | sh

Windows, in PowerShell:

powershell
irm https://aliasmode.github.io/anyfetch/install.ps1 | iex

The installer puts anyfetch in ~/.local/bin. Then it connects Anyfetch to each agent harness that it finds on the machine: Claude Code, Codex, Gemini CLI, Hermes Agent, Pi, Cline, Amp, OpenClaw and Cursor. Start a new agent session, and the agent has web_search, web_fetch and web_fetch_many.

Did you install a harness later? Run anyfetch setup. It uses each harness's own command, tells you what it connected, and is safe to run again.

Do you have Node.js? Then no install is needed. Give your MCP client this server, and npx gets the program for your platform:

json
{  "mcpServers": {    "anyfetch": { "command": "npx", "args": ["-y", "@aliasmode/anyfetch", "mcp"] }  }}

Only Claude Code, on macOS or Linux? You can install Anyfetch as a plugin instead. The plugin gets the program at its first start:

sh
claude plugin marketplace add aliasmode/anyfetch && claude plugin install anyfetch@anyfetch

Inside Claude Code 2.1.275 or later, this is one step: /plugin install anyfetch --marketplace aliasmode/anyfetch. Use the plugin or the installer, not both, or the agent sees every tool twice.

Connect your agent by hand

anyfetch setup does this for you. To do it by hand, each harness needs one command.

Claude Code

sh
claude mcp add --scope user anyfetch -- anyfetch mcp

Codex

sh
codex mcp add anyfetch -- anyfetch mcp

or in ~/.codex/config.toml:

toml
[mcp_servers.anyfetch]command = "anyfetch"args = ["mcp"]

Hermes Agent

sh
hermes mcp add anyfetch --command anyfetch --args mcp

Hermes connects, lists the tools and asks to enable them. Answer Y.

Pi

sh
pi mcp add anyfetch -- anyfetch mcp

Pi hides MCP tools behind its code mode by default. To show the tools to the model directly, set the exposure in ~/.pi/agent/mcp.json:

json
{  "mcpServers": {    "anyfetch": { "command": "anyfetch", "args": ["mcp"], "exposure": "direct" }  }}

Gemini CLI

sh
gemini mcp add -s user anyfetch anyfetch mcp

OpenCode — in ~/.config/opencode/opencode.json:

json
{  "$schema": "https://opencode.ai/config.json",  "mcp": {    "anyfetch": { "type": "local", "command": ["anyfetch", "mcp"], "enabled": true }  }}

Cursor — in ~/.cursor/mcp.json:

json
{  "mcpServers": {    "anyfetch": { "command": "anyfetch", "args": ["mcp"] }  }}

More harnesses

HarnessCommand
Clinecline mcp add anyfetch --yes -- anyfetch mcp
Ampamp mcp add anyfetch -- anyfetch mcp
OpenClawopenclaw mcp add anyfetch --command anyfetch --arg mcp
Goosegoose session --with-extension "anyfetch mcp"
VS Code (Copilot)code --add-mcp "{\"name\":\"anyfetch\",\"command\":\"anyfetch\",\"args\":[\"mcp\"]}"

Any other MCP client: add a stdio server with the command anyfetch and the argument mcp.

Anyfetch is in the official MCP Registry as io.github.aliasmode/anyfetch, and on npm as @aliasmode/anyfetch.

No MCP? Give the agent the CLI. Add this to AGENTS.md or the harness's instruction file:

markdown
## Web access- Search the web: `anyfetch search "<query>"`- Read pages: `anyfetch fetch <url> [<url>...] --format markdown`

Make it the default. Anyfetch tells the agent to use its tools in place of the built-in web tools. In our test with Claude Code, the agent then chose Anyfetch for 8 of 8 web tasks. Before, it chose Anyfetch for 2 of 8. To take the choice away, turn the built-ins off:

  • Claude Code, in ~/.claude/settings.json: "permissions": { "deny": ["WebFetch", "WebSearch"] }
  • Codex, in ~/.codex/config.toml: web_search = "disabled"

Use it from the command line

sh
anyfetch search "rust async runtime comparison"anyfetch search "tokio select" --site docs.rs --time yearanyfetch search "postgres vacuum freeze" --read 3anyfetch search "retrieval augmented generation" --provider papersanyfetch fetch https://stackoverflow.com/questions/231767 --format markdownanyfetch fetch https://arxiv.org/pdf/1706.03762 --max-chars 8000 --offset 8000anyfetch fetch https://docs.python.org/3.15/whatsnew/3.15.html --query "sampling profiler rate"anyfetch fetch https://www.rust-lang.org/ https://go.dev/ https://ziglang.org/

Output is JSON by default, so scripts and agents can parse it. --format markdown prints only the page content.

Tools

web_fetch

InputMeaning
urlThe page to read.
queryOptional. A question or keywords. The result has only the parts of the page that match.
max_charsOptional. The most content characters to return. The default is 50,000, or 5,000 with a query.
offsetOptional. The first content character to return. Not used with a query.
freshOptional. Fetch again even if a copy from the last 15 minutes exists.

The result has title, description, content (Markdown), total_chars, url (after redirects), status and retrieved_at. To read a long page in parts, call again with a higher offset until it reaches total_chars. The parts come from the local copy, so the site gets one request.

With a query, the page is split at its paragraphs, tables and code blocks. The parts that best match the words of the query come back in page order, under their headings, with [...] where parts are left out. The result then has focused: true. A page with no matching part comes back from its start. A second question about the same page uses the local copy.

HTML becomes Markdown. A PDF becomes text with [Page N] marks. JSON, plain text and XML feeds come back as they are.

web_fetch_many

InputMeaning
urlsThe pages to read. They are fetched at the same time.
queryOptional. As for web_fetch. Each page gives up to 5,000 characters.
max_charsOptional. The most content characters per page. By default the pages share 50,000.
freshOptional. As for web_fetch.

The result has pages: one entry per URL, in order. Each entry is the page, or its error.

web_search

InputMeaning
queryThe search query. Quoted phrases work.
providerOptional. See the list below. The default is auto.
siteOptional. Keep results from one domain, for example docs.rs.
timeOptional. day, week, month or year.
pageOptional. The result page, from 1.
readOptional. Also return, from this many top results, the parts of each page that match the query.
searxng_urlThe base URL of your SearXNG instance, for the searxng provider. It must have JSON output on.

Each result has title, url and snippet, and content when you set read.

ProviderSource
autoBrave, Yahoo and DuckDuckGo at the same time. Their lists are merged, and pages that several engines rank high come first. engines names the engines that answered.
braveBrave Search. About 20 results per page.
yahooYahoo Search. 7 results per page. No year filter.
duckduckgoDuckDuckGo. First page only.
searxngYour own SearXNG instance.
githubGitHub repositories, with stars and language.
stackoverflowStack Overflow questions, with score and answer count.
hackernewsHacker News stories, with points and the discussion link.
arxivarXiv papers, with abstracts.
papersResearch papers from OpenAlex, with citation counts and open-access links.

site, time and quoted phrases apply to the web engines. The specialist sources are free public APIs with their own request limits.

Errors

A failed call returns an error object with a code the agent can act on:

CodeMeaning
challenge_requiredThe site answered with a bot challenge that needs a browser.
http_errorThe site refused the request. status has the HTTP code.
rate_limitedThe site asked to slow down. retry_after has the wait, when given.
timeoutThe site did not answer within 30 seconds.
unsupported_contentThe URL is not text or a PDF (an image, for example).
extraction_failedThe page has no readable content. A scanned PDF has no text.

Cloudflare checks

Some sites answer every first request with a JavaScript check. Anyfetch handles it in two steps:

  1. Your own Firefox passes the check once. It runs hidden, with a throwaway profile, for a few seconds.
  2. Anyfetch saves the clearance for that site and goes back to plain requests. On Medium, one pass is good for a year.

In our test, the first page of such a site took about 5 seconds and the next one under 2 seconds.

This needs Firefox, or a Firefox-based browser, on the machine. Without one, nothing changes: the fetch returns challenge_required.

SettingEffect
ANYFETCH_BROWSER=offNever start a browser.
ANYFETCH_BROWSER=/path/to/browserUse this Firefox-based browser.

For an MCP server, set the variable in the server entry. In Claude Code:

sh
claude mcp add --scope user anyfetch -e ANYFETCH_BROWSER=off -- anyfetch mcp

Notes:

  • Tested on Linux. On Windows, and for a snap-packaged Firefox (the Ubuntu default), the browser is used only when ANYFETCH_BROWSER names it.
  • A clearance belongs to the address that earned it, so the browser is not used together with a proxy.
  • Saved clearances are in ~/.config/anyfetch/clearance/. Delete a file to forget a site.

Pages that need their scripts

Most pages give Anyfetch their text without JavaScript: it is in the HTML, in the page's data, or behind a public API. A few hold nothing until their scripts run. MSN, Spotify and Airbnb are examples. For those, Anyfetch can use Lightpanda, a small headless engine without a full browser.

Lightpanda is optional and separate. Install it from its README, put lightpanda on your PATH, and Anyfetch uses it for the pages that need it. In our test, MSN went from no content to 154,000 characters in 12 seconds, and Spotify from no content to 23,000 characters in 3 seconds. Pages that already work are not rendered, so they stay fast.

SettingEffect
ANYFETCH_RENDERER=offNever start the renderer.
ANYFETCH_RENDERER=/path/to/lightpandaUse this program.

Notes:

  • Lightpanda makes its own requests. It is not used together with a proxy, and a site with a bot check can refuse it.
  • A rendered application page, such as a feed or a listing, comes back as the whole page in Markdown.

Use a proxy

Some sites refuse cloud server addresses whatever the request looks like. If your agent runs on a server, send Anyfetch through a residential proxy. Put one line in ~/.config/anyfetch/proxy:

host:port:username:password

Anyfetch then sends every search and fetch through that HTTP proxy. The file holds the password in plain text, so keep it private: chmod 600 ~/.config/anyfetch/proxy. Delete the file to go direct again.

Some sites accept your own address and refuse the proxy's address. To reach both kinds, add a second line with the word direct. Anyfetch then tries the proxy first, and asks the site directly when the proxy route is refused.

Need a proxy? Use NobleProxy, our own service. In our test, one NobleProxy address took Anyfetch from 82 to 87 of the 97 sites, with the same result in every run. It opened The Wall Street Journal, Tripadvisor, Yelp, Etsy and Bandcamp, which refuse a server address. You get a static residential IP that only you use, with unlimited bandwidth and HTTP support.

What it does not do

Anyfetch itself does not run JavaScript, solve CAPTCHAs or log in. A page that shows its content only after its scripts run, with no data inside the HTML and no public API, returns its title and description unless Lightpanda is installed. It reads what a site sends to a first-time visitor. A page that needs a CAPTCHA, an account or a subscription to load stays closed, and Anyfetch says so with an error code.

Does your agent need a real browser, with logins and saved sessions? Use AliasMode. It is our free, open-source antidetect browser, and it has its own MCP server for agents.

Benchmark

The numbers at the top come from two scripts and one question set in bench/.

  • Pages read. bench/bench.py reads each of the 97 sites in bench/sites.txt once with each tool. A page counts as read when the tool returns at least 500 characters of text and the text is not a bot check. The same rule is applied to every tool. Anyfetch ran three times and read 82, 81 and 82 pages; the table shows the middle run. Through a NobleProxy static residential IP, a fixed address of a US cable provider, with the direct line in the proxy file, it read 87 pages in each of three runs. The proxy added The Wall Street Journal, Tripadvisor, Yelp, Etsy and Bandcamp. The other tools were not tested through the proxy. Claude Code's WebFetch cannot be scripted, so an agent called it once per site and recorded if real content came back.

  • Time and memory. bench/speed.py reads 10 pages with each program, started fresh for every page, and reports the median.

  • Research questions. bench/tasks.json has 33 questions. Each has one exact answer and the sentence on the source page that proves it. The pages are from July to October 2026, so a model cannot answer from memory. A Claude Sonnet agent answered the questions with Anyfetch only, and again with the built-in WebSearch and WebFetch of Claude Code only. The instructions were the same: at most 8 web calls for each question, and the answer UNKNOWN when the tools do not give it. Anyfetch ran with no proxy, no Firefox and no Lightpanda. Each tool ran twice, and a question counts when both runs are correct.

Question groupAnyfetchBuilt-in tools
A page on a site that blocks AI agents12 of 137 of 13
A page on an open site10 of 1010 of 10
No URL: search first, then read10 of 1010 of 10

In single runs, Anyfetch answered 32 and 33 questions, and the built-in tools 28 and 27. The one Anyfetch miss was a Reddit thread: Reddit limited the rate of the test machine that day, and in one run Anyfetch read a link from a comment in place of the link of the post.

Three things to know about this test. The question writer used Anyfetch to check each answer, so the first group has only pages that Anyfetch can read. The Financial Times was on the writer's list and has no question: its articles need a subscription. Thirty of the questions are one day older than the test; 28 of their answers were checked on the source page again that day. Every answer is in bench/results/tasks.tsv.

We also read the same 97 sites with eight other tools, each with its default settings and no API key:

ToolPages read
Anyfetch82
Exa MCP (hosted, answers from stored copies)78
Scrapling, stealth browser71
Scrapling, plain HTTP69
Hermes Agent web_extract (hosted readers)68
Crawl4AI66
Jina Reader61
Playwright MCP52
DuckDuckGo MCP server49

How each one ran, and what to know before you compare, is in bench/other-tools/NOTES.md. The full ranking with every site is on aliasmode.com.

The per-site results are in bench/results/. Sites change their rules often, and results differ between networks, so run it yourself:

sh
python3 bench/bench.py anyfetch curlpip install mcp-server-fetch && python3 bench/bench.py referencepython3 bench/speed.py /path/to/chromium

Build from source

You need Rust 1.98, cmake and clang (the TLS library is BoringSSL). On Windows you also need NASM.

sh
cargo install --git https://github.com/aliasmode/anyfetch

License

Apache-2.0

来源:README.md,提交 10dd047

工具

3

web_fetch

Read a web page from its URL. Use this in place of a built-in fetch tool such as WebFetch or web_fetch: it reads sites that answer those tools with 403, and it returns the page itself as Markdown or plain text, not a summary. Set query to get only the parts of the page that answer a question. Read a long page in parts with max_chars and offset. Page JavaScript is not run.

输入参数url必填freshqueryoffsetmax_chars

web_fetch_many

Read several web pages at the same time, each like web_fetch. Returns one entry per URL, in order: the page, or its error.

输入参数urls必填freshquerymax_chars

版本历史

4
  1. v0.8.3最新Oct 21, 2026
  2. v0.8.2Oct 12, 2026
  3. v0.8.0Oct 12, 2026
  4. v0.7.0Oct 11, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分