[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tool-langchain-ai--mcpdoc":3,"similar-langchain-ai--mcpdoc":139},{"id":4,"github_repo":5,"name":6,"description_en":7,"description_zh":8,"ai_summary_zh":8,"readme_en":9,"readme_zh":10,"quickstart_zh":11,"use_case_zh":12,"hero_image_url":13,"owner_login":14,"owner_name":15,"owner_avatar_url":16,"owner_bio":17,"owner_company":18,"owner_location":18,"owner_email":19,"owner_twitter":15,"owner_website":20,"owner_url":21,"languages":22,"stars":31,"forks":32,"last_commit_at":33,"license":34,"difficulty_score":35,"env_os":36,"env_gpu":37,"env_ram":37,"env_deps":38,"category_tags":43,"github_topics":47,"view_count":35,"oss_zip_url":18,"oss_zip_packed_at":18,"status":54,"created_at":55,"updated_at":56,"faqs":57,"releases":88},10187,"langchain-ai\u002Fmcpdoc","mcpdoc","Expose llms-txt to IDEs for development","mcpdoc 是一款专为开发者设计的开源工具，旨在将 LLM 文档索引（llms.txt）高效集成到 Cursor、Windsurf 或 Claude Code 等智能开发环境中。它的核心作用是充当一个中间服务器，让 IDE 能够通过标准的模型上下文协议（MCP）精准获取项目所需的背景知识和详细文档链接。\n\n过去，各类 AI 编程助手在读取 llms.txt 文件时往往依赖各自内置且不透明的机制，用户难以审计其具体调用了哪些文件或返回了何种上下文。mcpdoc 彻底解决了这一痛点，赋予开发者对文档检索过程的完全控制权。通过它，用户可以自定义文档源列表，并利用统一的 `fetch_docs` 工具按需抓取内容，确保每一次数据获取都清晰可见、安全可控。\n\n该工具特别适合需要频繁查阅官方文档的全栈工程师、AI 应用开发者及技术研究人员。其独特的技术亮点在于实施了严格的域名访问控制策略：当指定远程文档源时，系统会自动锁定对应域名；若使用本地文件，则强制要求用户显式授权可访问的域名。这种设计有效防止了未经授权的跨域访问，在提升开发效率的同时，为代码上下文的安全性提供了坚实保障。","# MCP LLMS-TXT Documentation Server\n\n## Overview\n\n[llms.txt](https:\u002F\u002Fllmstxt.org\u002F) is a website index for LLMs, providing background information, guidance, and links to detailed markdown files. IDEs like Cursor and Windsurf or apps like Claude Code\u002FDesktop can use `llms.txt` to retrieve context for tasks. However, these apps use different built-in tools to read and process files like `llms.txt`. The retrieval process can be opaque, and there is not always a way to audit the tool calls or the context returned.\n\n[MCP](https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol) offers a way for developers to have *full control* over tools used by these applications. Here, we create [an open source MCP server](https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol) to provide MCP host applications (e.g., Cursor, Windsurf, Claude Code\u002FDesktop) with (1) a user-defined list of `llms.txt` files and (2) a simple  `fetch_docs` tool read URLs within any of the provided `llms.txt` files. This allows the user to audit each tool call as well as the context returned. \n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_26aa2ab7fb79.png\" width=\"60%\">\n\n## llms-txt\n\nYou can find llms.txt files for langgraph and langchain here:\n\n| Library          | llms.txt                                                                                                   |\n|------------------|------------------------------------------------------------------------------------------------------------|\n| LangGraph Python | [https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt](https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt)     |\n| LangGraph JS     | [https:\u002F\u002Flangchain-ai.github.io\u002Flanggraphjs\u002Fllms.txt](https:\u002F\u002Flangchain-ai.github.io\u002Flanggraphjs\u002Fllms.txt) |\n| LangChain Python | [https:\u002F\u002Fpython.langchain.com\u002Fllms.txt](https:\u002F\u002Fpython.langchain.com\u002Fllms.txt)                             |\n| LangChain JS     | [https:\u002F\u002Fjs.langchain.com\u002Fllms.txt](https:\u002F\u002Fjs.langchain.com\u002Fllms.txt)                                     |\n\n## Quickstart\n\n#### Install uv\n* Please see [official uv docs](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fgetting-started\u002Finstallation\u002F#installation-methods) for other ways to install `uv`.\n\n```bash\ncurl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh\n```\n\n#### Choose an `llms.txt` file to use. \n* For example, [here's](https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt) the LangGraph `llms.txt` file.\n\n> **Note: Security and Domain Access Control**\n> \n> For security reasons, mcpdoc implements strict domain access controls:\n> \n> 1. **Remote llms.txt files**: When you specify a remote llms.txt URL (e.g., `https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt`), mcpdoc automatically adds only that specific domain (`langchain-ai.github.io`) to the allowed domains list. This means the tool can only fetch documentation from URLs on that domain.\n> \n> 2. **Local llms.txt files**: When using a local file, NO domains are automatically added to the allowed list. You MUST explicitly specify which domains to allow using the `--allowed-domains` parameter.\n> \n> 3. **Adding additional domains**: To allow fetching from domains beyond those automatically included:\n>    - Use `--allowed-domains domain1.com domain2.com` to add specific domains\n>    - Use `--allowed-domains '*'` to allow all domains (use with caution)\n> \n> This security measure prevents unauthorized access to domains not explicitly approved by the user, ensuring that documentation can only be retrieved from trusted sources.\n\n#### (Optional) Test the MCP server locally with your `llms.txt` file(s) of choice:\n```bash\nuvx --from mcpdoc mcpdoc \\\n    --urls \"LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\" \"LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\" \\\n    --transport sse \\\n    --port 8082 \\\n    --host localhost\n```\n\n* This should run at: http:\u002F\u002Flocalhost:8082\n\n![Screenshot 2025-03-18 at 3 29 30 PM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_6a5e655d0c1a.png)\n\n* Run [MCP inspector](https:\u002F\u002Fmodelcontextprotocol.io\u002Fdocs\u002Ftools\u002Finspector) and connect to the running server:\n```bash\nnpx @modelcontextprotocol\u002Finspector\n```\n\n![Screenshot 2025-03-18 at 3 30 30 PM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_05fb28ef6f78.png)\n\n* Here, you can test the `tool` calls. \n\n#### Connect to Cursor \n\n* Open `Cursor Settings` and `MCP` tab.\n* This will open the `~\u002F.cursor\u002Fmcp.json` file.\n\n![Screenshot 2025-03-19 at 11 01 31 AM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_cddaf6f76b4c.png)\n\n* Paste the following into the file (we use the `langgraph-docs-mcp` name and link to the LangGraph `llms.txt`).\n\n```\n{\n  \"mcpServers\": {\n    \"langgraph-docs-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"--from\",\n        \"mcpdoc\",\n        \"mcpdoc\",\n        \"--urls\",\n        \"LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\",\n        \"--transport\",\n        \"stdio\"\n      ]\n    }\n  }\n}\n```\n\n* Confirm that the server is running in your `Cursor Settings\u002FMCP` tab.\n* Best practice is to then update Cursor Global (User) rules.\n* Open Cursor `Settings\u002FRules` and update `User Rules` with the following (or similar):\n\n```\nfor ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- \n+ call list_doc_sources tool to get the available llms.txt file\n+ call fetch_docs tool to read it\n+ reflect on the urls in llms.txt \n+ reflect on the input question \n+ call fetch_docs on any urls relevant to the question\n+ use this to answer the question\n```\n\n* `CMD+L` (on Mac) to open chat.\n* Ensure `agent` is selected. \n\n![Screenshot 2025-03-18 at 1 56 54 PM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_d179131c51d0.png)\n\nThen, try an example prompt, such as:\n```\nwhat are types of memory in LangGraph?\n```\n\n![Screenshot 2025-03-18 at 1 58 38 PM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_6c0be7406bc2.png)\n\n### Connect to Windsurf\n\n* Open Cascade with `CMD+L` (on Mac).\n* Click `Configure MCP` to open the config file, `~\u002F.codeium\u002Fwindsurf\u002Fmcp_config.json`.\n* Update with `langgraph-docs-mcp` as noted above.\n\n![Screenshot 2025-03-19 at 11 02 52 AM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_dfc1e26559a4.png)\n\n* Update `Windsurf Rules\u002FGlobal rules` with the following (or similar):\n\n```\nfor ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- \n+ call list_doc_sources tool to get the available llms.txt file\n+ call fetch_docs tool to read it\n+ reflect on the urls in llms.txt \n+ reflect on the input question \n+ call fetch_docs on any urls relevant to the question\n```\n\n![Screenshot 2025-03-18 at 2 02 12 PM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_1591239cc3b0.png)\n\nThen, try the example prompt:\n* It will perform your tool calls.\n\n![Screenshot 2025-03-18 at 2 03 07 PM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_61480f2d34ec.png)\n\n### Connect to Claude Desktop\n\n* Open `Settings\u002FDeveloper` to update `~\u002FLibrary\u002FApplication\\ Support\u002FClaude\u002Fclaude_desktop_config.json`.\n* Update with `langgraph-docs-mcp` as noted above.\n* Restart Claude Desktop app.\n\n> [!Note]\n> If you run into issues with Python version incompatibility when trying to add MCPDoc tools to Claude Desktop, you can explicitly specify the filepath to `python` executable in the `uvx` command.\n>\n> \u003Cdetails>\n> \u003Csummary>Example configuration\u003C\u002Fsummary>\n>\n> ```\n> {\n>   \"mcpServers\": {\n>     \"langgraph-docs-mcp\": {\n>       \"command\": \"uvx\",\n>       \"args\": [\n>         \"--python\",\n>         \"\u002Fpath\u002Fto\u002Fpython\",\n>         \"--from\",\n>         \"mcpdoc\",\n>         \"mcpdoc\",\n>         \"--urls\",\n>         \"LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\",\n>         \"--transport\",\n>         \"stdio\"\n>       ]\n>     }\n>   }\n> }\n> ```\n> \u003C\u002Fdetails>\n\n> [!Note]\n> Currently (3\u002F21\u002F25) it appears that Claude Desktop does not support `rules` for global rules, so appending the following to your prompt.\n\n```\n\u003Crules>\nfor ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- \n+ call list_doc_sources tool to get the available llms.txt file\n+ call fetch_docs tool to read it\n+ reflect on the urls in llms.txt \n+ reflect on the input question \n+ call fetch_docs on any urls relevant to the question\n\u003C\u002Frules>\n```\n\n![Screenshot 2025-03-18 at 2 05 54 PM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_9de9066c60b7.png)\n\n* You will see your tools visible in the bottom right of your chat input.\n\n![Screenshot 2025-03-18 at 2 05 39 PM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_aab755dec6f9.png)\n\nThen, try the example prompt:\n\n* It will ask to approve tool calls as it processes your request.\n\n![Screenshot 2025-03-18 at 2 06 54 PM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_34e0ee3f5a34.png)\n\n### Connect to Claude Code\n\n* In a terminal after installing [Claude Code](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fagents-and-tools\u002Fclaude-code\u002Foverview), run this command to add the MCP server to your project:\n```\nclaude mcp add-json langgraph-docs '{\"type\":\"stdio\",\"command\":\"uvx\" ,\"args\":[\"--from\", \"mcpdoc\", \"mcpdoc\", \"--urls\", \"langgraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\", \"LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\"]}' -s local\n```\n* You will see `~\u002F.claude.json` updated.\n* Test by launching Claude Code and running to view your tools:\n```\n$ Claude\n$ \u002Fmcp \n```\n\n![Screenshot 2025-03-18 at 2 13 49 PM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_1df9fbbd2bfc.png)\n\n> [!Note]\n> Currently (3\u002F21\u002F25) it appears that Claude Code does not support `rules` for global rules, so appending the following to your prompt.\n\n```\n\u003Crules>\nfor ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- \n+ call list_doc_sources tool to get the available llms.txt file\n+ call fetch_docs tool to read it\n+ reflect on the urls in llms.txt \n+ reflect on the input question \n+ call fetch_docs on any urls relevant to the question\n\u003C\u002Frules>\n```\n\nThen, try the example prompt:\n\n* It will ask to approve tool calls.\n\n![Screenshot 2025-03-18 at 2 14 37 PM](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_bd4ca62abc24.png)\n\n## Command-line Interface\n\nThe `mcpdoc` command provides a simple CLI for launching the documentation server. \n\nYou can specify documentation sources in three ways, and these can be combined:\n\n1. Using a YAML config file:\n\n* This will load the LangGraph Python documentation from the `sample_config.yaml` file in this repo.\n\n```bash\nmcpdoc --yaml sample_config.yaml\n```\n\n2. Using a JSON config file:\n\n* This will load the LangGraph Python documentation from the `sample_config.json` file in this repo.\n\n```bash\nmcpdoc --json sample_config.json\n```\n\n3. Directly specifying llms.txt URLs with optional names:\n\n* URLs can be specified either as plain URLs or with optional names using the format `name:url`.\n* You can specify multiple URLs by using the `--urls` parameter multiple times.\n* This is how we loaded `llms.txt` for the MCP server above.\n\n```bash\nmcpdoc --urls LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt --urls LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\n```\n\nYou can also combine these methods to merge documentation sources:\n\n```bash\nmcpdoc --yaml sample_config.yaml --json sample_config.json --urls LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt --urls LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\n```\n\n## Additional Options\n\n- `--follow-redirects`: Follow HTTP redirects (defaults to False)\n- `--timeout SECONDS`: HTTP request timeout in seconds (defaults to 10.0)\n\nExample with additional options:\n\n```bash\nmcpdoc --yaml sample_config.yaml --follow-redirects --timeout 15\n```\n\nThis will load the LangGraph Python documentation with a 15-second timeout and follow any HTTP redirects if necessary.\n\n## Configuration Format\n\nBoth YAML and JSON configuration files should contain a list of documentation sources. \n\nEach source must include an `llms_txt` URL and can optionally include a `name`:\n\n### YAML Configuration Example (sample_config.yaml)\n\n```yaml\n# Sample configuration for mcp-mcpdoc server\n# Each entry must have a llms_txt URL and optionally a name\n- name: LangGraph Python\n  llms_txt: https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\n```\n\n### JSON Configuration Example (sample_config.json)\n\n```json\n[\n  {\n    \"name\": \"LangGraph Python\",\n    \"llms_txt\": \"https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\"\n  }\n]\n```\n\n## Programmatic Usage\n\n```python\nfrom mcpdoc.main import create_server\n\n# Create a server with documentation sources\nserver = create_server(\n    [\n        {\n            \"name\": \"LangGraph Python\",\n            \"llms_txt\": \"https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\",\n        },\n        # You can add multiple documentation sources\n        # {\n        #     \"name\": \"Another Documentation\",\n        #     \"llms_txt\": \"https:\u002F\u002Fexample.com\u002Fllms.txt\",\n        # },\n    ],\n    follow_redirects=True,\n    timeout=15.0,\n)\n\n# Run the server\nserver.run(transport=\"stdio\")\n```\n","# MCP LLMS-TXT 文档服务器\n\n## 概述\n\n[llms.txt](https:\u002F\u002Fllmstxt.org\u002F) 是一个针对大型语言模型的网站索引，提供背景信息、使用指南以及指向详细 Markdown 文件的链接。像 Cursor 和 Windsurf 这样的 IDE，或者 Claude Code\u002FDesktop 这样的应用，都可以使用 `llms.txt` 来获取任务相关的上下文信息。然而，这些应用内部使用的工具来读取和处理 `llms.txt` 等文件的方式各不相同，检索过程往往不够透明，用户也难以审计工具调用及返回的上下文。\n\n[MCP](https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol) 为开发者提供了一种方法，使他们能够对这些应用程序所使用的工具拥有*完全控制权*。在此基础上，我们创建了一个[开源的 MCP 服务器](https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol)，为 MCP 主机应用（例如 Cursor、Windsurf、Claude Code\u002FDesktop）提供：(1) 用户自定义的 `llms.txt` 文件列表；以及 (2) 一个简单的 `fetch_docs` 工具，用于读取任何已提供的 `llms.txt` 文件中的 URL 内容。这样一来，用户不仅可以审计每一次工具调用，还能查看返回的上下文信息。\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_26aa2ab7fb79.png\" width=\"60%\">\n\n## llms-txt\n\n您可以在以下位置找到 LangGraph 和 LangChain 的 `llms.txt` 文件：\n\n| 库          | llms.txt                                                                                                   |\n|------------------|------------------------------------------------------------------------------------------------------------|\n| LangGraph Python | [https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt](https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt)     |\n| LangGraph JS     | [https:\u002F\u002Flangchain-ai.github.io\u002Flanggraphjs\u002Fllms.txt](https:\u002F\u002Flangchain-ai.github.io\u002Flanggraphjs\u002Fllms.txt) |\n| LangChain Python | [https:\u002F\u002Fpython.langchain.com\u002Fllms.txt](https:\u002F\u002Fpython.langchain.com\u002Fllms.txt)                             |\n| LangChain JS     | [https:\u002F\u002Fjs.langchain.com\u002Fllms.txt](https:\u002F\u002Fjs.langchain.com\u002Fllms.txt)                                     |\n\n## 快速入门\n\n#### 安装 uv\n* 请参阅 [官方 uv 文档](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fgetting-started\u002Finstallation\u002F#installation-methods)，了解其他安装 `uv` 的方式。\n\n```bash\ncurl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh\n```\n\n#### 选择要使用的 `llms.txt` 文件。\n* 例如，这里是 LangGraph 的 `llms.txt` 文件：[https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt](https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt)。\n\n> **注意：安全与域名访问控制**\n> \n> 出于安全考虑，mcpdoc 实施了严格的域名访问控制：\n> \n> 1. **远程 llms.txt 文件**：当您指定一个远程的 llms.txt URL（例如 `https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt`）时，mcpdoc 会自动将该特定域名（`langchain-ai.github.io`）加入允许访问的域名列表中。这意味着该工具只能从该域名下的 URL 获取文档内容。\n> \n> 2. **本地 llms.txt 文件**：当使用本地文件时，系统不会自动将任何域名加入允许访问的列表。您必须通过 `--allowed-domains` 参数显式指定允许访问的域名。\n> \n> 3. **添加额外域名**：若需允许从未自动包含的域名获取内容：\n>    - 使用 `--allowed-domains domain1.com domain2.com` 添加特定域名\n>    - 使用 `--allowed-domains '*'` 允许所有域名（请谨慎使用）\n> \n> 此项安全措施可防止未经授权访问未经用户明确批准的域名，从而确保文档仅能从受信任的来源获取。\n\n#### （可选）在本地使用您选择的 `llms.txt` 文件测试 MCP 服务器：\n```bash\nuvx --from mcpdoc mcpdoc \\\n    --urls \"LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\" \"LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\" \\\n    --transport sse \\\n    --port 8082 \\\n    --host localhost\n```\n\n* 服务器应运行在：http:\u002F\u002Flocalhost:8082\n\n![截图 2025-03-18 下午 3:29:30](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_6a5e655d0c1a.png)\n\n* 运行 [MCP 检查器](https:\u002F\u002Fmodelcontextprotocol.io\u002Fdocs\u002Ftools\u002Finspector)，并连接到正在运行的服务器：\n```bash\nnpx @modelcontextprotocol\u002Finspector\n```\n\n![截图 2025-03-18 下午 3:30:30](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_05fb28ef6f78.png)\n\n* 在这里，您可以测试工具调用。\n\n#### 连接到 Cursor \n\n* 打开 `Cursor 设置` 中的 `MCP` 选项卡。\n* 这将打开 `~\u002F.cursor\u002Fmcp.json` 文件。\n\n![截图 2025-03-19 上午 11:01:31](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_cddaf6f76b4c.png)\n\n* 将以下内容粘贴到文件中（我们使用 `langgraph-docs-mcp` 名称，并指向 LangGraph 的 `llms.txt`）：\n\n```\n{\n  \"mcpServers\": {\n    \"langgraph-docs-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"--from\",\n        \"mcpdoc\",\n        \"mcpdoc\",\n        \"--urls\",\n        \"LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\",\n        \"--transport\",\n        \"stdio\"\n      ]\n    }\n  }\n}\n```\n\n* 确认服务器已在 `Cursor 设置\u002FMCP` 选项卡中运行。\n* 最佳实践是随后更新 Cursor 的全局（用户）规则。\n* 打开 Cursor 的 `设置\u002F规则`，并将 `用户规则` 更新为如下内容（或类似内容）：\n\n```\n对于任何关于 LangGraph 的问题，使用 langgraph-docs-mcp 服务器来辅助解答——\n+ 调用 list_doc_sources 工具以获取可用的 llms.txt 文件\n+ 调用 fetch_docs 工具来阅读该文件\n+ 反思 llms.txt 中的 URLs\n+ 反思输入的问题\n+ 对与问题相关的任何 URLs 调用 fetch_docs\n+ 利用这些信息来回答问题\n```\n\n* 使用 `CMD+L`（在 Mac 上）打开聊天界面。\n* 确保已选择 `agent` 模式。\n\n![截图 2025-03-18 下午 1:56:54](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_d179131c51d0.png)\n\n然后，尝试一个示例提示，例如：\n```\nLangGraph 中有哪些类型的记忆？\n```\n\n![截图 2025-03-18 下午 1:58:38](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_6c0be7406bc2.png)\n\n### 连接到 Windsurf\n\n* 使用 `CMD+L`（在 Mac 上）打开 Cascade。\n* 点击 `配置 MCP` 以打开配置文件 `~\u002F.codeium\u002Fwindsurf\u002Fmcp_config.json`。\n* 按照上述说明更新为 `langgraph-docs-mcp`。\n\n![截图 2025-03-19 上午 11:02:52](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_dfc1e26559a4.png)\n\n* 更新 `Windsurf 规则\u002F全球规则` 如下（或类似内容）：\n\n```\n对于任何关于 LangGraph 的问题，使用 langgraph-docs-mcp 服务器来辅助解答——\n+ 调用 list_doc_sources 工具以获取可用的 llms.txt 文件\n+ 调用 fetch_docs 工具来阅读该文件\n+ 反思 llms.txt 中的 URLs\n+ 反思输入的问题\n+ 对与问题相关的任何 URLs 调用 fetch_docs\n```\n\n![截图 2025-03-18 下午 2:02:12](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_1591239cc3b0.png)\n\n然后，尝试使用示例提示：\n* 系统将执行您的工具调用。\n\n![截图 2025-03-18 下午 2:03:07](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_61480f2d34ec.png)\n\n### 连接到 Claude Desktop\n\n* 打开 `Settings\u002FDeveloper` 来更新 `~\u002FLibrary\u002FApplication\\ Support\u002FClaude\u002Fclaude_desktop_config.json`。\n* 按照上述说明，使用 `langgraph-docs-mcp` 进行更新。\n* 重启 Claude Desktop 应用程序。\n\n> [!注意]\n> 如果在尝试将 MCPDoc 工具添加到 Claude Desktop 时遇到 Python 版本不兼容的问题，可以在 `uvx` 命令中显式指定 `python` 可执行文件的路径。\n>\n> \u003Cdetails>\n> \u003Csummary>示例配置\u003C\u002Fsummary>\n>\n> ```\n> {\n>   \"mcpServers\": {\n>     \"langgraph-docs-mcp\": {\n>       \"command\": \"uvx\",\n>       \"args\": [\n>         \"--python\",\n>         \"\u002Fpath\u002Fto\u002Fpython\",\n>         \"--from\",\n>         \"mcpdoc\",\n>         \"mcpdoc\",\n>         \"--urls\",\n>         \"LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\",\n>         \"--transport\",\n>         \"stdio\"\n>       ]\n>     }\n>   }\n> }\n> ```\n> \u003C\u002Fdetails>\n\n> [!注意]\n> 目前（2025年3月21日）似乎 Claude Desktop 不支持全局规则的 `rules`，因此请在您的提示词末尾添加以下内容。\n\n```\n\u003Crules>\n对于任何关于 LangGraph 的问题，请使用 langgraph-docs-mcp 服务器来帮助解答——\n+ 调用 list_doc_sources 工具获取可用的 llms.txt 文件\n+ 调用 fetch_docs 工具读取该文件\n+ 思考 llms.txt 中的 URL\n+ 思考输入的问题\n+ 对与问题相关的任何 URL 调用 fetch_docs\n\u003C\u002Frules>\n```\n\n![截图 2025-03-18 下午 2:05:54](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_9de9066c60b7.png)\n\n* 您会看到工具出现在聊天输入框的右下角。\n\n![截图 2025-03-18 下午 2:05:39](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_aab755dec6f9.png)\n\n然后，尝试以下示例提示：\n\n* 在处理您的请求时，它会要求您批准工具调用。\n\n![截图 2025-03-18 下午 2:06:54](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_34e0ee3f5a34.png)\n\n### 连接到 Claude Code\n\n* 在安装了 [Claude Code](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fagents-and-tools\u002Fclaude-code\u002Foverview) 后，在终端中运行以下命令，将 MCP 服务器添加到您的项目中：\n```\nclaude mcp add-json langgraph-docs '{\"type\":\"stdio\",\"command\":\"uvx\" ,\"args\":[\"--from\", \"mcpdoc\", \"mcpdoc\", \"--urls\", \"langgraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\", \"LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\"]}' -s local\n```\n* 您会看到 `~\u002F.claude.json` 被更新。\n* 通过启动 Claude Code 并运行以下命令来测试以查看您的工具：\n```\n$ Claude\n$ \u002Fmcp \n```\n\n![截图 2025-03-18 下午 2:13:49](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_1df9fbbd2bfc.png)\n\n> [!注意]\n> 目前（2025年3月21日）似乎 Claude Code 不支持全局规则的 `rules`，因此请在您的提示词末尾添加以下内容。\n\n```\n\u003Crules>\n对于任何关于 LangGraph 的问题，请使用 langgraph-docs-mcp 服务器来帮助解答——\n+ 调用 list_doc_sources 工具获取可用的 llms.txt 文件\n+ 调用 fetch_docs 工具读取该文件\n+ 思考 llms.txt 中的 URL\n+ 思考输入的问题\n+ 对与问题相关的任何 URL 调用 fetch_docs\n\u003C\u002Frules>\n```\n\n然后，尝试以下示例提示：\n\n* 它会要求您批准工具调用。\n\n![截图 2025-03-18 下午 2:14:37](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_readme_bd4ca62abc24.png)\n\n## 命令行界面\n\n`mcpdoc` 命令提供了一个简单的 CLI，用于启动文档服务器。\n\n您可以采用三种方式指定文档源，并且这些方式可以组合使用：\n\n1. 使用 YAML 配置文件：\n\n* 这将从本仓库中的 `sample_config.yaml` 文件加载 LangGraph 的 Python 文档。\n\n```bash\nmcpdoc --yaml sample_config.yaml\n```\n\n2. 使用 JSON 配置文件：\n\n* 这将从本仓库中的 `sample_config.json` 文件加载 LangGraph 的 Python 文档。\n\n```bash\nmcpdoc --json sample_config.json\n```\n\n3. 直接指定 llms.txt 的 URL，可选地附带名称：\n\n* URL 可以直接指定为纯 URL，也可以使用 `名称:URL` 的格式指定带有名称的 URL。\n* 您可以通过多次使用 `--urls` 参数来指定多个 URL。\n* 这就是我们在上面为 MCP 服务器加载 `llms.txt` 的方式。\n\n```bash\nmcpdoc --urls LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt --urls LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\n```\n\n您还可以结合这些方法来合并文档来源：\n\n```bash\nmcpdoc --yaml sample_config.yaml --json sample_config.json --urls LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt --urls LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\n```\n\n## 其他选项\n\n- `--follow-redirects`: 跟随 HTTP 重定向（默认为 False）\n- `--timeout SECONDS`: HTTP 请求超时时间，单位为秒（默认为 10.0）\n\n带有附加选项的示例：\n\n```bash\nmcpdoc --yaml sample_config.yaml --follow-redirects --timeout 15\n```\n\n这将以 15 秒的超时时间加载 LangGraph 的 Python 文档，并在必要时跟随任何 HTTP 重定向。\n\n## 配置格式\n\nYAML 和 JSON 配置文件都应包含一个文档来源列表。\n\n每个来源必须包含一个 `llms_txt` URL，也可以选择性地包含一个 `name`：\n\n### YAML 配置示例（sample_config.yaml）\n\n```yaml\n# mcp-mcpdoc 服务器的示例配置\n# 每个条目必须包含一个 llms_txt URL，可选地附带名称\n- name: LangGraph Python\n  llms_txt: https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\n```\n\n### JSON 配置示例（sample_config.json）\n\n```json\n[\n  {\n    \"name\": \"LangGraph Python\",\n    \"llms_txt\": \"https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\"\n  }\n]\n```\n\n## 程序化使用\n\n```python\nfrom mcpdoc.main import create_server\n\n# 创建一个包含文档来源的服务器\nserver = create_server(\n    [\n        {\n            \"name\": \"LangGraph Python\",\n            \"llms_txt\": \"https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\",\n        },\n        # 您可以添加多个文档来源\n        # {\n        #     \"name\": \"另一个文档\",\n        #     \"llms_txt\": \"https:\u002F\u002Fexample.com\u002Fllms.txt\",\n        # },\n    ],\n    follow_redirects=True,\n    timeout=15.0,\n)\n\n# 运行服务器\nserver.run(transport=\"stdio\")\n```","# mcpdoc 快速上手指南\n\nmcpdoc 是一个基于 MCP (Model Context Protocol) 的开源文档服务器，旨在让 Cursor、Windsurf、Claude Code\u002FDesktop 等 AI 开发工具能够安全、可控地读取 `llms.txt` 索引文件及其指向的详细文档。通过它，你可以审计每一次工具调用和返回的上下文内容。\n\n## 环境准备\n\n*   **操作系统**: macOS, Linux, Windows (需支持 bash 或相应终端)\n*   **前置依赖**: \n    *   需要安装 `uv` (Python 包管理器和运行环境)。\n    *   目标 AI 编辑器\u002F工具：Cursor, Windsurf, Claude Desktop, 或 Claude Code。\n\n## 安装步骤\n\n### 1. 安装 uv\n推荐使用官方脚本安装 `uv`：\n\n```bash\ncurl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh\n```\n\n> **注意**：安装完成后，请确保终端能识别 `uv` 和 `uvx` 命令（可能需要重启终端或执行 `source ~\u002F.bashrc` \u002F `source ~\u002F.zshrc`）。\n\n### 2. 验证安装\n无需额外安装 mcpdoc 包，`uvx` 会自动按需拉取。你可以通过以下命令测试服务是否可启动：\n\n```bash\nuvx --from mcpdoc mcpdoc --help\n```\n\n## 基本使用\n\n### 场景一：本地测试与调试\n在将服务集成到 IDE 之前，建议先在本地运行并测试。\n\n1.  **启动服务器**：\n    指定一个或多个 `llms.txt` 地址（格式为 `名称:URL`），并开启 SSE 传输模式：\n\n    ```bash\n    uvx --from mcpdoc mcpdoc \\\n        --urls \"LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\" \"LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\" \\\n        --transport sse \\\n        --port 8082 \\\n        --host localhost\n    ```\n\n2.  **使用 MCP Inspector 测试**：\n    新开一个终端窗口，运行检查器并连接本地服务：\n\n    ```bash\n    npx @modelcontextprotocol\u002Finspector\n    ```\n    在浏览器打开 Inspector 页面，连接 `http:\u002F\u002Flocalhost:8082`，即可测试 `list_doc_sources` 和 `fetch_docs` 工具。\n\n---\n\n### 场景二：集成到 Cursor\n\n1.  **配置 MCP 服务器**：\n    打开 Cursor 设置 -> `MCP` 标签页，点击编辑 `~\u002F.cursor\u002Fmcp.json`，填入以下内容：\n\n    ```json\n    {\n      \"mcpServers\": {\n        \"langgraph-docs-mcp\": {\n          \"command\": \"uvx\",\n          \"args\": [\n            \"--from\",\n            \"mcpdoc\",\n            \"mcpdoc\",\n            \"--urls\",\n            \"LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\",\n            \"--transport\",\n            \"stdio\"\n          ]\n        }\n      }\n    }\n    ```\n\n2.  **设置全局规则 (User Rules)**：\n    进入 `Settings` -> `Rules` -> `User Rules`，添加以下提示词以引导 AI 正确使用工具：\n\n    ```text\n    for ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- \n    + call list_doc_sources tool to get the available llms.txt file\n    + call fetch_docs tool to read it\n    + reflect on the urls in llms.txt \n    + reflect on the input question \n    + call fetch_docs on any urls relevant to the question\n    + use this to answer the question\n    ```\n\n3.  **开始使用**：\n    按 `CMD+L` (Mac) 打开聊天窗口，确保选中 `agent` 模式，然后提问，例如：`what are types of memory in LangGraph?`\n\n---\n\n### 场景三：集成到 Windsurf\n\n1.  **配置 MCP**：\n    按 `CMD+L` 打开 Cascade，点击 `Configure MCP`，编辑 `~\u002F.codeium\u002Fwindsurf\u002Fmcp_config.json`，内容与 Cursor 配置相同。\n\n2.  **设置规则**：\n    在 `Windsurf Rules\u002FGlobal rules` 中添加与上述相同的规则提示词。\n\n---\n\n### 场景四：集成到 Claude Desktop\n\n1.  **配置文件**：\n    编辑 `~\u002FLibrary\u002FApplication\\ Support\u002FClaude\u002Fclaude_desktop_config.json` (Mac) 或对应路径，添加服务器配置（同上）。\n    *注：若遇到 Python 版本问题，可在 args 中显式指定 python 路径：`\"--python\", \"\u002Fpath\u002Fto\u002Fpython\"`。*\n\n2.  **重启应用**：\n    完全重启 Claude Desktop。\n\n3.  **使用提示**：\n    目前 Claude Desktop 不支持全局规则文件，需在每次对话时手动附加规则：\n\n    ```text\n    \u003Crules>\n    for ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- \n    + call list_doc_sources tool to get the available llms.txt file\n    + call fetch_docs tool to read it\n    + reflect on the urls in llms.txt \n    + reflect on the input question \n    + call fetch_docs on any urls relevant to the question\n    \u003C\u002Frules>\n    ```\n\n---\n\n### 场景五：集成到 Claude Code\n\n1.  **添加服务器**：\n    在终端运行以下命令将服务器添加到当前项目：\n\n    ```bash\n    claude mcp add-json langgraph-docs '{\"type\":\"stdio\",\"command\":\"uvx\" ,\"args\":[\"--from\", \"mcpdoc\", \"mcpdoc\", \"--urls\", \"langgraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\", \"LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\"]}' -s local\n    ```\n\n2.  **验证**：\n    启动 `claude`，输入 `\u002Fmcp` 查看已加载的工具。使用时同样需要在 Prompt 中附带 `\u003Crules>` 块（参考 Claude Desktop 部分）。\n\n## 安全与域控制说明\n\nmcpdoc 实施了严格的域名访问控制以保障安全：\n\n*   **远程文件**：若指定远程 `llms.txt` URL，仅该 URL 所在的域名会被自动加入白名单。\n*   **本地文件**：若使用本地文件，**不会**自动添加任何域名。你必须通过 `--allowed-domains` 参数显式指定允许的域名。\n    *   指定特定域名：`--allowed-domains example.com other.org`\n    *   允许所有域名（慎用）：`--allowed-domains '*'`\n\n## 高级配置选项\n\n除了直接在命令行指定 `--urls`，还支持通过配置文件加载：\n\n*   **YAML 配置**: `mcpdoc --yaml sample_config.yaml`\n*   **JSON 配置**: `mcpdoc --json sample_config.json`\n*   **混合模式**: 可同时使用多种方式的参数进行合并。\n\n**其他常用参数**：\n*   `--follow-redirects`: 跟随 HTTP 重定向。\n*   `--timeout SECONDS`: 设置请求超时时间（默认 10.0 秒）。\n\n示例：\n```bash\nmcpdoc --yaml sample_config.yaml --follow-redirects --timeout 15\n```","一位后端工程师正在使用 Cursor 集成 LangGraph 构建复杂的智能体工作流，需要频繁查阅官方文档以确认节点状态和边定义的正确用法。\n\n### 没有 mcpdoc 时\n- **上下文获取不透明**：IDE 内置的文档读取机制像“黑盒”，开发者无法知晓 AI 具体引用了哪些文档片段，难以判断回答是否基于最新资料。\n- **跨库检索困难**：同时涉及 LangGraph 和 LangChain 多个库时，手动切换网页查找或拼凑上下文效率极低，容易遗漏关键参数说明。\n- **安全审计缺失**：无法限制 AI 访问的域名范围，存在模型意外抓取不可信第三方站点内容导致代码建议偏差的风险。\n- **调试成本高**：当 AI 给出错误实现方案时，难以回溯其参考源，排查是文档版本问题还是模型理解偏差耗时费力。\n\n### 使用 mcpdoc 后\n- **过程完全可控**：通过 `fetch_docs` 工具明确调用链，开发者可在 MCP Inspector 中实时审计每一次文档获取请求及返回的具体上下文。\n- **多源一键整合**：启动时直接配置 LangGraph 与 LangChain 的 `llms.txt` 索引，mcpdoc 自动将多库文档统一暴露给 IDE，AI 能跨库精准关联知识。\n- **域访问严格隔离**：利用 `--allowed-domains` 参数仅授权官方域名，从根源阻断对非信任站点的访问，确保训练数据源的纯净与安全。\n- **问题快速定位**：遇到异常输出时，可直接查看工具日志中命中的文档段落，迅速验证是文档更新滞后还是提示词引导不足。\n\nmcpdoc 通过将文档索引权交还开发者，实现了 AI 编程中上下文获取的透明化、安全化与高效化。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flangchain-ai_mcpdoc_6a5e655d.png","langchain-ai","LangChain","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Flangchain-ai_8e6aaeef.png","",null,"support@langchain.dev","https:\u002F\u002Fwww.langchain.com","https:\u002F\u002Fgithub.com\u002Flangchain-ai",[23,27],{"name":24,"color":25,"percentage":26},"Python","#3572A5",91.8,{"name":28,"color":29,"percentage":30},"Makefile","#427819",8.2,978,119,"2026-04-19T15:47:39","MIT",2,"Linux, macOS, Windows","未说明",{"notes":39,"python":40,"dependencies":41},"该工具是一个基于 MCP 协议的文档服务器，主要用于让 AI 编辑器（如 Cursor、Windsurf、Claude Desktop\u002FCode）读取 llms.txt 索引文件。核心依赖是 'uv' 包管理器，通过 'uvx' 命令直接运行，无需安装重型深度学习框架或 GPU。具有严格的域名访问控制安全机制，使用本地文件时需手动指定允许访问的域名。","3.8+ (通过 uv 管理，可显式指定 Python 路径)",[42,6],"uv",[44,45,46],"视频","Agent","语言模型",[48,49,50,51,52,53],"agents","claude-code","cursor","ide","llms","llms-txt","ready","2026-03-27T02:49:30.150509","2026-04-20T20:34:08.996597",[58,63,68,73,78,83],{"id":59,"question_zh":60,"answer_zh":61,"source_url":62},45711,"如何在配置中正确指定多个 llms.txt URL？","在配置 `--urls` 参数时，需要将多个 URL 放在同一个字符串参数中，用空格分隔，而不是分成多个 `--urls` 参数。正确的配置格式如下：\n\n```json\n{\n  \"mcpServers\": {\n    \"langgraph-docs-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"--from\",\n        \"mcpdoc\",\n        \"mcpdoc\",\n        \"--urls\",\n        \"LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\",\n        \"--transport\",\n        \"stdio\"\n      ]\n    }\n  }\n}\n```\n\n或者使用逗号分隔的格式（部分用户反馈有效）：\n`\"LangGraph:URL1,LangChain:URL2\"`","https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fissues\u002F21",{"id":64,"question_zh":65,"answer_zh":66,"source_url":67},45712,"遇到 'URL not allowed' 错误提示怎么办？","这是由服务器的安全域名白名单机制引起的。你需要在启动服务器时通过 `--allowed-domains` 参数显式指定允许的域名。\n\n如果你是在本地运行且不需要限制内部服务器访问，可以使用通配符允许所有域名：\n`--allowed-domains *`\n\n如果需要指定特定域名，可以多次使用该参数：\n`--allowed-domains domain1.com --allowed-domains domain2.com`","https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fissues\u002F18",{"id":69,"question_zh":70,"answer_zh":71,"source_url":72},45713,"为什么获取文档链接时一直显示 'Redirecting...' 而无法获取内容？","这通常是因为文档源（如 LangGraph）进行了重组，但 `llms.txt` 文件中的链接尚未更新，导致重定向失效或循环。\n\n解决方案：\n1. 等待维护者更新 `llms.txt` 文件以匹配新的文档结构（维护者通常会尽快修复）。\n2. 检查是否已启用 `--follow-redirects` 参数（虽然在此特定案例中主要是源文件链接过时的问题）。\n3. 如果问题持续，可以尝试手动检查 `llms.txt` 中的链接是否有效。","https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fissues\u002F32",{"id":74,"question_zh":75,"answer_zh":76,"source_url":77},45714,"MCP 服务器的权限配置是否安全？需要哪些权限？","该 MCP 服务器所需的权限类别是正确的，但默认行为是受限的（Opt-in）：\n\n1. **网络请求 (`mcp.ac.network.client`)**：出站请求仅限于预指定的域名列表。\n2. **文件系统 (`mcp.ac.filesystem.read`)**：默认不可用，仅当用户显式提供特定文件路径时才允许读取。\n3. **重定向**：默认不跟随重定向。\n4. **服务器 (`mcp.ac.network.server`)**：适用于所有 MCP 服务器，生产环境中建议配合网络隔离使用。\n\n因此，生成的权限清单虽然看起来宽泛，但实际运行时受到严格约束。","https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fissues\u002F45",{"id":79,"question_zh":80,"answer_zh":81,"source_url":82},45715,"如何在 Cursor 或其他 AI 编辑器中优化对 LangChain 和 LangGraph 文档的检索？","由于代码代理在面对多个 `llms.txt` 文件时可能表现不佳，建议在 Cursor 的规则（Rules）中添加强制的提示词，明确指定不同问题对应的文档源。示例规则如下：\n\n```\nuse the langgraph-docs-mcp server to help answer questions -- \n+ for LangGraph questions use LangGraph:https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002Fllms.txt\n+ for LangChain questions use LangChain:https:\u002F\u002Fpython.langchain.com\u002Fllms.txt\n+ call list_doc_sources tool to get the available llms.txt file\n+ call fetch_docs tool to read it\n+ reflect on the urls in llms.txt \n+ reflect on the input question \n+ call fetch_docs on any urls relevant to the question\n+ use this to answer the question\n```\n\n这样可以引导代理正确选择数据源并执行检索步骤。","https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fissues\u002F7",{"id":84,"question_zh":85,"answer_zh":86,"source_url":87},45716,"Codex 或 GitHub Copilot 支持使用该 MCP 服务器吗？","是的，支持。因为该工具基于标准的 Model Context Protocol (MCP) 构建，任何支持 MCP 协议的客户端（包括 Codex、GitHub Copilot、Cursor、Windsurf 等）都可以直接使用。\n\n使用方法：\n1. 按照 README 文档启动 MCP 服务器。\n2. 在你的 AI 编辑器或客户端配置中连接到该 MCP 服务器即可。","https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fissues\u002F49",[89,94,99,104,109,114,119,124,129,134],{"id":90,"version":91,"summary_zh":92,"released_at":93},360659,"mcpdoc==0.0.10","## 变更内容\n* 更新 README.md，由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F37 中完成\n* 修复：处理客户端元刷新重定向，由 @aliyanishfaq 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F40 中完成\n* 发布 0.10.0 版本，由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F41 中完成\n\n## 新贡献者\n* @aliyanishfaq 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F40 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fcompare\u002Fmcpdoc==0.0.9...mcpdoc==0.0.10","2025-07-22T20:24:22",{"id":95,"version":96,"summary_zh":97,"released_at":98},360660,"mcpdoc==0.0.9","## 变更内容\n* 修复(mcpdoc): 更新 README 中的 CLI 示例和 MCP JSON 文件。由 @larsenweigle 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F22 中完成。\n* CI: 配置 pytest。由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F24 中完成。\n* mcpdoc: 根据可用工具更新服务器描述。由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F35 中完成。\n* 发布版本 0.0.9。由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F36 中完成。\n\n## 新贡献者\n* @larsenweigle 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F22 中做出了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fcompare\u002Fmcpdoc==0.0.8...mcpdoc==0.0.9","2025-07-07T21:04:55",{"id":100,"version":101,"summary_zh":102,"released_at":103},360661,"mcpdoc==0.0.8","## 变更内容\n* 更新 README.md，由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F15 中完成\n* README：添加多个 URL 示例，由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F16 中完成\n* 修复：设置传播问题，由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F19 中完成\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fcompare\u002Fmcpdoc==0.0.7...mcpdoc==0.0.8","2025-03-31T15:45:27",{"id":105,"version":106,"summary_zh":107,"released_at":108},360662,"mcpdoc==0.0.7","## 变更内容\n* 由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F13 中更新了 uv 锁文件\n* 由 @rlancemartin 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F14 中添加了本地 llms.txt 文件的读取功能\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fcompare\u002Fmcpdoc==0.0.6...mcpdoc==0.0.7","2025-03-27T17:25:01",{"id":110,"version":111,"summary_zh":112,"released_at":113},360663,"mcpdoc==0.0.6","## 变更内容\n* 由 @vbarda 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F10 中更新配置 README 文件\n* 由 @vbarda 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F9 中使用集合来管理允许的域名\n* 由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F11 中添加允许域名的命令行选项\n* 由 @eyurtsev 发布版本 0.0.6，链接为 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F12\n\n## 新贡献者\n* @vbarda 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F10 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fcompare\u002Fmcpdoc==0.0.5...mcpdoc==0.0.6","2025-03-24T14:19:48",{"id":115,"version":116,"summary_zh":117,"released_at":118},360664,"mcpdoc==0.0.5","## 变更内容\n* 由 @rlancemartin 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F5 中更新了 README\n* 由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F6 中更新了 README.md\n* 发布 0.0.5 版本：由 @rlancemartin 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F8 中更新并改进了工具描述\n\n## 新贡献者\n* @rlancemartin 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F5 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fcompare\u002Fmcpdoc==0.0.4...mcpdoc==0.0.5","2025-03-21T18:41:42",{"id":120,"version":121,"summary_zh":122,"released_at":123},360665,"mcpdoc==0.0.4","## 变更内容\n* 默认为 SSE 添加 info 级别日志，由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F4 中完成\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fcompare\u002Fmcpdoc==0.0.3...mcpdoc==0.0.4","2025-03-18T20:39:53",{"id":125,"version":126,"summary_zh":127,"released_at":128},360666,"mcpdoc==0.0.3","## 变更内容\n* 版本 0.0.3，由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F3 中发布\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fcompare\u002Fmcpdoc==0.0.2...mcpdoc==0.0.3","2025-03-18T17:33:14",{"id":130,"version":131,"summary_zh":132,"released_at":133},360667,"mcpdoc==0.0.2","## 变更内容\n* mcp：修复传输选项，允许通过主机和端口进行指定，由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F1 中完成\n* 添加 MIT 许可证，由 @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F2 中完成\n\n## 新贡献者\n* @eyurtsev 在 https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fpull\u002F1 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fcompare\u002Fmcpdoc==0.0.1...mcpdoc==0.0.2","2025-03-18T17:06:15",{"id":135,"version":136,"summary_zh":137,"released_at":138},360668,"mcpdoc==0.0.1","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fmcpdoc\u002Fcommits\u002Fmcpdoc==0.0.1","2025-03-18T03:37:11",[140,152,161,169,177,185],{"id":141,"name":142,"github_repo":143,"description_zh":144,"stars":145,"difficulty_score":146,"last_commit_at":147,"category_tags":148,"status":54},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[45,149,150,151],"开发框架","图像","数据工具",{"id":153,"name":154,"github_repo":155,"description_zh":156,"stars":157,"difficulty_score":35,"last_commit_at":158,"category_tags":159,"status":54},9989,"n8n","n8n-io\u002Fn8n","n8n 是一款面向技术团队的公平代码（fair-code）工作流自动化平台，旨在让用户在享受低代码快速构建便利的同时，保留编写自定义代码的灵活性。它主要解决了传统自动化工具要么过于封闭难以扩展、要么完全依赖手写代码效率低下的痛点，帮助用户轻松连接 400 多种应用与服务，实现复杂业务流程的自动化。\n\nn8n 特别适合开发者、工程师以及具备一定技术背景的业务人员使用。其核心亮点在于“按需编码”：既可以通过直观的可视化界面拖拽节点搭建流程，也能随时插入 JavaScript 或 Python 代码、调用 npm 包来处理复杂逻辑。此外，n8n 原生集成了基于 LangChain 的 AI 能力，支持用户利用自有数据和模型构建智能体工作流。在部署方面，n8n 提供极高的自由度，支持完全自托管以保障数据隐私和控制权，也提供云端服务选项。凭借活跃的社区生态和数百个现成模板，n8n 让构建强大且可控的自动化系统变得简单高效。",184740,"2026-04-19T23:22:26",[151,149,45,150,160],"插件",{"id":162,"name":163,"github_repo":164,"description_zh":165,"stars":166,"difficulty_score":146,"last_commit_at":167,"category_tags":168,"status":54},10095,"AutoGPT","Significant-Gravitas\u002FAutoGPT","AutoGPT 是一个旨在让每个人都能轻松使用和构建 AI 的强大平台，核心功能是帮助用户创建、部署和管理能够自动执行复杂任务的连续型 AI 智能体。它解决了传统 AI 应用中需要频繁人工干预、难以自动化长流程工作的痛点，让用户只需设定目标，AI 即可自主规划步骤、调用工具并持续运行直至完成任务。\n\n无论是开发者、研究人员，还是希望提升工作效率的普通用户，都能从 AutoGPT 中受益。开发者可利用其低代码界面快速定制专属智能体；研究人员能基于开源架构探索多智能体协作机制；而非技术背景用户也可直接选用预置的智能体模板，立即投入实际工作场景。\n\nAutoGPT 的技术亮点在于其模块化“积木式”工作流设计——用户通过连接功能块即可构建复杂逻辑，每个块负责单一动作，灵活且易于调试。同时，平台支持本地自托管与云端部署两种模式，兼顾数据隐私与使用便捷性。配合完善的文档和一键安装脚本，即使是初次接触的用户也能在几分钟内启动自己的第一个 AI 智能体。AutoGPT 正致力于降低 AI 应用门槛，让人人都能成为 AI 的创造者与受益者。",183572,"2026-04-20T04:47:55",[45,46,160,149,150],{"id":170,"name":171,"github_repo":172,"description_zh":173,"stars":174,"difficulty_score":146,"last_commit_at":175,"category_tags":176,"status":54},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[149,150,45],{"id":178,"name":179,"github_repo":180,"description_zh":181,"stars":182,"difficulty_score":35,"last_commit_at":183,"category_tags":184,"status":54},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",161692,"2026-04-20T11:33:57",[149,45,46],{"id":186,"name":187,"github_repo":188,"description_zh":189,"stars":190,"difficulty_score":191,"last_commit_at":192,"category_tags":193,"status":54},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[45,160]]