Lean MCP server for minimal-context docs via llms.txt
Project description
llms-txt-mcp
Fast, surgical access to big docs in Claude Code via llms.txt. Search first, fetch only what matters.
Why this exists
- Hitting token limits and timeouts on huge
llms.txtfiles hurts flow and drowns context. - This MCP keeps responses tiny and relevant. No dumps, no noise — just the parts you asked for.
Quick start (Claude Desktop)
Add to ~/Library/Application Support/Claude/claude_desktop_config.json or .mcp.json in your project:
{
"mcpServers": {
"llms-txt-mcp": {
"command": "uvx",
"args": [
"llms-txt-mcp",
"https://ai-sdk.dev/llms.txt",
"https://nextjs.org/docs/llms.txt",
"https://orm.drizzle.team/llms.txt"
]
}
}
}
Now Claude Code|Desktop can instantly search and retrieve exactly what it needs from those docs.
How it works
URL → Parse YAML/Markdown → Embed → Search → Get Section
- Parses multiple llms.txt formats (YAML frontmatter + Markdown)
- Embeds sections and searches semantically
- Retrieves only the top matches with a byte cap (default: 75KB)
Features
- Instant startup with lazy loading and background indexing
- Search-first; no full-document dumps
- Byte-capped responses to protect context windows
- Human-readable IDs (e.g.
https://ai-sdk.dev/llms.txt#rag-agent)
Source resolution and crawling behavior
- Always checks for
llms-full.txtfirst, even whenllms.txtis configured. If present, it usesllms-full.txtfor richer structure. - For a plain
llms.txtthat only lists links, it indexes those links in the collection but does not crawl or scrape the pages behind them. Link-following/scraping may be added later.
Talk to it in Claude Code|Desktop
- "Search Next.js docs for middleware routing. Give only the most relevant sections and keep it under 60 KB."
- "From Drizzle ORM docs, show how to define relations. Retrieve the exact section content."
- "List which sources are indexed right now."
- "Refresh the Drizzle docs so I get the latest version, then search for migrations."
- "Get the section for app router dynamic routes from Next.js using its canonical ID."
Configuration (optional)
-
--store-path PATH (default: none) Absolute path to persist embeddings. If set, disk persistence is enabled automatically. Prefer absolute paths (e.g.,
/Users/you/.llms-cache). -
--ttl DURATION (default:
24h) Refresh cadence for sources. Supports30m,24h,7d. -
--timeout SECONDS (default:
30) HTTP timeout. -
--embed-model MODEL (default:
BAAI/bge-small-en-v1.5) SentenceTransformers model id. -
--max-get-bytes N (default:
75000) Byte cap for retrieved content. -
--auto-retrieve-threshold FLOAT (default:
0.1) Score threshold (0–1) to auto-retrieve matches. -
--auto-retrieve-limit N (default:
5) Max docs to auto-retrieve per query. -
--no-preindex (default: off) Disable automatic pre-indexing on launch.
-
--no-background-preindex (default: off) If preindexing is on, wait for it to finish before serving.
-
--no-snippets (default: off) Disable content snippets in search results.
-
--sources ... / positional sources One or more
llms.txtorllms-full.txtURLs. -
--store {memory|disk} (default: auto) Not usually needed. Auto-selected based on
--store-path. Use only to explicitly override behavior.
Development
make install # install deps
make test # run tests
make check # format check, lint, type-check, tests
make fix # auto-format and fix lint
Built on FastMCP and the Model Context Protocol. MIT license — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llms_txt_mcp-0.2.0.tar.gz.
File metadata
- Download URL: llms_txt_mcp-0.2.0.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae5fcf88acef438ffe0e93bf6868d7e0a8d3a2a6702c1d40c1268128d3199cc7
|
|
| MD5 |
ad627a417d0f96f9f984e77b863033e9
|
|
| BLAKE2b-256 |
1c4b699371ff81d1e96be90bd99f7a575c46bdacefeefb3c335b6f1745f5f3c2
|
Provenance
The following attestation bundles were made for llms_txt_mcp-0.2.0.tar.gz:
Publisher:
release.yml on tenequm/llms-txt-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llms_txt_mcp-0.2.0.tar.gz -
Subject digest:
ae5fcf88acef438ffe0e93bf6868d7e0a8d3a2a6702c1d40c1268128d3199cc7 - Sigstore transparency entry: 381488351
- Sigstore integration time:
-
Permalink:
tenequm/llms-txt-mcp@48a1a44d76a3d1a7c810108e780c34ef16312160 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tenequm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@48a1a44d76a3d1a7c810108e780c34ef16312160 -
Trigger Event:
push
-
Statement type:
File details
Details for the file llms_txt_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: llms_txt_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4496c1ee0b1e9308dfdfc08f2997e2db244adc04b79109a5023793f8733ca67a
|
|
| MD5 |
653e2338cbc5079231049ff07c6fc60a
|
|
| BLAKE2b-256 |
00903058ece679dcc3aef7a2c9cccc500c1b0645f76e7912adfdcaf20c26340b
|
Provenance
The following attestation bundles were made for llms_txt_mcp-0.2.0-py3-none-any.whl:
Publisher:
release.yml on tenequm/llms-txt-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llms_txt_mcp-0.2.0-py3-none-any.whl -
Subject digest:
4496c1ee0b1e9308dfdfc08f2997e2db244adc04b79109a5023793f8733ca67a - Sigstore transparency entry: 381488366
- Sigstore integration time:
-
Permalink:
tenequm/llms-txt-mcp@48a1a44d76a3d1a7c810108e780c34ef16312160 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tenequm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@48a1a44d76a3d1a7c810108e780c34ef16312160 -
Trigger Event:
push
-
Statement type: