MCP LLMS-TXT Documentation Server logo

MCP LLMS-TXT Documentation Server

by langchain-ai

The MCP LLMS-TXT Documentation Server provides an open-source MCP server that allows developers to have full control over tools used by applications like Cursor, Windsurf, and Claude Code/Desktop to retrieve context from llms.txt files. It offers a user-defined list of llms.txt files and a simple `fetch_docs` tool to read URLs within those files, enabling auditing of tool calls and returned context.

View on GitHub

Last updated: N/A

What is MCP LLMS-TXT Documentation Server?

The MCP LLMS-TXT Documentation Server is an open-source implementation of an MCP server that serves documentation to MCP host applications like Cursor, Windsurf, and Claude Code/Desktop. It uses llms.txt files to index LLMs and provides a fetch_docs tool to retrieve context from URLs within those files.

How to use MCP LLMS-TXT Documentation Server?

To use the server, first install uv. Then, choose an llms.txt file to use. You can then run the server locally using the provided uvx command. Next, connect to applications like Cursor, Windsurf, Claude Code/Desktop by updating their configuration files with the server details. Finally, update the rules in these applications to use the server for questions about specific libraries.

Key features of MCP LLMS-TXT Documentation Server

  • Provides full control over tools used for context retrieval.

  • Allows auditing of tool calls and returned context.

  • Supports user-defined lists of llms.txt files.

  • Offers a simple fetch_docs tool to read URLs.

  • Includes command-line interface for easy configuration and deployment.

Use cases of MCP LLMS-TXT Documentation Server

  • Providing context to IDEs (Cursor, Windsurf) for code completion and documentation.

  • Enabling Claude Code/Desktop to access documentation for answering questions.

  • Auditing and controlling the context retrieval process in LLM-powered applications.

  • Serving documentation for LangGraph and LangChain libraries.

  • Customizing documentation sources for specific projects.

FAQ from MCP LLMS-TXT Documentation Server

What is llms.txt?

llms.txt is a website index for LLMs, providing background information, guidance, and links to detailed markdown files.

What is MCP?

MCP (Model Context Protocol) offers a way for developers to have full control over tools used by applications to retrieve context.

How do I install uv?

Please see the official uv docs for installation instructions.

How do I specify which domains are allowed for fetching documentation?

Use the --allowed-domains parameter when running the server. You can specify specific domains or use '*' to allow all domains (use with caution).

Can I use a local llms.txt file?

Yes, but 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.