Skip to main content
Glama

MCP Doc Server

README.md4.73 kB
# MCP Server (Doc) 基于文档站的 MCP 服务器,支持对官网文档的关键字搜索和内容获取。 ## Getting Started ### Tools - `search-docs` - `list-docs` - `get-doc-content` #### `search-docs` Example Request ```json { "query": "rtc" } ``` Example Response ```json { "data": [ { "text": "流程总览", "category": "default", "uri": "docs://default/analytics/general/rtc/call-search/overview" }, { "text": "查看通话详情 本文介绍如何查看通话详情页面的三个子页面。", "category": "default", "uri": "docs://default/analytics/general/rtc/call-search/call-detail" }, { "text": "案例:常见问题排查 本文结合案例介绍如何排查常见的通话质量问题。 信息异常的指标数据均用红色表示。", "category": "default", "uri": "docs://default/analytics/general/rtc/call-search/troubleshooting" } ] } ``` #### `list-docs` Example Response ```json { "categories": ["shared", "default", "api-reference", "faq", "basics"], "total": 8033, "docs": [ { "path": "doc/rtm2/android/user-guide/setup/account-and-billing", "name": "account-and-billing", "category": "default", "depth": 6, "uri": "docs://default/rtm2/android/user-guide/setup/account-and-billing", "localPath": "default/rtm2/android/user-guide/setup/account-and-billing" }, { "path": "doc/rtm2/cpp/user-guide/setup/account-and-billing", "name": "account-and-billing", "category": "default", "depth": 6, "uri": "docs://default/rtm2/cpp/user-guide/setup/account-and-billing", "localPath": "default/rtm2/cpp/user-guide/setup/account-and-billing" } ] } ``` #### `get-doc-content` Example Request ```json { "uri": "docs://default/analytics/general/rtc/call-search/call-detail" } ``` Example Response ``` --- title: 查看通话详情 displayed_sidebar: analytics_general_usecase_sidebar ag_product: analytics ag_product_label: 水晶球 ag_platform: general ag_platform_label: 控制台 ag_usecase: usecase last_update_date: 2023/09/19 10:48:49 ag_file_path: default/analytics/general/rtc/call-search/call-detail.mdx --- 本文介绍如何查看通话详情页面的三个子页面。 ## 通话详情主页 ... ``` ## 接入 ### 接入点 - LOCAL http://localhost:3000/mcp - Public https://doc-mcp.shengwang.cn/mcp ### 接入方式 #### VS Code & Copilot 根据官方文档接入 MCP Server。 - [Add an MCP Server](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server) - [Use MCP Tools in Agent Mode](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_use-mcp-tools-in-agent-mode) Example `.vscode/mcp.json` ```json .vscode/mcp.json { "servers": { "my-mcp-server-7b6dc6ec": { "url": "https://doc-mcp.shengwang.cn/mcp" } } } ``` 可以在 Agent Mode 下使用井号键(#)来调用 MCP Server 的工具。 比如: 1. 提问:如何在 TS 中集成 RTC。 ``` #search-docs #get-doc-content 通过search-docs搜索有关 rtc 的文档,通过get-doc-content工具获取文档内容,并告诉我如何在TS中集成RTC。 ``` 2. 实现一个基于 RTC 的 1v1 的纯语音互动 demo。 ``` #search-docs #get-doc-content > 你可以通过search-docs搜索有关javascript的 rtc sdk 的文档,通过get-doc-content工具获取文档内容。 帮我实现一个1v1的纯语音互动,要求是一个页面(用tailwindcss@3),有个表单(appID, token, channel name, userID),有个加入 和 离开 按钮。 请你使用vite来初始化并创建/运行该项目。 目录就在当前项目下,叫 agora-voice-demo。 要求有人加入的时候立刻订阅他,以实现纯语音通话 ``` #### Cursor - [Configuring MCP Servers](https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers) Example `.cursor/mcp.json` ```json .cursor/mcp.json { "mcpServers": { "server-name": { "url": "https://doc-mcp.shengwang.cn/mcp" } } } ``` 可以在 Agent Mode 下,由 agent 自己判断并调用 MCP Server 的工具。 比如: ``` 通过search-docs搜索有关 rtc 的文档,通过get-doc-content工具获取文档内容,并告诉我如何在TS中集成RTC。 ``` ## Development > 推荐使用 [Bun](https://bun.sh/) 进行开发。 参考 [MCP Server TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk) ### Install ```bash bun install ``` ### Initiate docs ```bash bun run doc:download ``` ### Start server ```bash bun run dev:watch ``` ### Start Inspector ```bash bun inspect ``` Then input `https://doc-mcp.shengwang.cn/mcp` in the inspector.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Shengwang-Community/doc-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server