文档搜索服务

OpenClaw文档MCP服务器,提供全文搜索、页面检索和文档结构浏览功能,适用于开发者快速查找技术文档。

  • by XXXiby
  • JavaScript
  • 本地部署
  • 7 星标
  • 更新于
在 GitHub 查看 XXXiby/openclaw-docs-mcp

使用说明

openclaw文档mcp

用于从中搜索和检索文档的模型上下文协议(MCP)服务器 开爪.

特性

  • 🔍 搜索文档 -在所有OpenClaw文档中进行全文搜索
  • 📄 检索页面 -获取任何文档页面的完整内容
  • 📋 列出所有页面 -浏览完整的文档结构
  • ⚡ 快速缓存 -内置缓存以提高性能

安装

来自GitHub

npm install -g github:XXXiby/openclaw-docs-mcp

本地安装

git clone https://github.com/XXXiby/openclaw-docs-mcp.git
cd openclaw-docs-mcp
npm install

用法

作为MCP服务器

直接运行:

openclaw-docs-mcp

或者使用npx:

npx github:XXXiby/openclaw-docs-mcp

VS代码配置

添加到您的VS代码 mcp.json (~/.config/Code/User/mcp.json 或 %APPDATA%\Code\User\mcp.json):

{
  "servers": {
    "openclaw-docs": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "github:XXXiby/openclaw-docs-mcp"]
    }
  }
}

对于Windows上的WSL用户:

{
  "servers": {
    "openclaw-docs": {
      "type": "stdio",
      "command": "wsl",
      "args": ["-e", "npx", "-y", "github:XXXiby/openclaw-docs-mcp"]
    }
  }
}

Claude桌面配置

添加到您的Claude桌面配置(~/Library/Application Support/Claude/claude_desktop_config.json 在macOS上):

{
  "mcpServers": {
    "openclaw-docs": {
      "command": "npx",
      "args": ["-y", "github:XXXiby/openclaw-docs-mcp"]
    }
  }
}

可用工具

search_openclaw_docs

在OpenClaw文档中搜索有关主题的信息。

参数:

  • query (字符串,必填):搜索查询(例如“网关配置”、“电报通道”)
  • maxResults (数字,可选):返回的最大结果数(默认值:5,最大值:20)

例子:

{
  "name": "search_openclaw_docs",
  "arguments": {
    "query": "telegram channel setup",
    "maxResults": 5
  }
}

get_openclaw_doc_page

获取特定文档页面的完整内容。

参数:

  • path (字符串,必填):页面路径(例如,“/网关/配置”、“/通道/电报”)

例子:

{
  "name": "get_openclaw_doc_page",
  "arguments": {
    "path": "/gateway/configuration"
  }
}

list_openclaw_doc_pages

列出站点地图中所有可用的文档页面。

参数: 无

例子:

{
  "name": "list_openclaw_doc_pages",
  "arguments": {}
}

运作原理

  1. 从以下位置获取站点地图 https://docs.openclaw.ai/sitemap.xml
  2. 使用Cheerio解析HTML内容以提取文本
  3. 对搜索结果执行基于关键字的相关性评分
  4. 缓存结果5分钟以提高性能

发展

# Clone the repository
git clone https://github.com/XXXiby/openclaw-docs-mcp.git
cd openclaw-docs-mcp

# Install dependencies
npm install

# Run locally
node index.js

# Test tools/list
echo '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}' | node index.js

许可证

MIT许可证-请参阅 许可证 了解详情。

相关