README Documentation
Docfork MCP: 🌿 @latest Docs to 9000+ Code Libraries in a Single Tool Call
❌ The Problem: Expired Knowledge
- Out of date code examples & stale data from year-old model training
- Hallucinated syntax & APIs
- Old or mismatched versions
✅ The Solution: @latest docs at warp speed
- Always in sync with the latest version of docs
- Accurate descriptions and code examples
- Sub-second retrieval results (500ms @ p95) in your AI code editor
Docfork MCP pulls @latest documentation and code examples straight from the source - and adds them right into your context.
Just tell Cursor to use docfork
:
Create a basic Next.js app with the App Router. use docfork
🛠️ Installation
📋 Requirements
- Node.js ≥ v18
- Cursor/Windsurf/Claude Desktop (any MCP client)
Installing via Smithery
Installing via Smithery
To install Docfork MCP Server for any client automatically via Smithery:
npx -y @smithery/cli@latest install @docfork/mcp --client <CLIENT_NAME> --key <YOUR_SMITHERY_KEY>
You can find your Smithery key in the Smithery.ai webpage.
Install in Cursor
Go to: Settings
-> Cursor Settings
-> Tools & Integrations
-> Add a custom MCP server
Pasting the following config into your Cursor ~/.cursor/mcp.json
file is the recommended approach. You can also install in a specific project by creating .cursor/mcp.json
in your project folder. See Cursor MCP docs for more info.
Cursor Remote Server Connection
{
"mcpServers": {
"docfork": {
"url": "https://mcp.docfork.com/mcp"
}
}
}
Cursor Local Server Connection
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
Alternative: Use Bun
{
"mcpServers": {
"docfork": {
"command": "bunx",
"args": ["-y", "docfork"]
}
}
}
Alternative: Use Deno
{
"mcpServers": {
"docfork": {
"command": "deno",
"args": ["run", "--allow-env", "--allow-net", "npm:docfork"]
}
}
}
Install in Claude Code
Install in Claude Code
Run this command. See Claude Code MCP docs for more info.
Claude Code Remote Server Connection
claude mcp add --transport sse docfork https://mcp.docfork.com/sse
Claude Code Local Server Connection
claude mcp add docfork -- npx -y docfork
Install in Claude Desktop
Install in Claude Desktop
Add this to your Claude Desktop claude_desktop_config.json
file. See Claude Desktop MCP docs for more info.
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
Install in Windsurf
Install in Windsurf
Add this to your Windsurf MCP config. See Windsurf MCP docs for more info.
Windsurf Remote Server Connection
{
"mcpServers": {
"docfork": {
"serverUrl": "https://mcp.docfork.com/sse"
}
}
}
Windsurf Local Server Connection
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
Install in VS Code
Install in VS Code
Add this to your VS Code MCP config. See VS Code MCP docs for more info.
VS Code Remote Server Connection
{
"mcpServers": {
"docfork": {
"type": "http",
"url": "https://mcp.docfork.com/mcp"
}
}
}
VS Code Local Server Connection
{
"servers": {
"docfork": {
"type": "stdio",
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
Install in Zed
Install in Zed
One-click install: → Get the Docfork Extension
Or Manual config (for power users):
{
"context_servers": {
"docfork": {
"command": {
"path": "npx",
"args": ["-y", "docfork"]
},
"settings": {}
}
}
}
Install in BoltAI
Install in BoltAI
Open the "Settings" page of the app, navigate to "Plugins," and enter the following JSON:
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
More info is available on BoltAI's Documentation site. For BoltAI on iOS, see this guide.
Using Docker
Using Docker
If you prefer to run the MCP server in a Docker container:
-
Build the Docker Image:
First, create a
Dockerfile
in the project root (or anywhere you prefer):Click to see Dockerfile content
FROM node:18-alpine WORKDIR /app # Install the latest version globally RUN npm install -g docfork # Expose default port if needed (optional, depends on MCP client interaction) # EXPOSE 3000 # Default command to run the server CMD ["docfork"]
Then, build the image using a tag (e.g.,
docfork-mcp
). Make sure Docker Desktop (or the Docker daemon) is running. Run the following command in the same directory where you saved theDockerfile
:docker build -t docfork .
-
Configure Your MCP Client:
Update your MCP client's configuration to use the Docker command.
Example for a cline_mcp_settings.json:
{ "mcpServers": { "docfork": { "autoApprove": [], "disabled": false, "timeout": 60, "command": "docker", "args": ["run", "-i", "--rm", "docfork-mcp"], "transportType": "stdio" } } }
Note: This is an example configuration. Please refer to the specific examples for your MCP client (like Cursor, VS Code, etc.) earlier in this README to adapt the structure (e.g.,
mcpServers
vsservers
). Also, ensure the image name inargs
matches the tag used during thedocker build
command.
Install in Windows
Install in Windows
The configuration on Windows is slightly different compared to Linux or macOS (Cline
is used in the example). The same principle applies to other editors; refer to the configuration of command
and args
.
{
"mcpServers": {
"github.com/docfork/mcp": {
"command": "cmd",
"args": ["/c", "npx", "-y", "docfork@latest"],
"disabled": false,
"autoApprove": []
}
}
}
Install in Augment Code
Install in Augment Code
To configure Docfork MCP in Augment Code, follow these steps:
- Press Cmd/Ctrl Shift P or go to the hamburger menu in the Augment panel
- Select Edit Settings
- Under Advanced, click Edit in settings.json
- Add the server configuration to the
mcpServers
array in theaugment.advanced
object
"augment.advanced": {
"mcpServers": [
{
"name": "docfork",
"command": "npx",
"args": ["-y", "docfork"]
}
]
}
Once the MCP server is added, restart your editor. If you receive any errors, check the syntax to make sure closing brackets or commas are not missing.
Install in Roo Code
Install in Roo Code
Add this to your Roo Code MCP configuration file. See Roo Code MCP docs for more info.
Roo Code Remote Server Connection
{
"mcpServers": {
"docfork": {
"type": "streamable-http",
"url": "https://mcp.docfork.com/mcp"
}
}
}
Roo Code Local Server Connection
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
Install in Trae
Use the Add manually feature and fill in the JSON configuration information for that MCP server. For more details, visit the Trae documentation.
Trae Remote Server Connection
{
"mcpServers": {
"docfork": {
"url": "https://mcp.docfork.com/mcp"
}
}
}
Trae Local Server Connection
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
Install in Visual Studio 2022
You can configure Docfork MCP in Visual Studio 2022 by following the Visual Studio MCP Servers documentation.
Add this to your Visual Studio MCP config file (see the Visual Studio docs for details):
{
"mcp": {
"servers": {
"docfork": {
"type": "http",
"url": "https://mcp.docfork.com/mcp"
}
}
}
}
Or, for a local server:
{
"mcp": {
"servers": {
"docfork": {
"type": "stdio",
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
}
For more information and troubleshooting, refer to the Visual Studio MCP Servers documentation.
Install in Gemini CLI
See Gemini CLI Configuration for details.
- Open the Gemini CLI settings file. The location is
~/.gemini/settings.json
(where~
is your home directory). - Add the following to the
mcpServers
object in yoursettings.json
file:
{
"mcpServers": {
"docfork": {
"httpUrl": "https://mcp.docfork.com/mcp"
}
}
}
Or, for a local server:
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
If the mcpServers
object does not exist, create it.
Install in Crush
Add this to your Crush configuration file. See Crush MCP docs for more info.
Crush Remote Server Connection (HTTP)
{
"$schema": "https://charm.land/crush.json",
"mcp": {
"docfork": {
"type": "http",
"url": "https://mcp.docfork.com/mcp"
}
}
}
Crush Remote Server Connection (SSE)
{
"$schema": "https://charm.land/crush.json",
"mcp": {
"docfork": {
"type": "sse",
"url": "https://mcp.docfork.com/sse"
}
}
}
Crush Local Server Connection
{
"$schema": "https://charm.land/crush.json",
"mcp": {
"docfork": {
"type": "stdio",
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
Install in Cline
You can easily install Docfork through the Cline MCP Server Marketplace by following these instructions:
- Open Cline.
- Click the hamburger menu icon (☰) to enter the MCP Servers section.
- Use the search bar within the Marketplace tab to find Docfork.
- Click the Install button.
Install in Zencoder
To configure Docfork MCP in Zencoder, follow these steps:
- Go to the Zencoder menu (...)
- From the dropdown menu, select Agent tools
- Click on the Add custom MCP
- Add the name and server configuration from below, and make sure to hit the Install button
{
"command": "npx",
"args": ["-y", "docfork@latest"]
}
Once the MCP server is added, you can easily continue using it.
Install in Amazon Q Developer CLI
Add this to your Amazon Q Developer CLI configuration file. See Amazon Q Developer CLI docs for more details.
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork@latest"]
}
}
}
Install in Qodo Gen
See Qodo Gen docs for more details.
- Open Qodo Gen chat panel in VSCode or IntelliJ.
- Click Connect more tools.
- Click + Add new MCP.
- Add the following configuration:
{
"mcpServers": {
"docfork": {
"url": "https://mcp.docfork.com/mcp"
}
}
}
Install in JetBrains AI Assistant
See JetBrains AI Assistant Documentation for more details.
- In JetBrains IDEs go to
Settings
->Tools
->AI Assistant
->Model Context Protocol (MCP)
- Click
+ Add
. - Click on
Command
in the top-left corner of the dialog and select the As JSON option from the list - Add this configuration and click
OK
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
- Click
Apply
to save changes. - The same way docfork could be added for JetBrains Junie in
Settings
->Tools
->Junie
->MCP Settings
Install in Warp
See Warp Model Context Protocol Documentation for details.
- Navigate
Settings
>AI
>Manage MCP servers
. - Add a new MCP server by clicking the
+ Add
button. - Paste the configuration given below:
{
"Docfork": {
"command": "npx",
"args": ["-y", "docfork"],
"env": {},
"working_directory": null,
"start_on_launch": true
}
}
- Click
Save
to apply the changes.
Install in Opencode
Add this to your Opencode configuration file. See Opencode MCP docs docs for more info.
Opencode Remote Server Connection
"mcp": {
"docfork": {
"type": "remote",
"url": "https://mcp.docfork.com/mcp",
"enabled": true
}
}
Opencode Local Server Connection
{
"mcp": {
"docfork": {
"type": "local",
"command": ["npx", "-y", "docfork"],
"enabled": true
}
}
}
Install in Copilot Coding Agent
Using Docfork with Copilot Coding Agent
Add the following configuration to the mcp
section of your Copilot Coding Agent configuration file Repository->Settings->Copilot->Coding agent->MCP configuration:
{
"mcpServers": {
"docfork": {
"type": "http",
"url": "https://mcp.docfork.com/mcp",
"tools": ["get-library-docs"]
}
}
}
For more information, see the official GitHub documentation.
Install in Kiro
See Kiro Model Context Protocol Documentation for details.
- Navigate
Kiro
>MCP Servers
- Add a new MCP server by clicking the
+ Add
button. - Paste the configuration given below:
{
"mcpServers": {
"Docfork": {
"command": "npx",
"args": ["-y", "docfork"],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}
- Click
Save
to apply the changes.
Install in OpenAI Codex
See OpenAI Codex for more information.
Add the following configuration to your OpenAI Codex MCP server settings:
[mcp_servers.docfork]
args = ["-y", "docfork"]
command = "npx"
Install in LM Studio
See LM Studio MCP Support for more information.
One-click install:
Manual set-up:
- Navigate to
Program
(right side) >Install
>Edit mcp.json
. - Paste the configuration given below:
{
"mcpServers": {
"Docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
- Click
Save
to apply the changes. - Toggle the MCP server on/off from the right hand side, under
Program
, or by clicking the plug icon at the bottom of the chat box.
Install in Perplexity Desktop
See Local and Remote MCPs for Perplexity for more information.
- Navigate
Perplexity
>Settings
- Select
Connectors
. - Click
Add Connector
. - Select
Advanced
. - Enter Server Name:
Docfork
- Paste the following JSON in the text area:
{
"args": ["-y", "docfork"],
"command": "npx",
"env": {}
}
- Click
Save
.
🔨 Available Tools
Docfork MCP provides the following tool that LLMs can use:
get-library-docs
: Searches the library and returns its documentation.libraryName
(required): The name of the library to search fortopic
(required): Focus the docs on a specific topic (e.g., "routing", "hooks")tokens
(optional, default 10000, max 50000): Max number of tokens to return. Values less than the configuredDEFAULT_MINIMUM_TOKENS
value or the default value of 10000 are automatically increased to that value.
💡 Tips
Add a Rule
If you don't want to add use docfork
to every prompt, you can define a simple rule from your Cursor Settings > Rules
section in Cursor (or the equivalent in your MCP client) to auto-invoke Docfork on any code question:
---
alwaysApply: true
---
when the user requests code examples, setup or configuration steps, or library/API documentation
use docfork.
From then on you'll get Docfork's docs in any related conversation without typing anything extra. You can add your use cases to the match part.
Use Specific Library Names
When you know exactly which library you want to use, be specific in your prompts. This helps Docfork find the right documentation faster and more accurately:
implement basic authentication with supabase. use docfork
create a Next.js middleware for rate limiting. use docfork
configure Tailwind CSS with custom typography. use docfork
The more specific you are about the library and what you want to accomplish, the better documentation you'll receive.
Development
Clone the project and install dependencies:
npm i
Build:
npm run build
Environment Variables
The Docfork MCP server supports the following environment variables:
DEFAULT_MINIMUM_TOKENS
: Set the minimum token count for documentation retrieval (default: 10000)
For HTTP/SSE Transport Only
The following environment variables are only relevant when running the server as an HTTP/SSE service (not for standard npx
usage):
MCP_TRANSPORT
: Set the transport type for MCP communication (default:stdio
, options:streamable-http
,stdio
,sse
)PORT
: Set the port number for HTTP/SSE transport (default:3000
, only used when MCP_TRANSPORT isstreamable-http
orsse
)
Example Configurations
Standard node server configuration (most common):
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork@latest"],
"env": {
"DEFAULT_MINIMUM_TOKENS": "10000"
}
}
}
}
HTTP/SSE server configuration (for custom deployments):
These environment variables are used when you're running your own instance of the Docfork server, not when connecting to remote servers. For remote server connections, use the URL-based configurations shown earlier in this README (e.g., "url": "https://mcp.docfork.com/mcp"
).
If you're self-hosting and want to run the server with HTTP/SSE transport:
# Set environment variables and run
MCP_TRANSPORT=streamable-http PORT=3000 npx -y docfork@latest
Local Configuration Example
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["tsx", "/path/to/folder/docfork/src/index.ts"]
}
}
}
Testing with MCP Inspector
npx -y @modelcontextprotocol/inspector npx docfork
🚨 Troubleshooting
Module Not Found Errors
If you encounter ERR_MODULE_NOT_FOUND
, try using bunx
instead of npx
:
{
"mcpServers": {
"docfork": {
"command": "bunx",
"args": ["-y", "docfork"]
}
}
}
This often resolves module resolution issues in environments where npx
doesn't properly install or resolve packages.
ESM Resolution Issues
For errors like Error: Cannot find module 'uriTemplate.js'
, try the --experimental-vm-modules
flag:
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "--node-options=--experimental-vm-modules", "docfork"]
}
}
}
TLS/Certificate Issues
Use the --experimental-fetch
flag to bypass TLS-related problems:
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "--node-options=--experimental-fetch", "docfork"]
}
}
}
General MCP Client Errors
- Try adding
@latest
to the package name - Use
bunx
as an alternative tonpx
- Consider using
deno
as another alternative - Ensure you're using Node.js v18 or higher for native fetch support
⚠️ Disclaimer
Docfork is an open, community-driven catalogue. Although we review submissions, we make no warranties—express or implied—about the accuracy, completeness, or security of any linked documentation or code. Projects listed here are created and maintained by their respective authors, not by Docfork.
If you spot content that is suspicious, inappropriate, or potentially harmful, please contact us.
By using Docfork, you agree to do so at your own discretion and risk.
🌟 Let's Connect!
Stay in the loop and meet the community:
Star History
License
MIT