digitalcyphrpnk/llmstxt-mcp
If you are the rightful owner of llmstxt-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 dayong@mcphub.com.
An MCP (Model Context Protocol) server for discovering, generating, and validating llms.txt files.
llms-txt MCP Server
An MCP (Model Context Protocol) server for discovering, generating, and validating llms.txt files.
Features
- Discovery: Find and parse existing llms.txt files from websites
- Generation: Create llms.txt files for projects and websites
- Validation: Check llms.txt format compliance with the specification
- Context Expansion: Convert llms.txt files into full context for LLM consumption
- Directory Search: Search community directories for llms.txt implementations
- Repository Analysis: Generate llms.txt from repository structure
Tools Available
discover_llmstxt
Discover and parse llms.txt file from a website.
Parameters:
url(string): Website URL to check for llms.txt
generate_llmstxt
Generate llms.txt file for a project or website.
Parameters:
title(string): Project or website titledescription(string): Brief description of the projectdocs_urls(array, optional): List of documentation URLsexamples_urls(array, optional): List of example URLsoptional_urls(array, optional): List of optional reference URLsoutput_path(string, optional): Path to save the generated file
validate_llmstxt
Validate llms.txt format compliance.
Parameters:
content(string): llms.txt content to validate
expand_llmstxt_context
Expand llms.txt into full context for LLM consumption.
Parameters:
llmstxt_url(string): URL to llms.txt fileinclude_optional(boolean, optional): Include optional URLs in expansionmax_content_length(number, optional): Maximum content length per URLformat_type(string, optional): Output format ("markdown", "xml", "plain")
search_llmstxt_directory
Search community directories for llms.txt files.
Parameters:
query(string, optional): Search querycategory(string, optional): Filter by categorylimit(number, optional): Maximum number of results
generate_from_repository
Generate llms.txt from a repository by analyzing its structure.
Parameters:
repo_url(string): Repository URLtitle(string, optional): Project titledescription(string, optional): Project descriptioninclude_readme(boolean, optional): Include README.mdauto_discover_docs(boolean, optional): Auto-discover documentation
Installation
Using uv (recommended)
# Clone the repository
git clone https://github.com/digitalcyphrpnk/llmstxt-mcp.git
cd llmstxt-mcp
# Setup with uv
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
uv pip install -e .
Using pip
pip install llmstxt-mcp
Configuration
OpenCode Configuration
Add to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"llmstxt": {
"type": "local",
"command": ["llmstxt-mcp"],
"enabled": true
}
}
}
Claude Desktop Configuration
Add to your Claude Desktop configuration:
{
"mcpServers": {
"llmstxt": {
"command": "llmstxt-mcp"
}
}
}
Usage Examples
Discover existing llms.txt
Check if https://fastht.ml has an llms.txt file
Generate llms.txt for a project
Generate an llms.txt file for my React documentation project with title "React Docs" and description "Comprehensive React documentation and examples"
Validate llms.txt format
Validate this llms.txt content to ensure it follows the specification
Expand llms.txt to full context
Expand the llms.txt from https://fastht.ml/docs/llms.txt into full context for analysis
Search community directory
Search for llms.txt files related to "documentation" projects
Generate from repository
Generate an llms.txt file by analyzing the structure of https://github.com/microsoft/typescript
llms.txt Specification
The llms.txt specification defines a standard format:
- H1 Title (required):
# Project Name - Blockquote Description (optional):
> Brief description - Sections (optional):
## Docs- Documentation links## Examples- Example links## Optional- Additional references
- Links: Markdown format
- [Name](URL)
Development
Setup Development Environment
# Clone and setup
git clone https://github.com/digitalcyphrpnk/llmstxt-mcp.git
cd llmstxt-mcp
# Install with development dependencies
uv pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src tests
ruff check src tests
# Type checking
mypy src
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
License
MIT License - see file for details.
Related Projects
- llms-txt - The original llms.txt specification and tools
- llmstxt.org - Official specification website
- Model Context Protocol - The protocol specification
- OpenCode - AI coding agent that supports MCP servers