hugging2021/llms-txt-mcp
0
LLMs.txt Generator
Key Capabilities:
- ๐ค Automatically browse, research and highlight key information and generates an
llms.txtfor a package/project/API. - ๐จ๐ปโ๐ง Helper converter to generate
llms-ctx.txtorllms-ctx-full.txtfrom a providedllms.txt
Demonstration Videos
Generate `llms.txt` via MCP Server:
Generate the llms.txt for Mistral Python SDK and save it to the llms-txt/ folder.

`llms.txt` to `llms-ctx.txt` Conversion Showcase:
Convert the @llms.txt to the corresponding llms-ctx.txt file and save it to the llms-ctx-txt/ folder.

Why llms.txt?
- ๐ Richer context than traditional documentation
- ๐ Universally applicable across domains
- ๐ค Enhances AI-assisted development and communication
Alternatives exist, but there are trade-offs:
- Cursor offers a
@docsdocumentation indexing, which serves a very similar purpose. However, storage is limited to your plan - llms.txt allows the developer to highlight key information and gotchas, links to critical dependencies which in certain cases may provide a boost to the context shared with the LLMs (vs a document chunk retrieval approach)
See: https://www.answer.ai/posts/2024-09-03-llmstxt.html
Quick Start
Prerequisites
- Mistral AI API
- Weights & Biases (optional)
- Brave Search API
Setup
# Install dependencies
uv pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your API keys
# Run the application
uv run --env-file=.env src/main.pyPossible Future Roadmap
- Expand to non-coding domain contexts (See: https://llmstxt.org/domains.html )
- Create a centralized
llms.txtdatabase
Misc notes
- MCP clients:
- Start MCP Inspector:
npx @modelcontextprotocol/inspector - Use Another Gradio app as MCP client
- Register MCP server in Cursor/VSCode
- Ways to connect to the MCP Server:
- Connect to MCP Server via: https://shern-llms-txt-mcp.hf.space/gradio_api/mcp/http/
- Note the trailing slash helps in some cases
- Must make Huggingface Space public
- Connect to MCP Server locally (dev): http://127.0.0.1:7860/gradio_api/mcp/http/
- Connect to MCP Server via Cursor: use
/gradio_api/mcp/sseendpoint instead for now.
