内容
<p align="center">
<img src="assets/logo.png" width="140" alt="深度研究 MCP Logo" />
</p>
<h1 align="center">深度研究 MCP 服务器</h1>
<p align="center"><b>专为真正的研究而设计的非通用 MCP。搜索 → 抓取 → 综合 → 事实核查 → 记忆。</b></p>
<p align="center">
<a href="https://github.com/SECRET4422/mcp-deep-research-server/actions"><img src="https://img.shields.io/github/actions/workflow/status/SECRET4422/mcp-deep-research-server/ci.yml?branch=main&label=CI&logo=github" alt="持续集成" /></a>
<a href="LICENSE"><img src="https://img.shields.io/github/license/SECRET4422/mcp-deep-research-server" alt="MIT 许可证" /></a>
<a href="package.json"><img src="https://img.shields.io/badge/TypeScript-5.6-blue?logo=typescript" alt="TypeScript" /></a>
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-Compatible-black?logo=anthropic" alt="MCP 兼容" /></a>
<a href="https://www.npmjs.com/package/mcp-deep-research-server"><img src="https://img.shields.io/badge/npm-1.1.0-red?logo=npm" alt="npm" /></a>
<img src="https://img.shields.io/badge/无需%20API%20密钥-green" alt="无需 API 密钥" />
</p>
---
### 为什么不通用?
| 通用 MCP(无聊) | 本 MCP(专业) |
|---|---|
| `echo`、`fetch` | **协调的深度研究** |
| 返回原始 HTML | **Cheerio + Turndown → 清洁的 Markdown** + 标题、链接、元数据 |
| 无记忆 | **持久记忆** 存储在 `~/.mcp-deep-research/` |
| 一次一个页面 | **并行 3 个工作线程抓取**,10 分钟缓存 |
| 无推理 | **事实核查与立场评分**,矛盾检测 |
### 架构
```mermaid
graph LR
A[用户:deep_research 主题] --> B[搜索网络 DDG HTML]
B --> C[并行抓取 x3-8]
C --> D[Cheerio 清洁 + Turndown Markdown]
D --> E[提取见解 启发式]
E --> F[综合报告 + 引文]
F --> G[记忆保存 + 历史]
F --> H[返回 Claude]
I[比较来源] --> C
J[事实核查主张] --> B
K[记忆搜索] --> G
```
### 工具(8)
| 工具 | 功能 | 参数 |
|------|--------------|--------|
| `search_web` | DuckDuckGo HTML 搜索,无 API 密钥,UDDG 解码 | `查询, 数量 1-10, 时间筛选` |
| `scrape_page` | 获取 + 主内容启发式 + Markdown | `网址, 格式=markdown|text|full, extractMainOnly` |
| `extract_insights` | 实体、统计正则表达式、关键点评分、阅读时间 | `内容, 目标?` |
| `deep_research` | **强大工具** — 搜索 → 并行抓取 → 综合报告 | `主题, 深度=快速|标准|深入, 最大来源, 保存记忆` |
| `compare_sources` | 2-5 个网址 → 共识 vs 独特 vs 矛盾 | `网址[], 焦点?` |
| `fact_check_claim` | 搜索支持 + `驳斥 OR 错误`,启发式裁决 | `主张, 搜索深度` |
| `memory_save` | 保存发现到 JSON,重启后仍存 | `键, 值, 标签[], 来源?` |
| `memory_search` | 持久记忆中的模糊搜索 | `查询, 标签[], 限制` |
**资源:**
- `research://memory` — 所有保存的发现
- `research://history` — 最近 100 次操作
- `research://stats` — 缓存大小、运行时间
**提示:**
- `deep-dive-research` — 完整的研究工作流
- `fact-check` — 事实核查团队
- `compare-narratives` — 偏见与比较表格
### 安装
```bash
git clone https://github.com/SECRET4422/mcp-deep-research-server.git
cd mcp-deep-research-server
npm install
npm run build
```
### 测试(烟雾测试)
```bash
npm run test:mcp
# 或
npm run inspect # 打开 http://localhost:6274
```
手动测试:
```
[搜索] 德拉敦 → 3 个结果 ✓
[深度研究] 什么是 MCP → 2.1 秒内 3 个来源 ✓
tools/list → 8 个工具 ✓
```
### 添加到 Claude Desktop
编辑配置:
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
- Linux: `~/.config/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"deep-research": {
"command": "node",
"args": ["/绝对路径/to/mcp-deep-research-server/build/index.js"]
}
}
}
```
重启 Claude Desktop。
### 添加到 Cursor / Windsurf / VS Code
`.cursor/mcp.json` 或 `mcp.json`:
```json
{
"mcpServers": {
"deep-research": {
"command": "node",
"args": ["./build/index.js"],
"cwd": "/路径/to/mcp-deep-research-server"
}
}
}
```
### 示例提示
**深度研究:**
> 使用 deep_research 研究“2026 年最佳 LLM 微调,深度深入”,然后比较 LoRA 与 QLoRA
**事实核查:**
> 使用 fact_check_claim 核实主张:“Bun 比 Node 快”
**比较:**
> 比较这 3 个关于 MCP 架构的网址,关注安全性:
> https://modelcontextprotocol.io/docs/getting-started/intro
> https://www.anthropic.com/news/model-context-protocol
> https://en.wikipedia.org/wiki/Model_Context_Protocol
参见 `examples/claude-example.md` 获取更多信息。
### 数据存储
所有数据存储在 `~/.mcp-deep-research/`:
- `memory.json` — 持久发现
- `history.json` — 审计日志(最多 100 条)
- `cache/` — 保留
无数据库,无外部调用,除搜索/抓取外。
### v1.1.0 中的专业功能
- ✅ Logo + 专业 README + 徽章
- ✅ GitHub Actions CI(Node 18/20/22)+ 发布工作流
- ✅ 问题模板,PR 模板,CONTRIBUTING,SECURITY
- ✅ `.editorconfig`,烟雾测试脚本
- ✅ 优化的 `package.json` 以发布到 npm
- ✅ CHANGELOG 跟踪
### 路线图
- [ ] Tavily / Brave API 备用,如果存在密钥
- [ ] 通过 `pdf-parse` 解析 PDF
- [ ] YouTube 转录工具
- [ ] 内存向量搜索(嵌入)
- [ ] SSRF 阻止列表(169.254.169.254 等)
- [ ] Smithery 注册表
### 开发
```bash
npm run dev # tsx 监视
npm run build
npm run lint
```
`CONTRIBUTING.md` 中有指南。
### 许可证
MIT © SECRET4422 — 参见 LICENSE
> 为德拉敦 → 世界而构建。不是通用 MCP。