Skip to main content
Glama

intercept-mcp

赋予你的 AI 阅读网页的能力。一条命令,无需 API 密钥。

如果没有它,你的 AI 访问 URL 时可能会遇到 403 错误、访问墙或一堆原始 HTML。有了 intercept,它几乎总能获取到内容——整洁的 Markdown,随时可用。

支持推文、YouTube 视频(可用时提供字幕)、arXiv 论文、PDF、维基百科文章和 GitHub 仓库。如果第一种策略失败,它会尝试多达 14 种后续策略,直到成功或放弃。

适用于任何 MCP 客户端:Claude Code、Claude Desktop、Codex、Cursor、Windsurf、Cline 等。

安装

Claude Code

claude mcp add intercept -s user -- npx -y intercept-mcp

Codex

codex mcp add intercept -- npx -y intercept-mcp

Cursor

设置 → MCP → 添加服务器:

{
  "mcpServers": {
    "intercept": {
      "command": "npx",
      "args": ["-y", "intercept-mcp"]
    }
  }
}

Windsurf

设置 → MCP → 添加服务器 → 使用与上述相同的 JSON 配置。

Claude Desktop

添加到你的 claude_desktop_config.json

{
  "mcpServers": {
    "intercept": {
      "command": "npx",
      "args": ["-y", "intercept-mcp"]
    }
  }
}

其他 MCP 客户端

任何支持 stdio MCP 服务器的客户端都可以运行 npx -y intercept-mcp

fetch 工具不需要 API 密钥。

Related MCP server: urltomarkdown-mcp

工作原理

URL 处理分为四个阶段:

1. 站点特定处理器

已知的 URL 模式在进入回退流水线之前会路由到专用处理器:

模式

处理器

你将获得

twitter.com/*/status/*, x.com/*/status/*

Twitter/X

推文文本、作者、媒体、互动数据(通过第三方 API)

youtube.com/watch?v=*, youtu.be/*

YouTube

标题、频道、时长、观看次数、描述、字幕(当有字幕可用时)

arxiv.org/abs/*, arxiv.org/pdf/*

arXiv

论文元数据、作者、摘要、分类

*.pdf

PDF

提取的文本(仅限文本层 PDF)

*.wikipedia.org/wiki/*

维基百科

通过 Wikimedia REST API 获取的整洁文章内容

github.com/{owner}/{repo}

GitHub

原始 README.md 内容

2. 共享缓存 (agentsweb.org)

在访问任何抓取器之前,每个请求都会检查 agentsweb.org —— 一个面向 AI 代理的全球共享 Markdown 缓存。如果其他代理已经获取过此 URL,你将在 50 毫秒内获得结果。

每次成功的获取都会自动回馈到缓存中。条目通过自我修复的共识模型获得信任:当独立实例获取相同的 URL 并确认相同的内容时,置信度会增加。

你可以通过 INTERCEPT_SHARED_CACHE=false 完全禁用,或使用 INTERCEPT_CACHE_READ_ONLY=true 开启只读模式(仅消费,不贡献)。

agentsweb.org API

agentsweb.org 还提供独立的端点供直接使用:

  • /web?q= — 搜索网页

  • /research?q= — 一次调用完成搜索 + 获取 + 缓存

  • /fetch?url= — 按需获取,自动缓存

查看 agentsweb.org/docs 获取完整的 API 文档。

3. 回退流水线

如果没有匹配的处理器(或处理器未返回内容),URL 将进入多层流水线:

层级

抓取器

策略

0

agentsweb.org

全球共享 Markdown 缓存 — 如果其他代理已获取过,则瞬间返回

1

Cloudflare Browser Run

JS 渲染 + Markdown 提取(可选,需要 API 令牌)

1

Jina Reader

整洁的 Markdown 提取服务

2

Wayback Machine

来自 archive.org 的存档版本

2

archive.ph

通过 timemap API + 隐身 TLS 获取的存档快照

2

Google Cache

Google 的网页缓存版本

2

Arquivo.pt

葡萄牙网络存档(广泛的国际覆盖)

2

Codetabs

CORS 代理

3

原始获取

使用浏览器标头的直接 GET + Turndown Markdown 转换

3

隐身获取

通过 got-scraping 进行浏览器 TLS 指纹模拟(可选,见下文)

4

RSS, CrossRef, Semantic Scholar, HN, Reddit

元数据 / 讨论回退

5

OG Meta

Open Graph 标签(保证回退)

第 2 层抓取器并行运行。当多个成功时,质量最高的结果胜出。所有其他层级按顺序运行。

所有抓取器都通过 Turndown 返回正确的 Markdown(标题、链接、粗体、表格、代码块),而不是纯文本。

4. 缓存

结果在内存中缓存,并带有 TTL(成功为 30 分钟,失败为 5 分钟)。最多 100 个条目,采用 LRU 淘汰策略。失败的 URL 也会被缓存,以防止重复尝试已知的死链。

工具

fetch

获取 URL 并将其内容作为整洁的 Markdown 返回。

  • url (字符串,必填) — 要获取的 URL

  • maxTier (数字,可选,1-5) — 在此层级停止,适用于对速度敏感的情况

搜索网页并返回结果。

  • query (字符串,必填) — 搜索查询

  • count (数字,可选,1-20,默认 5) — 结果数量

如果设置了 BRAVE_API_KEY,则使用 Brave Search API;如果设置了 SEARXNG_URL,则使用 SearXNG;最后作为不可靠的后备方案使用 DuckDuckGo。

提示词

research-topic

搜索主题并获取前几条结果,以进行多源总结。

  • topic (字符串) — 要研究的主题

  • depth (字符串,默认 "3") — 要获取的前几条结果的数量

extract-article

获取 URL 并从内容中提取关键点。

  • url (字符串) — 要获取并总结的 URL

环境变量

变量

必填

描述

BRAVE_API_KEY

Brave Search API 搜索密钥

SEARXNG_URL

自托管 SearXNG 实例 URL(推荐)

CF_API_TOKEN

具有 "Browser Rendering - Edit" 权限的 Cloudflare API 令牌

CF_ACCOUNT_ID

Cloudflare 账户 ID(如果设置了 CF_API_TOKEN 则必填)

USE_STEALTH_FETCH

设置为 true 以启用隐身抓取器(见下文警告)

INTERCEPT_SHARED_CACHE

设置为 false 以禁用 agentsweb.org 共享缓存

INTERCEPT_CACHE_READ_ONLY

设置为 true 以仅消费而不向共享缓存贡献

INTERCEPT_CACHE_TTL_MS

成功获取的内存缓存 TTL(毫秒,默认 3600000 = 60 分钟)

INTERCEPT_CACHE_FAILURE_TTL_MS

失败获取的内存缓存 TTL(毫秒,默认 300000 = 5 分钟)

INTERCEPT_CACHE_SIZE

最大内存缓存条目数(默认 250

HTTPS_PROXY / HTTP_PROXY

标准代理透传 — 将所有出站获取(包括隐身)路由通过代理。遵循 NO_PROXY

搜索: 有一个 DuckDuckGo 后备方案,但它受到速率限制且不可靠。对于生产环境,请自托管 SearXNG 并设置 SEARXNG_URL(见下文),或获取 Brave Search API 密钥

获取: 无需任何密钥即可工作。设置 CF_API_TOKEN + CF_ACCOUNT_ID 以启用 Cloudflare Browser Run(原 Browser Rendering),用于 JavaScript 密集型页面(SPA、React 站点)。

隐身获取 (USE_STEALTH_FETCH)

风险自担。 启用后,它会添加一个抓取器,使用 got-scraping 模拟真实的浏览器 TLS 指纹(Chrome/Firefox 密码套件、HTTP/2 设置、标头顺序)。这可以绕过在其他情况下会阻止自动化请求的站点的机器人检测和 CAPTCHA 触发器。

此抓取器在常规原始获取之后的第 3 层运行。如果原始获取被阻止(CAPTCHA、Cloudflare 挑战、403),隐身抓取器会通过浏览器模拟重试。

这可能违反某些网站的服务条款。 intercept-mcp 的作者不对该功能的使用方式承担任何责任。它默认禁用,必须显式启用。

使用自己的代理 (HTTPS_PROXY)

如果原始获取开始被标记,最有效的修复方法通常是一个干净的出站 IP — 而不是更花哨的指纹。intercept-mcp 遵循标准的 HTTPS_PROXY / HTTP_PROXY / NO_PROXY 环境变量,因此你可以通过你已有的任何代理路由所有出站流量:

HTTPS_PROXY=http://user:pass@proxy.example.com:8080 npx intercept-mcp

这适用于任何 HTTP(S) 代理 — 自托管的 Squid、Tailscale 出口节点、运行 3proxy 的 5 美元 VPS,或商业住宅代理(Bright Data、Oxylabs 等)。隐身抓取器和 got-scraping 调用也会自动获取此设置。

自托管 SearXNG

为了实现可靠的搜索,请使用 Docker 自托管 SearXNG。配置包含在 仓库 中:

git clone https://github.com/bighippoman/intercept-mcp.git
cd intercept-mcp/searxng && docker compose up -d

然后设置 SEARXNG_URL=http://localhost:8888。无速率限制,无 CAPTCHA,聚合 Google + Bing + DuckDuckGo + Wikipedia + Brave。

或者使用任何现有的 SearXNG 实例 — 只需将 SEARXNG_URL 设置为其 URL 即可。

URL 规范化

传入的 URL 会自动清理:

  • 去除 60 多个跟踪参数(UTM、点击 ID、分析、A/B 测试等)

  • 移除哈希片段

  • 升级到 HTTPS

  • 清理 AMP 工件

  • 保留功能性参数(ref, format, page, offset, limit

内容质量检测

每个抓取器的结果都会进行质量评分。以下情况自动失败:

  • CAPTCHA / Cloudflare 挑战

  • 登录墙

  • 正文中的 HTTP 错误页面

  • 内容少于 200 个字符

要求

  • Node.js >= 18

  • 基本使用无需 API 密钥

Available Tools

2 tools
fetchFetch URLA

Fetch a URL and return its content as clean markdown. Handles Twitter/X tweets, YouTube videos, arXiv papers, and PDFs directly. Falls back to a multi-tier chain: Jina Reader, Wayback Machine, raw fetch, RSS, CrossRef, Semantic Scholar, HackerNews, Reddit, OG meta. Results are cached for the session.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to fetch
maxTierNoStop at this tier (1-5, default 5). Lower = faster but fewer fallbacks.

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully describes the multi-tier fallback behavior, special handling for certain content types, and session caching. It lacks mention of authentication, rate limits, or error handling, but still provides good transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (approximately 100 words) and front-loaded with the main purpose. Each sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core functionality, special cases, fallback chain, and caching. It does not detail error behavior or output format beyond 'clean markdown', but for a fetch tool this is reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds meaning by explaining the tier fallback system, which gives context to the maxTier parameter. The description complements the schema well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it fetches a URL and returns content as clean markdown, with specific handling for Twitter, YouTube, arXiv, and PDFs. It distinguishes from sibling tool 'search' by focusing on fetching a specific URL rather than searching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly guides usage by explaining the fallback chain and caching, but does not explicitly state when to use this vs. search or when not to use it. Given the sibling is 'search', the context is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.2
    • Addedfetch
    • Addedsearch

TDQS

A4.1/5.0
Disambiguation5/5

fetch and search have clearly distinct purposes: one retrieves content from a specific URL, the other performs web searches. No overlap or ambiguity.

Naming Consistency5/5

Both tool names are single-word verbs ('fetch', 'search'), following a simple and consistent pattern.

Tool Count4/5

With only 2 tools, the server is minimal but appropriate for its focused scope of fetching and searching. Could potentially benefit from a few more, but not necessary.

Completeness4/5

The tool surface covers the core operations of fetching content from URLs and searching the web. No obvious missing operations for the stated purpose.

Maintenance

ActivitySlowing
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bighippoman/intercept-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server