docfork

docfork

Built by docfork โ€ข 441 stars

What is docfork?

Docfork - Up-to-date Docs for AI Agents.

How to use docfork?

1. Install a compatible MCP client (like Claude Desktop). 2. Open your configuration settings. 3. Add docfork using the following command: npx @modelcontextprotocol/docfork 4. Restart the client and verify the new tools are active.
๐Ÿ›ก๏ธ Scoped (Restricted)
npx @modelcontextprotocol/docfork --scope restricted
๐Ÿ”“ Unrestricted Access
npx @modelcontextprotocol/docfork

Key Features

Native MCP Protocol Support
Real-time Tool Activation & Execution
Verified High-performance Implementation
Secure Resource & Context Handling

Optimized Use Cases

Extending AI models with custom local capabilities
Automating system workflows via natural language
Connecting external data sources to LLM context windows

docfork FAQ

Q

Is docfork safe?

Yes, docfork follows the standardized Model Context Protocol security patterns and only executes tools with explicit user-granted permissions.

Q

Is docfork up to date?

docfork is currently active in the registry with 441 stars on GitHub, indicating its reliability and community support.

Q

Are there any limits for docfork?

Usage limits depend on the specific implementation of the MCP server and your system resources. Refer to the official documentation below for technical details.

Official Documentation

View on GitHub
<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

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

With Docfork

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

Get Started

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:

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

Or search from the terminal:

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:

// .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>

{
  "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/oauth

OpenCode

{
  "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:

- "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:

## 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>
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

Global Ranking

-
Trust ScoreMCPHub Index

Based on codebase health & activity.

Manual Config

{ "mcpServers": { "docfork": { "command": "npx", "args": ["docfork"] } } }