Search and query project documentation via llms.txt using llmcpd MCP (npx)
Agent task: given a project that publishes an llms.txt file (the emerging standard for LLM-friendly documentation), make its docs searchable via MCP tools. The server indexes the llms.txt, follows links to cache pages as markdown, and provides keyword search with relevance-ranked results. Useful for any agent that needs to answer questions about a framework, SDK, or service using its own documentation.
Recipe: Search project docs via llms.txt using llmcpd
Surface: llmcpd v1.1.0 Transport: stdio Launch: npx -y llmcpd --url <llms.txt URL> Auth: none — the server fetches the public llms.txt and its linked pages Tools: 7 tools
Tools
| Tool | Description |
|---|---|
search | Keyword search across indexed docs — returns relevance-ranked results with context snippets (up to 20 results) |
fetch | Get full content for a specific URL from the index (up to 12,000 chars) |
list_sections | Show all sections defined in the llms.txt with link counts |
list_links | List all links, optionally filtered by section |
summary | Heuristic summarization of cached content for a URL |
status | Check indexing status and cache info |
reindex | Force re-fetch and reindex of the llms.txt |
How it works
- On startup, llmcpd fetches the
--urltarget (anllms.txtfile), parses its sections and links - Background indexing crawls linked pages, converts HTML to markdown, caches to disk with ETag/Last-Modified support
- Full-text search runs against the indexed corpus with relevance scoring
- Optional
--crawl-depth Nfollows nested markdown links for deeper coverage
Test: Search Vercel docs for "deployment"
Launch: npx -y llmcpd --url https://vercel.com/docs/llms.txt
→ tools/call search {"query":"deployment"}
← [
{ "title": "Getting Started", "section": "General", "score": 156.52, "snippet": "...deployment skills, framework best practices..." },
{ "title": "Incremental Migration", "section": "General", "score": 151.66, "snippet": "...deploy your application on Vercel..." },
{ "title": "Create React App", "section": "General", "score": 150.55, "snippet": "...deployments/environments..." },
{ "title": "Build System", "section": "General", "score": 149.79, "snippet": "...source code into optimized assets..." },
{ "title": "SvelteKit", "section": "General", "score": 144.56, "snippet": "...deployments/environments..." }
]Results are relevance-ranked with scores and context snippets. Each result includes the source URL for follow-up fetching.
CLI options
--url <url> URL to llms.txt (required)
--cache-dir <path> Cache directory (default: OS temp)
--refresh-mins <n> Background reindex interval (default: 60)
--max-pages <n> Maximum pages to index (default: 40)
--full Prefer llms-full.txt if available
--crawl-depth <n> Depth for nested markdown crawling (default: 0)
--max-workers <n> Concurrent crawl workers (default: 4)Claude Desktop config (Vercel docs example)
{
"mcpServers": {
"vercel-docs": {
"command": "npx",
"args": ["-y", "llmcpd", "--url", "https://vercel.com/docs/llms.txt"]
}
}
}Known llms.txt sources to try
Any project publishing an llms.txt works. Point --url at it:
https://vercel.com/docs/llms.txthttps://docs.anthropic.com/llms.txthttps://docs.stripe.com/llms.txt
{ "server": "llmcpd", "version": "1.1.0", "transport": "stdio", "launch": "npx -y llmcpd --url https://vercel.com/docs/llms.txt", "handshake": { "initialize": { "protocolVersion": "2024-11-05", "serverInfo": { "name": "llmcpd", "version": "0.1.0" }, "capabilities": { "tools": { "listChanged": true } } }, "tools_list": [ { "name": "search", "description": "Search indexed documentation for relevant content" }, { "name": "fetch", "description": "Fetch full content for a specific URL" }, { "name": "list_sections", "description": "List all llms.txt sections with link counts" }, { "name": "list_links", "description": "List links from llms.txt, optionally filtered by section" }, { "name": "summary", "description": "Summarize cached content for a URL" }, { "name": "status", "description": "Get indexing status and cache info" }, { "name": "reindex", "description": "Force reindex of llms.txt and related content" } ] }, "traces": [ { "tool": "search", "input": { "query": "deployment" }, "output": [ { "title": "Getting Started", "section": "General", "score": 156.52, "url": "https://vercel.com/docs/getting-started-with-vercel" }, { "title": "Incremental Migration", "section": "General", "score": 151.66, "url": "https://vercel.com/docs/incremental-migration" }, { "title": "Create React App", "section": "General", "score": 150.55, "url": "https://vercel.com/docs/frameworks/frontend/create-react-app" }, { "title": "Build System", "section": "General", "score": 149.79, "url": "https://vercel.com/docs/fundamentals/builds" }, { "title": "SvelteKit", "section": "General", "score": 144.56, "url": "https://vercel.com/docs/frameworks/full-stack/sveltekit" } ] } ] }