Docfork
OfficialAI 代理会产生 API 幻觉,用过时的文档占用上下文,并根据过时的签名编写代码。Docfork 直接在 Cursor、Claude Code 和 Windsurf 中提供最新的文档。
没有 Docfork
app.use('/api/*', jwt({ secret: ... }))
- ^^^ removed in Hono v4使用 Docfork
app.use('/api/*', bearerAuth({ verifyToken: ... }))
+ ^^^ current API, Hono v4.2入门指南
npx dgrep setup --cursor在您的 IDE 中安装 Docfork MCP 服务器。它会自动检测您的依赖项、配置 API 密钥并写入配置文件。同时也支持 --claude 和 --opencode。
您的代理现在拥有两个工具:
工具 | 返回内容 |
| 带有标题、URL 和相关性评分的排名文档部分。 |
| 来自文档 URL 的完整渲染 Markdown 内容。 |
无需提示词后缀:
Set up server-side rendering with Next.js App Router.或者从终端搜索:
dgrep search "middleware redirect based on authentication" -l vercel/next.js
dgrep search "server actions with forms" -l vercel/next.js快速入门 → · dgrep 文档 → · CLI 参考 →
您自己的文档
将任何公共或私有的 GitHub 仓库索引为自定义库。您的内部 API、SDK 和运行手册将变得可供您的代理搜索 —— 与公共库使用相同的流水线。GitHub 集成设置 →
Related MCP server: RAG Documentation MCP Server
团队
免费版:每个组织每月 1,000 次请求。对于团队推广,请将 MCP 配置提交到您的仓库:
// .cursor/mcp.json (committed to git, picked up by every engineer)
{
"mcpServers": {
"docfork": {
"url": "https://mcp.docfork.com/mcp",
"headers": {
"DOCFORK_API_KEY": "YOUR_TEAM_API_KEY"
}
}
}
}在您的组织内共享 API 密钥和机柜 (Cabinets)。Docfork 不会存储您的代码或提示词。安全性 → · 定价 →
MCP 设置
运行npx dgrep setup --cursor(或 --claude、--opencode)进行自动安装。其他客户端的手动配置如下。
Cursor —
{
"mcpServers": {
"docfork": {
"url": "https://mcp.docfork.com/mcp",
"headers": {
"DOCFORK_API_KEY": "YOUR_API_KEY"
}
}
}
}Claude Code
claude mcp add --transport http docfork https://mcp.docfork.com/mcp/oauthOpenCode
{
"mcp": {
"docfork": {
"type": "remote",
"url": "https://mcp.docfork.com/mcp",
"headers": { "DOCFORK_API_KEY": "YOUR_API_KEY" },
"enabled": true,
},
},
}没看到您的客户端?查看所有 29 个受支持客户端的设置指南 →
OAuth 身份验证
Docfork 支持 MCP OAuth 规范。更改您的端点以使用 OAuth:
- "url": "https://mcp.docfork.com/mcp"
+ "url": "https://mcp.docfork.com/mcp/oauth"注意:OAuth 仅适用于远程 HTTP 连接。查看完整的 OAuth 指南 →
代理规则
添加一条规则,以便您的代理自动调用 Docfork MCP。完整规则和 IDE 特定设置 →
Claude Code — 添加到您的 CLAUDE.md:
## Docfork policy
Use Docfork MCP `search_docs` and `fetch_doc` tools for library/API docs, setup, and configuration questions.
- Start `library` with a short name or keyword (e.g., `nextjs`, `zod`). Use the `owner/repo` from the result URL for follow-up calls, never guess it upfront.
- After finding a relevant result, call `fetch_doc` to get the full content. Search results are summaries only.
- Prefer Docfork results over training data when they conflict.When writing or debugging code that involves third-party libraries, frameworks, or APIs, use Docfork MCP `search_docs` and `fetch_doc` tools rather than relying on training data.
**Two defaults to follow every time:**
- Start `library` with a short name or keyword (e.g., `nextjs`, `zod`). Use the `owner/repo` from the result URL for follow-up calls, never guess it upfront.
- After finding a relevant result, call `fetch_doc` to get the full content. Search results are summaries only.
Skip Docfork when:
- Language built-ins, general algorithms, syntax stable across versions
- Code or docs the user has already provided in context
When uncertain, default to using Docfork.常见问题解答
Docfork 与 Context7 有什么不同? 两者都提供用于搜索库文档的 MCP 服务器和 CLI。主要区别如下:
堆栈范围界定。
dgrep init会读取您的package.json并将所有搜索范围限定为您声明的依赖项。机柜 (Cabinets) 允许您在整个团队中锁定这些库的版本。一次解析,多次搜索。
dgrep init将包名称解析为规范标识符一次,并将映射缓存到.dgrep/config.json中。无需每条查询都进行解析步骤。混合搜索。 语义搜索和 BM25 并行运行,通过倒数排名融合 (Reciprocal Rank Fusion) 进行合并。感知 AST 的分块技术保留了函数边界。
Docfork 会存储我的代码或提示词吗? 您的代码和提示词永远不会离开您的机器。在搜索时,只有查询内容和库名称会被发送到 Docfork —— 查询内容不会被存储。索引的文档内容位于上游向量存储中;私有库内容是端到端加密的,并在您删除库时自动删除。安全性 →
支持哪些库? Docfork 维护着一个精选的流行框架目录。您可以添加任何公共或私有的 GitHub 仓库作为自定义库。添加自定义库 →
文档
社区
Star 历史
许可证
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
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/docfork/docfork-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server