去角质
LLM代理的浏览器感知web执行层。将直接HTTP获取与Chrome扩展桥相结合,为AI助手提供经过身份验证、JavaScript渲染的web访问。
建筑
+------------------+
| Claude / LLM |
+--------+---------+
|
JSON-RPC (stdio or SSE)
|
+--------v---------+
| exfetch CLI |
| (Rust binary) |
+--+-----+------+--+
| | |
+-------------+ | +--------------+
| | |
+-------v-------+ +-------v-------+ +----------v---------+
| HTTP Fetcher | | Search Engine | | WebSocket Bridge |
| (reqwest+TLS) | | (DDG/SearXNG) | | (tokio-tungstenite)|
+-------+--------+ +---------------+ +----------+---------+
| |
+-------v--------+ +---------v---------+
| Content Extract | | Chrome Extension |
| readability/md | | (Manifest V3) |
+----------------+ +-------------------+安装
cargo install --path .命令行用法
获取页面
exfetch fetch https://example.com
exfetch fetch https://example.com --markdown
exfetch fetch https://example.com --json
exfetch fetch https://example.com --raw
exfetch fetch https://example.com --max-length 5000搜索网页
exfetch search "rust programming language"
exfetch search "rust programming" --results 10
exfetch search "rust programming" --fetch # also fetch top results
exfetch search "rust programming" --json
exfetch search "query" --engine searxng --searxng-url https://searx.be启动服务器
exfetch serve # WebSocket server for browser extension
exfetch serve --mcp-stdio # MCP server over stdin/stdout
exfetch serve --mcp-sse 8080 # MCP server over SSE
exfetch serve --daemon # Fork to background检查状态
exfetch statusClaude代码的MCP设置
添加到您的Claude Code MCP配置中:
{
"mcpServers": {
"exfetch": {
"command": "exfetch",
"args": ["serve", "--mcp-stdio"]
}
}
}claude.ai的MCP设置
对于claude.ai,您需要一个隧道(cloudflared或ngrok)来暴露SSE端点:
# Terminal 1: start exfetch with SSE
exfetch serve --mcp-sse 8080
# Terminal 2: expose via tunnel
cloudflared tunnel --url http://localhost:8080
# or
ngrok http 8080然后在claude.ai设置中将隧道URL配置为远程MCP服务器。
Chrome 扩展
- 打开
chrome://extensions/在Chrome浏览器中 - 启用“开发人员模式”
- 点击“加载解包”
- 选择
extension/chrome/目录 - 使用启动服务器
exfetch serve - 扩展将通过WebSocket自动连接
配置文件
exfetch从以下位置读取配置 ~/.config/exfetch/config.toml:
[defaults]
timeout = 15
user_agent = "exfetch/0.1"
search_engine = "duckduckgo" # or "searxng"
# searxng_url = "https://searx.be"
[policy]
blocked_domains = []
allow_cookie_read = false
max_requests_per_minute = 60
[tabs]
reuse_strategy = "exact"
open_in_background = trueCLAUDE.md集成
添加到您的项目 CLAUDE.md:
Use `exfetch ` to fetch web content. Use `exfetch search ` to search.许可证
麻省理工学院
