damionrashford/llms-txt-generator-mcp
If you are the rightful owner of llms-txt-generator-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The LLMs.txt Generator is a powerful MCP server designed to automatically generate `llms.txt` and `llms-full.txt` files for websites, adhering to the llmstxt.org specification.
LLMs.txt Generator
A powerful MCP (Model Context Protocol) server that automatically generates llms.txt
and llms-full.txt
files for any website, following the llmstxt.org specification.
š Quick Start - Install in Cursor
Option 1: One-Click Installation (Recommended)
Note: The one-click installation requires you to have the repository cloned locally. After cloning, you can create your own deeplink.
-
Clone the repository:
git clone https://github.com/damionrashford/llms-txt-generator-mcp.git cd llms-txt-generator-mcp
-
Create your deeplink:
Replace
/path/to/your/llms-txt-generator-mcp
with your actual path in this configuration:{ "llms-txt-generator": { "command": "python3", "args": ["/path/to/your/llms-txt-generator-mcp/server.py"], "env": { "PYTHONPATH": "/path/to/your/llms-txt-generator-mcp", "LOG_LEVEL": "INFO" }, "timeout": 60000, "initTimeout": 15000, "stderr": "inherit" } }
-
Generate the deeplink:
- Copy the JSON configuration above
- Replace
/path/to/your/llms-txt-generator-mcp
with your actual path - Base64 encode the JSON
- Create the deeplink:
cursor://anysphere.cursor-deeplink/mcp/install?name=llms-txt-generator&config=YOUR_BASE64_CONFIG
-
Click the deeplink to install in Cursor
Option 2: Manual Installation
-
Clone the repository:
git clone https://github.com/damionrashford/llms-txt-generator-mcp.git cd llms-txt-generator-mcp
-
Set up the environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -e .
-
Add to Cursor's MCP configuration:
Open
~/.cursor/mcp.json
(create if it doesn't exist) and add:{ "mcpServers": { "llms-txt-generator": { "command": "python3", "args": ["/path/to/your/llms-txt-generator-mcp/server.py"], "env": { "PYTHONPATH": "/path/to/your/llms-txt-generator-mcp", "LOG_LEVEL": "INFO" }, "timeout": 60000, "initTimeout": 15000, "stderr": "inherit" } } }
-
Restart Cursor to load the new MCP server.
š ļø Usage
Once installed, you can use the generate_llms_txt
tool in Cursor:
Supported URL Formats:
https://example.com
@https://example.com
(with @ prefix)example.com
(auto-adds https://)- Local file paths
Example Usage:
Generate LLMs.txt for https://gofastmcp.com/clients/roots
The tool will generate:
llms.txt
: Clean, structured documentationllms-full.txt
: Full content with HTMLdocumentation_data.json
: Structured data for programmatic use
š Features
- ā Automatic Page Discovery: Crawls websites to find relevant pages
- ā Flexible URL Support: Handles various URL formats and local files
- ā Structured Output: Generates both human-readable and machine-readable formats
- ā MCP Integration: Seamless integration with Cursor and other MCP clients
- ā Error Handling: Robust error handling with detailed feedback
- ā Rate Limiting: Built-in rate limiting to be respectful to servers
šļø Architecture
Core Components
server.py
: Main MCP server using the official MCP Python SDKsrc/core/generator.py
: Core LLMs.txt generation logicsrc/config/config.py
: Configuration managementsrc/utils/
: Utility modules for content processing and sitemap extraction
MCP Server Features
- Single Tool:
generate_llms_txt
- generates documentation for any website - Structured Output: Returns success status, page count, file contents, and output location
- Flexible Input: Accepts URLs in various formats with automatic normalization
- Temporary Processing: Uses temporary directories for clean file generation
š§ Development
Prerequisites
- Python 3.8+
- pip or uv
Installation
-
Clone and setup:
git clone https://github.com/damionrashford/llms-txt-generator-mcp.git cd llms-txt-generator-mcp python -m venv venv source venv/bin/activate pip install -e .
-
Run the server:
python server.py
-
Test with CLI:
python generate_llms_txt.py https://example.com
Project Structure
llms-txt-generator-mcp/
āāā server.py # Main MCP server
āāā generate_llms_txt.py # Standalone CLI tool
āāā generate_deeplink.py # Helper script for creating deeplinks
āāā pyproject.toml # Project configuration
āāā Makefile # Development commands
āāā src/
ā āāā core/
ā ā āāā generator.py # Core generation logic
ā āāā config/
ā ā āāā config.py # Configuration management
ā āāā utils/ # Utility modules
āāā README.md
š¦ Distribution
For Other Users
To make this available to other users, they can:
- Use the one-click installation link (recommended)
- Clone and setup manually following the installation instructions above
- Create their own deeplink using the MCP configuration format
MCP Configuration Format
{
"llms-txt-generator": {
"command": "python3",
"args": ["/path/to/server.py"],
"env": {
"PYTHONPATH": "/path/to/project",
"LOG_LEVEL": "INFO"
},
"timeout": 60000,
"initTimeout": 15000,
"stderr": "inherit"
}
}
Creating a Deeplink
-
Prepare the configuration:
# Create the JSON config (replace with your path) echo '{"llms-txt-generator":{"command":"python3","args":["/path/to/your/llms-txt-generator-mcp/server.py"],"env":{"PYTHONPATH":"/path/to/your/llms-txt-generator-mcp","LOG_LEVEL":"INFO"},"timeout":60000,"initTimeout":15000,"stderr":"inherit"}}' > config.json
-
Base64 encode:
cat config.json | base64
-
Create the deeplink:
cursor://anysphere.cursor-deeplink/mcp/install?name=llms-txt-generator&config=YOUR_BASE64_OUTPUT
š Acknowledgments
- llmstxt.org for the specification
- MCP Python SDK for the protocol implementation
- Cursor for MCP client integration
Ready to generate LLMs.txt files for any website? Install the MCP server and start documenting! š