
<img alt="在 VS Code 中安装 (npx)" src="https://img.shields.io/badge/Install%20in%20VS%20Code-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white">
Docfork MCP 直接从源处获取 @latest 文档和代码示例,并将其添加到你的上下文中。
只需告诉 Cursor 使用 docfork:
创建一个基本的 Next.js 应用程序并使用 App Router。使用 docfork
要通过 Smithery 自动安装 Docfork MCP 服务器:
npx -y @smithery/cli@latest install @docfork/mcp --client <CLIENT_NAME> --key <YOUR_SMITHERY_KEY>
你可以在 Smithery.ai 网页 上找到你的 Smithery 密钥。
</details> <details> <summary><b>在 Cursor 中安装</b></summary>前往:设置 -> Cursor 设置 -> 工具与集成 -> 添加自定义 MCP 服务器
推荐的方法是将以下配置粘贴到你的 Cursor ~/.cursor/mcp.json 文件中。你也可以通过在项目文件夹中创建 .cursor/mcp.json 来在特定项目中安装。更多信息请参阅 Cursor MCP 文档。
{
"mcpServers": {
"docfork": {
"url": "https://mcp.docfork.com/mcp"
}
}
}
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
</details>
<details>
<summary>替代方案:使用 Bun</summary>
{
"mcpServers": {
"docfork": {
"command": "bunx",
"args": ["-y", "docfork"]
}
}
}
</details>
<details>
<summary>替代方案:使用 Deno</summary>
{
"mcpServers": {
"docfork": {
"command": "deno",
"args": ["run", "--allow-env", "--allow-net", "npm:docfork"]
}
}
}
</details>
<details>
<summary><b>在 Claude Code 中安装</b></summary>
运行此命令。更多信息请参阅 Claude Code MCP 文档。
claude mcp add --transport sse docfork https://mcp.docfork.com/sse
claude mcp add docfork -- npx -y docfork
</details>
<details>
<summary><b>在 Claude Desktop 中安装</b></summary>
将此内容添加到你的 Claude Desktop claude_desktop_config.json 文件中。更多信息请参阅 Claude Desktop MCP 文档。
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
</details>
<details>
<summary><b>在 Windsurf 中安装</b></summary>
将此内容添加到你的 Windsurf MCP 配置中。更多信息请参阅 Windsurf MCP 文档。
{
"mcpServers": {
"docfork": {
"serverUrl": "https://mcp.docfork.com/sse"
}
}
}
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
</details>
<details>
<summary><b>在 VS Code 中安装</b></summary>
将此内容添加到你的 VS Code MCP 配置中。更多信息请参阅 VS Code MCP 文档。
{
"mcpServers": {
"docfork": {
"type": "http",
"url": "https://mcp.docfork.com/mcp"
}
}
}
{
"servers": {
"docfork": {
"type": "stdio",
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
</details>
<details>
<summary><b>在 Zed 中安装</b></summary>
一键安装: → 获取 Docfork 扩展
或者手动配置(针对高级用户):
{
"context_servers": {
"docfork": {
"command": {
"path": "npx",
"args": ["-y", "docfork"]
},
"settings": {}
}
}
}
</details>
<details>
<summary><b>在 BoltAI 中安装</b></summary>
打开应用的“设置”页面,导航到“插件”,并输入以下 JSON:
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
更多信息请参阅 BoltAI 的文档网站。对于 BoltAI on iOS,请参阅 此指南。
</details> <details> <summary><b>使用 Docker</b></summary>如果你希望在 Docker 容器中运行 MCP 服务器:
构建 Docker 镜像:
首先,在项目根目录(或你喜欢的任何位置)创建一个 Dockerfile:
FROM node:18-alpine
WORKDIR /app
# 全局安装最新版本
RUN npm install -g docfork
# 如果需要暴露默认端口(可选,取决于 MCP 客户端交互)
# EXPOSE 3000
# 默认命令来运行服务器
CMD ["docfork"]
</details>
然后,使用标签(例如 docfork-mcp)构建镜像。确保 Docker Desktop(或 Docker 守护进程)正在运行。 在保存 Dockerfile 的同一目录下运行以下命令:
docker build -t docfork .
配置你的 MCP 客户端:
更新你的 MCP 客户端配置以使用 Docker 命令。
示例配置文件 cline_mcp_settings.json:
{
"mcpServers": {
"docfork": {
"autoApprove": [],
"disabled": false,
"timeout": 60,
"command": "docker",
"args": ["run", "-i", "--rm", "docfork-mcp"],
"transportType": "stdio"
}
}
}
注意:这是一个示例配置。请参考前面的 README 中特定客户端(如 Cursor、VS Code 等)的具体示例来调整结构(例如 mcpServers 对比 servers)。同时确保 args 中的镜像名称与 docker build 命令中的标签相匹配。
Windows 中的配置与 Linux 或 macOS 稍有不同(Cline 是示例使用的)。其他编辑器的原则相同;请参考 command 和 args 的配置。
{
"mcpServers": {
"github.com/docfork/mcp": {
"command": "cmd",
"args": ["/c", "npx", "-y", "docfork@latest"],
"disabled": false,
"autoApprove": []
}
}
}
</details>
<details>
<summary><b>在 Augment Code 中安装</b></summary>
要在 Augment Code 中配置 Docfork MCP,请按照以下步骤操作:
augment.advanced 对象中的 mcpServers 数组"augment.advanced": {
"mcpServers": [
{
"name": "docfork",
"command": "npx",
"args": ["-y", "docfork"]
}
]
}
添加 MCP 服务器后,重新启动你的编辑器。如果收到任何错误,请检查语法以确保没有遗漏闭合括号或逗号。
</details> <details> <summary><b>在 Roo Code 中安装</b></summary>将此内容添加到你的 Roo Code MCP 配置文件中。更多信息请参阅 Roo Code MCP 文档。
{
"mcpServers": {
"docfork": {
"type": "streamable-http",
"url": "https://mcp.docfork.com/mcp"
}
}
}
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
</details>
<details>
<summary><b>在 Trae 中安装</b></summary>
使用手动添加功能并填写该 MCP 服务器的 JSON 配置信息。 更多详情,请访问 Trae 文档。
{
"mcpServers": {
"docfork": {
"url": "https://mcp.docfork.com/mcp"
}
}
}
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
</details>
<details>
<summary><b>在 Visual Studio 2022 中安装</b></summary>
你可以在 Visual Studio 2022 中通过遵循 Visual Studio MCP Servers 文档 来配置 Docfork MCP。
将此内容添加到你的 Visual Studio MCP 配置文件中(详见 Visual Studio 文档):
{
"mcp": {
"servers": {
"docfork": {
"type": "http",
"url": "https://mcp.docfork.com/mcp"
}
}
}
}
或者,对于本地服务器:
{
"mcp": {
"servers": {
"docfork": {
"type": "stdio",
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
}
更多信息和故障排除,请参阅 Visual Studio MCP Servers 文档。
</details> <details> <summary><b>在 Gemini CLI 中安装</b></summary>请参阅 Gemini CLI 配置 以获取详细信息。
~/.gemini/settings.json(其中 ~ 是你的主目录)。settings.json 文件中的 mcpServers 对象:{
"mcpServers": {
"docfork": {
"httpUrl": "https://mcp.docfork.com/mcp"
}
}
}
或者,对于本地服务器:
{
"mcpServers": {
"docfork": {
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
如果 mcpServers 对象不存在,请创建它。
将此内容添加到你的 Crush 配置文件中。更多信息请参阅 Crush MCP 文档。
{
"$schema": "https://charm.land/crush.json",
"mcp": {
"docfork": {
"type": "http",
"url": "https://mcp.docfork.com/mcp"
}
}
}
{
"$schema": "https://charm.land/crush.json",
"mcp": {
"docfork": {
"type": "sse",
"url": "https://mcp.docfork.com/sse"
}
}
}
{
"$schema": "https://charm.land/crush.json",
"mcp": {
"docfork": {
"type": "stdio",
"command": "npx",
"args": ["-y", "docfork"]
}
}
}
</details>
<details>
<summary>
<b>在 Cline 中安装</b>
</summary>
你可以通过 Cline MCP Server Marketplace 轻松安装 Docfork,按照以下说明操作: