MCP LLMS-TXT Documentation Server

MCP LLMS-TXT Documentation Server

site icon
2025.03.22 8
Python文档管理开发工具开发效率
MCP LLMS-TXT Documentation Server 是一个开源MCP服务器,旨在为开发者提供对LLMs(大型语言模型)相关文档的完全控制。它允许用户定义和管理`llms.txt`文件列表,并通过简单的`fetch_docs`工具读取这些文件中的URL内容。该服务器支持多种IDE和应用程序(如Cursor、Windsurf、Claude Code/Desktop等),使用户能够审计每个工具调用和返回的上下文。
View on GitHub

Overview

基本能力

产品定位

MCP LLMS-TXT Documentation Server 是一个开源MCP服务器,旨在为开发者提供对LLMs(大型语言模型)相关文档的完全控制。

核心功能

  1. 用户定义的llms.txt文件列表:允许用户指定和管理多个llms.txt文件。
  2. fetch_docs工具:读取llms.txt文件中的URL内容。
  3. 多平台支持:支持Cursor、Windsurf、Claude Code/Desktop等IDE和应用程序。
  4. 审计功能:用户可以审计每个工具调用和返回的上下文。
  5. 多种配置方式:支持YAML、JSON配置文件和直接指定URL。

适用场景

  1. 开发者在IDE中查询LLMs相关文档:如Cursor、Windsurf等。
  2. 自动化文档检索:通过Claude Code/Desktop等应用程序自动获取文档内容。
  3. 文档审计:开发者需要审计工具调用和返回的上下文。

工具列表

  1. fetch_docs工具:读取llms.txt文件中的URL内容。
  2. list_doc_sources工具:获取可用的llms.txt文件列表。

常见问题解答

  1. 如何安装uv:请参考官方文档
  2. 如何测试MCP服务器?:使用uvx命令启动服务器,并通过MCP inspector连接。
  3. 如何配置Cursor?:在Cursor Settings的MCP标签中更新~/.cursor/mcp.json文件。

使用教程

使用依赖

安装uv

curl -LsSf https://astral.sh/uv/install.sh | sh

安装教程

  1. 选择一个llms.txt文件,例如LangGraph的llms.txt
  2. 测试MCP服务器:
uvx --from mcpdoc mcpdoc \
    --urls LangGraph:https://langchain-ai.github.io/langgraph/llms.txt \
    --transport sse \
    --port 8082 \
    --host localhost
  1. 运行MCP inspector:
npx @modelcontextprotocol/inspector

调试方式

  1. 在Cursor中配置MCP服务器:
{
  "mcpServers": {
    "langgraph-docs-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "mcpdoc",
        "mcpdoc",
        "--urls",
        "LangGraph:https://langchain-ai.github.io/langgraph/llms.txt",
        "--transport",
        "stdio",
        "--port",
        "8081",
        "--host",
        "localhost"
      ]
    }
  }
}
  1. 在Cursor中测试工具调用:
use the langgraph-docs-mcp server to answer any LangGraph questions -- 
+ call list_doc_sources tool to get the available llms.txt file
+ call fetch_docs tool to read it
+ reflect on the urls in llms.txt 
+ reflect on the input question 
+ call fetch_docs on any urls relevant to the question
+ use this to answer the question

what are types of memory in LangGraph?

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。