Docs To Llm

by Rybens92

2 167 downloads Not rated yet
GitHub

About

# 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…

Explore

- 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

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Docs To Llm
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Python 3.7+
- uv (recommended) or pip

fastmcp install src/server.py

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.

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

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

McpServers

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

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

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.