langchain-ai/mcpdoc

Expose llms-txt to IDEs for development

What it solves

许多 AI 驱动的 IDE 和 agent (例如 Cursor, Windsurf, 和 Claude Code) 使用 llms.txt 文件来获取文档上下文。然而,这些应用内置的检索过程通常是不透明的,使得用户很难审计工具调用或验证提供给 LLM 的确切上下文。

How it works

mcpdoc 是一个开源的 Model Context Protocol (MCP) 服务器,为用户提供对文档检索方式的完全控制权。它允许用户定义一个 llms.txt 文件列表,并提供一个 fetch_docs 工具,AI agent 可以使用该工具来读取文件中的 URL。

Who it’s for

使用 MCP 兼容的 AI agent 或 IDE (例如 Cursor, Windsurf, 和 Claude Code) 的开发者,他们希望为技术文档获取过程提供透明、可审计的检索过程。

Highlights

  • MCP Integration: Seamlessly connects to popular AI tools like Cursor, Windsurf, and Claude.
  • Flexible Configuration: Documentation sources can be provided via YAML, JSON, or direct CLI arguments.
  • Security-First: Includes domain access controls to prevent unauthorized fetching from untrusted sources.
  • Auditable Retrieval: Allows users to see exactly which documentation pages are being fetched and read by the AI agent.