langchain-ai/mcpdoc

Expose llms-txt to IDEs for development

What it solves

Many AI-powered IDEs and agents (like Cursor, Windsurf, and Claude Code) use llms.txt files to retrieve documentation context. However, the built-in retrieval processes in these apps are often opaque, making it difficult for users to audit tool calls or verify the exact context being provided to the LLM.

How it works

mcpdoc is an open-source Model Context Protocol (MCP) server that gives users full control over how documentation is retrieved. It allows users to define a list of llms.txt files and provides a fetch_docs tool that the AI agent can use to read URLs within those files.

The server implements strict domain access controls to ensure security: remote llms.txt files automatically allow their own domain, while local files require the user to explicitly specify allowed domains via the --allowed-domains parameter.

Who it’s for

Developers using MCP-compatible AI agents or IDEs (such as Cursor, Windsurf, and Claude Desktop/Code) who want a transparent, auditable retrieval process for technical documentation.

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.