MCP Server for Documentation Processing logo

MCP Server for Documentation Processing

by Rybens92

The MCP server processes technical documentation into llm.txt format, which can be used as context for LLMs. It supports environments like Cursor, Windsurf, Cline or Roo Code.

View on GitHub

Last updated: N/A

MCP Server for Documentation Processing

MCP server that processes technical documentation into llm.txt format, which can be used as context for LLMs in environments like Cursor, Windsurf, Cline or Roo Code.

Requirements

  • Python 3.7+
  • uv (recommended) or pip

Download repository

Before using the MCP server, you need to clone the repository from GitHub:

git clone https://github.com/Rybens92/docs-to-llm.txt_generator /your/chosen/directory

Then update the path in mcp_settings.json configuration:

"args": [
  "/your/path/to/this/mcp/server/src/server.py"
]

Replace /your/path/to/this/mcp/server with the actual path where you cloned the repository.

Installation

Using uv (recommended):

uv pip install -r requirements.txt

Or using pip:

pip install -r requirements.txt

=======

Running

Development mode (recommended for testing)

fastmcp dev src/server.py

Installation in Claude Desktop

fastmcp install src/server.py

Direct execution

python src/server.py

Usage in Roo Code or Cline

mcp_settings.json configuration

Add the following configuration to mcp_settings.json in Roo Code or Cline:

{
  "mcpServers": {
    "docs-to-llm": {
      "command": "python",
      "args": [
        "/your/path/to/this/mcp/server/src/server.py"
      ],
      "disabled": false
    }
  }
}

Remember to replace "/your/path/to/this/mcp/server" with the actual path to your project directory.

Example usage

After configuration, you can use the server like this:

<use_mcp_tool>
<server_name>docs-to-llm</server_name>
<tool_name>process_documentation</tool_name>
<arguments>
{
  "url": "https://example.com/docs",
  "library_name": "example_lib",
  "txt_save_path": "/path/to/save/directory"
}
</arguments>
</use_mcp_tool>

The server will generate two files:

  • llm_{library_name}_short.txt - contains only titles and links to documentation
  • llm_{library_name}_full.txt - contains full documentation content

Available Tools

process_documentation

Processes documentation from the given URL.

Parameters:

  • url (string) - URL to the documentation page
  • library_name (string) - Name of the library (used in output filenames)
  • txt_save_path (string) - Path where to save the output files

Returns:

  • success (boolean) - operation status
  • message (string) - result information
  • files (object) - paths to generated files with keys "short" and "full"

Features

  • Automatic detection of documentation navigation sections
  • Conversion of relative to absolute URLs
  • Removal of unnecessary HTML elements (scripts, styles, menus)
  • Progress reporting during processing
  • Detailed error logging
  • Smart scoring system to find relevant documentation links
  • Fallback mechanisms when automatic detection fails
  • Sanitized filenames based on library names