
MCP LLMS-TXT Documentation Server

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(大型语言模型)相关文档的完全控制。
核心功能
- 用户定义的
llms.txt
文件列表:允许用户指定和管理多个llms.txt
文件。 fetch_docs
工具:读取llms.txt
文件中的URL内容。- 多平台支持:支持Cursor、Windsurf、Claude Code/Desktop等IDE和应用程序。
- 审计功能:用户可以审计每个工具调用和返回的上下文。
- 多种配置方式:支持YAML、JSON配置文件和直接指定URL。
适用场景
- 开发者在IDE中查询LLMs相关文档:如Cursor、Windsurf等。
- 自动化文档检索:通过Claude Code/Desktop等应用程序自动获取文档内容。
- 文档审计:开发者需要审计工具调用和返回的上下文。
工具列表
fetch_docs
工具:读取llms.txt
文件中的URL内容。list_doc_sources
工具:获取可用的llms.txt
文件列表。
常见问题解答
- 如何安装
uv
?:请参考官方文档。 - 如何测试MCP服务器?:使用
uvx
命令启动服务器,并通过MCP inspector连接。 - 如何配置Cursor?:在Cursor Settings的MCP标签中更新
~/.cursor/mcp.json
文件。
使用教程
使用依赖
安装uv
:
curl -LsSf https://astral.sh/uv/install.sh | sh
安装教程
- 选择一个
llms.txt
文件,例如LangGraph的llms.txt
。 - 测试MCP服务器:
uvx --from mcpdoc mcpdoc \
--urls LangGraph:https://langchain-ai.github.io/langgraph/llms.txt \
--transport sse \
--port 8082 \
--host localhost
- 运行MCP inspector:
npx @modelcontextprotocol/inspector
调试方式
- 在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"
]
}
}
}
- 在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?