web-research-mcp
A version-aware cache for web research that stores and serves documentation references, preventing models from re-researching the same topics across sessions.
README
web-research-mcp
An MCP server that keeps a persistent, version-aware cache of web research so the host model (Claude, Codex, …) writes modern, non-deprecated code without re-researching the same docs every session.
The server never browses the web itself — the host does the searching when the user asks. This server only stores what was found, answers "do we already have this? is it current?" cheaply, and serves the cached reference back.
Install
One line — no clone needed:
curl -LsSf https://raw.githubusercontent.com/jcsoftdev/web-research-mcp/main/install.sh | bash
Or from a checkout:
./install.sh
Interactive: installs uv if missing, installs the web-research-mcp binary, then
asks which hosts to register into (Claude Code, Codex, Gemini, Claude Desktop,
Cursor) and wires each one up. The DB autocreates on first use.
Manual registration
# Claude Code
claude mcp add web-research -s user -- web-research-mcp
# Codex
codex mcp add web-research -- web-research-mcp
Other hosts (JSON config):
{
"mcpServers": {
"web-research": { "command": "web-research-mcp", "args": [] }
}
}
Tools
| Tool | Cost | Behavior |
|---|---|---|
list_tree(tech?) |
minimal | Hierarchy tech → version → topics (names + is_latest/stale flags, no content). |
check_reference(tech, topic, version?) |
low | {status_tag, stale, exists, slug, is_latest, resolved_version}. No content. Omit version → latest. |
get_reference(slug, section?) |
med-high | Full markdown doc; optional section returns one heading block. |
search_reference(query, tech?) |
med | FTS5 over topic + summary + content + tags. |
save_research(...) |
write | Stores a doc; atomically supersedes older versions (PEP 440 compare). |
invalidate_reference(slug) |
write | Forces a reference stale. |
Freshness is a structured field (status_tag, stale) placed first in every
response, and a stale entry carries an explicit advice field — the model can't
overlook deprecation buried in prose. A cache miss is a flat {"exists": false}.
Dedup gate
save_research guards against forking the same concept under different topic
names (server-components vs servercomponents). Before inserting it looks for
similar existing topics for that tech and, if any, returns them in a
possible_duplicates field so the host reuses an existing slug instead of
creating a duplicate. It is advisory, non-blocking. Matching is lexical today
(near-spellings, spacing, truncated abbreviations); synonyms and non-truncation
abbreviations (rsc vs server-components) need embeddings, which swap in at the
same call site via EmbeddingProvider when EMBEDDINGS_ENABLED=1.
Enforcement hook (optional)
The MCP instructions only ask the model to call check_reference before
writing code — nothing enforces it. The installer can wire a host pre-edit
hook that turns the ask into a guarantee: if you are about to edit code for a
cached tech and the current session never consulted its reference, the edit is
denied until you do.
web-research-mcp hook --host {claude|codex|gemini|cursor}
The hook reads the host's pre-edit event on stdin, detects tracked techs in the
edit via strong signals only (real JS/TS imports or package.json dependency
keys — never prose), and checks the session transcript for a prior
check_reference / get_reference call. Detection is conservative by design: a
false deny blocks a legitimate edit.
Install is opt-in (default no) because a deny is disruptive. Support:
| host | event | status |
|---|---|---|
| Claude Code | PreToolUse matcher Edit|Write, deny via exit 2 |
verified |
| Codex | PreToolUse (Bash-scoped — misses apply_patch edits) |
experimental |
| Gemini CLI | BeforeTool |
experimental (schema unverified) |
| Cursor | beforeShellExecution + beforeMCPExecution (no pre-edit block) |
experimental |
The hook fails open: any parse error, unknown host, or unreadable DB allows the edit — a bug in the gate must never wedge your editor.
Config (env vars)
| var | default | purpose |
|---|---|---|
WEB_RESEARCH_DB_PATH |
~/.web-research-mcp/research.db |
DB location (global — reused across projects) |
DEFAULT_TTL_DAYS |
30 |
TTL for non-version-locked entries |
EMBEDDINGS_ENABLED |
0 |
vector search (post-MVP) |
WEB_RESEARCH_AUTO_UPDATE |
1 |
advertise updates so the host auto-delegates them; set 0 to disable |
Auto-update
The server never installs anything itself. It exposes a check_for_update tool
and, via its MCP instructions, asks the host to delegate a background agent to
run the update when a newer version exists on GitHub — so the update never blocks
you and takes effect on the next launch. The host does the work; the server only
detects and advises.
With WEB_RESEARCH_AUTO_UPDATE=0 the tool still exists but the instructions no
longer ask the host to auto-delegate — call check_for_update yourself when you
want it.
Develop
uv sync
uv run pytest
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。