io.github.docfork/docfork

编码与调试

by docfork

为 AI Agents 提供最新、持续更新的文档访问能力,便于查询和使用技术资料。

让 AI Agent 随时查到最新技术文档,减少过时资料带来的误判,持续更新能力尤其适合高频开发与调试场景。

什么是 io.github.docfork/docfork

为 AI Agents 提供最新、持续更新的文档访问能力,便于查询和使用技术资料。

README

<p align="center"> <a href="https://docfork.com"> <picture> <source srcset="logo_light.png" media="(prefers-color-scheme: dark)"> <source srcset="logo_dark.png" media="(prefers-color-scheme: light)"> <img src="logo_dark.png" alt="Docfork" height="40" /> </picture> </a> </p> <p align="center">Context for AI Coding Agents.</p> <p align="center"> <a href="https://docfork.com"><img alt="Website" src="https://img.shields.io/badge/Website-docfork.com-blue?style=flat-square" /></a>&nbsp;&nbsp;<a href="https://www.npmjs.com/package/docfork"><img alt="npm" src="https://img.shields.io/npm/v/docfork?style=flat-square&color=red" /></a>&nbsp;&nbsp;<a href="https://www.npmjs.com/package/docfork"><img alt="npm downloads" src="https://img.shields.io/npm/dm/docfork?style=flat-square" /></a>&nbsp;&nbsp;<a href="https://github.com/docfork/docfork"><img alt="GitHub stars" src="https://img.shields.io/github/stars/docfork/docfork?style=flat-square" /></a> </p> <p align="center"> <img src="demo.gif" alt="Docfork demo" /> </p>

AI agents hallucinate APIs, bloat context with stale docs, and write code against outdated signatures. Docfork serves up-to-date documentation directly in Cursor, Claude Code, and Windsurf.

Without Docfork

diff
  app.use('/api/*', jwt({ secret: ... }))
-                       ^^^ removed in Hono v4

With Docfork

diff
  app.use('/api/*', bearerAuth({ verifyToken: ... }))
+                       ^^^ current API, Hono v4.2

Get Started

bash
npx dgrep setup --cursor

Installs the Docfork MCP server in your IDE. Detects your dependencies, provisions an API key, and writes the config file. Also supports --claude and --opencode.

Your agent now has two tools:

ToolReturns
search_docsRanked documentation sections with titles, URLs, and relevance scores.
fetch_docFull rendered markdown content from a documentation URL.

No prompt suffix needed:

code
Set up server-side rendering with Next.js App Router.

Or search from the terminal:

bash
dgrep search "middleware redirect based on authentication" -l vercel/next.js
dgrep search "server actions with forms" -l vercel/next.js

Quickstart → · dgrep docs → · CLI reference →

Your own docs

Index any public or private GitHub repository as a custom library. Your internal APIs, SDKs, and runbooks become searchable by your agents — same pipeline as public libraries. GitHub integration setup →

Teams

Free: 1,000 requests/month per organization. For team rollout, commit the MCP config to your repo:

json
// .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"
      }
    }
  }
}

Share API keys and Cabinets across your organization. Docfork doesn't store your code or prompts. Security → · Pricing →

MCP Setup

[!TIP] Run npx dgrep setup --cursor (or --claude, --opencode) to install automatically. Manual config below for other clients.

Cursor<a href="https://cursor.com/en/install-mcp?name=docfork&config=eyJ1cmwiOiJodHRwczovL21jcC5kb2Nmb3JrLmNvbS9tY3AifQ%3D%3D"><img src="https://cursor.com/deeplink/mcp-install-dark.svg" height="20" alt="Add to Cursor"/></a>

json
{
  "mcpServers": {
    "docfork": {
      "url": "https://mcp.docfork.com/mcp",
      "headers": {
        "DOCFORK_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Claude Code

bash
claude mcp add --transport http docfork https://mcp.docfork.com/mcp/oauth

OpenCode

jsonc
{
  "mcp": {
    "docfork": {
      "type": "remote",
      "url": "https://mcp.docfork.com/mcp",
      "headers": { "DOCFORK_API_KEY": "YOUR_API_KEY" },
      "enabled": true,
    },
  },
}

Don't see your client? Setup guides for all 29 supported clients →

OAuth Authentication

Docfork supports MCP OAuth specs. Change your endpoint to use OAuth:

diff
- "url": "https://mcp.docfork.com/mcp"
+ "url": "https://mcp.docfork.com/mcp/oauth"

Note: OAuth is for remote HTTP connections only. View full OAuth guide →

Agent Rule

Add a rule so your agent calls Docfork MCP automatically. Full rule and IDE-specific setup →

[!NOTE] Add Rule to Cursor (One-Click)

Claude Code — add to your CLAUDE.md:

markdown
## 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.
<details> <summary>Full rule (all clients)</summary>
markdown
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.
</details>

FAQ

How is Docfork different from Context7? Both provide MCP servers and CLIs for searching library documentation. Here are the key differences:

  • Stack scoping. dgrep init reads your package.json and scopes all searches to your declared dependencies. Cabinets let you version-pin those libraries across a team.
  • Resolve once, search many. dgrep init resolves package names to canonical identifiers once and caches the mapping in .dgrep/config.json. No per-query resolution step.
  • Hybrid search. Semantic search and BM25 run in parallel, fused via Reciprocal Rank Fusion. AST-aware chunking preserves function boundaries.

Does Docfork store my code or prompts? Your code and prompts never leave your machine. At search time, only the query and library name are sent to Docfork — queries are not stored. Indexed documentation content lives in an upstream vector store; private library content is end-to-end encrypted and deleted atomically when you remove the library. Security →

What libraries are supported? Docfork maintains a curated catalog of popular frameworks. Add any public or private GitHub repository as a custom library. Add custom libraries →

Docs

Community

Star History

Star History Chart

License

MIT

常见问题

io.github.docfork/docfork 是什么?

为 AI Agents 提供最新、持续更新的文档访问能力,便于查询和使用技术资料。

相关 Skills

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描137.2k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描137.2k

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描137.2k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
85.9k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
55.6k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
47.1k

评论