llms-txt-mcp
Enables fast, token-efficient access to large documentation files in llms.txt format through semantic search. Solves token limit issues by searching first and retrieving only relevant sections instead of dumping entire documentation.
README
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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。