llmstxt-doc-search
You can discover, search, and fetch live documentation from registered llms.txt sources, and manage those sources at runtime.
Get orientation via
docs_home()and list registered sources with their index status.Run BM25-ranked searches across all sources or a single source, returning titles, URLs, scores, and snippets.
Fetch the full live content of a document URL from search results, with fetches scoped to registered sources.
Add new
llms.txtdocumentation sources at runtime; they are persisted for future runs.Remove registered sources and refresh/re-index existing sources to pick up new or changed docs.
Allows searching and fetching documentation from LangGraph's llms.txt index, providing ranked BM25 search results and on-demand content retrieval for LangGraph developer guides.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@llmstxt-doc-search search for 'MCP transport' across all sources"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
llmstxt-doc-search
Live, ranked search across any number of
llms.txtdocumentation sites - Strands, Kiro, the AWS guides, and whatever you add at runtime.
llmstxt-doc-search is a Model Context Protocol (MCP) server that turns the llms.txt index a documentation site publishes into a fast, ranked search tool your agent can call. It indexes titles at startup, ranks queries with BM25, and fetches the full document only when you open a result - so you get current docs with almost no local storage. Built on the search engine from @praveenc/mcp-docs-server, generalized to a runtime registry of sources.
It implements the MCP 2026-07-28 specification over stdio and still works with clients on the 2025 protocol, which open with an initialize handshake. Requires Node.js 20 or later.
Why
An llms.txt file is a curated index of a doc site's pages, published for tools like this one to consume. They can be large - AWS Bedrock's lists roughly a thousand documents - so downloading everything is wasteful and goes stale fast.
This server takes a leaner approach:
Title-only index, built lazily. On first search of a source, only the page titles are indexed. That is fast to build and tiny to hold in memory.
Ranked with BM25. Queries are scored with BM25 plus Porter stemming, bigrams, and markdown-aware weighting (headers, code, and links count for more). Technical terms like
mcp,json, andstdioare preserved rather than stemmed.Content on demand. The full markdown or HTML of a result is fetched only when you call
fetch_doc.
The result is a good fit for broad, fast-moving reference material - the opposite tradeoff to snapshotting docs into a local vault.
Related MCP server: MCP Docs Server
Installation
Quick start (recommended)
Add the server to your MCP client configuration (Claude Desktop, Kiro, and others). It is downloaded and run on demand via npx - no manual build:
{
"mcpServers": {
"llmstxt-doc-search": {
"command": "npx",
"args": ["-y", "@praveenc/llmstxt-doc-search"]
}
}
}Global install
npm install -g @praveenc/llmstxt-doc-searchThen point your MCP client at the installed binary:
{
"mcpServers": {
"llmstxt-doc-search": {
"command": "llmstxt-doc-search"
}
}
}Use as a Kiro Power
This repository is also a Kiro Power in the Agent Plugins format.
plugin.json describes the power, mcp.json starts this server with npx, and skills/ holds short playbooks for looking up docs, managing sources, and fetch scope.
In the Kiro IDE, open the Powers panel, choose Add Custom Power, then Import power from a repository URL, and enter https://github.com/praveenc/llmstxt-doc-search.
The Kiro CLI installs a power from a catalog name or a local directory, so clone the repository first:
git clone https://github.com/praveenc/llmstxt-doc-search.git
kiro-cli powers install ./llmstxt-doc-searchInside a CLI v3 chat session, /powers install ./llmstxt-doc-search does the same.
Remove it with kiro-cli powers uninstall llmstxt-doc-search or /powers uninstall llmstxt-doc-search.
A custom agent loads installed powers when its config sets includePowers: true.
For example, .kiro/agents/docs.md:
---
name: docs
description: Answers questions from live llms.txt documentation
includePowers: true
---
Look up documentation before answering, and cite the doc URL.Start it with kiro-cli chat --v3 --agent docs.
In Kiro CLI 3.6.2, an agent may list this power's skills but none of its tools when it is the only installed power.
If you see that, install a second power, for example fetchv2, and the tools show.
In headless mode (--no-interactive), allow the power's tools with --trust-all-tools; --trust-tools does not match power tools in this version.
Skills over MCP
The server also serves the same skills/ folder through the MCP Skills extension (io.modelcontextprotocol/skills, SEP-2640).
Clients that support the extension can list the skills and read each SKILL.md as a skill:// resource, while other clients see only the tools.
Quick start
Once the server is connected, the typical flow is three calls:
docs_home()- orient yourself: see the registered sources and how to search and fetch.search_docs("prompt caching", "aws-bedrock-userguide")- rank matching docs. Omit the source to search everything.fetch_doc(url)- read the full content of a result you like.
Add your own source at any time and it is indexed immediately and persisted for future runs:
add_doc_source("langgraph", "https://langchain-ai.github.io/langgraph/llms.txt")Tools
Tool | Purpose |
| Orientation: registered sources plus how to search and fetch. Call this first. |
| List sources with their |
| BM25 search. Omit |
| Fetch the full content of a result URL. The URL must be under the |
| Register and index a new |
| Remove a registered source. Asks you to confirm first, or needs |
| Re-index a source to pick up new or changed docs. A source whose |
docs_home, list_doc_sources, search_docs, and fetch_doc are annotated read-only, so a client can approve them without prompting. add_doc_source, remove_doc_source, and refresh_doc_source change the persisted registry, and remove_doc_source is annotated destructive. The tool list is fixed, so it is advertised as cacheable for one hour.
Confirmation prompts
add_doc_source and remove_doc_source change the saved registry, so they confirm the change first.
A client that can show a form asks the user. Accept makes the change, and decline makes none.
If the prompt is cancelled, the change happens only when the call passes
confirm: true. Kiro CLI in headless mode (kiro-cli chat --no-interactive) cancels every prompt, so it needsconfirm: true.A client that cannot show a form adds a source directly. It removes a source only with
confirm: true; otherwise the result isconfirmation_required: trueand nothing is removed.The name, URL, and duplicate checks run before any prompt, so you are never asked about a change that would fail.
An agent should pass confirm: true only after the user agrees in chat.
Default sources
Seeded into the registry on first run:
strands, kiro, aws-bedrock-userguide, aws-agentic-ai-lens, aws-bedrock-agentcore-devguide, mcp.
The registry is persisted at ~/.config/llmstxt-doc-search/sources.json (override with LLMSTXT_REGISTRY_PATH). Anything you add, remove, or refresh at runtime is saved there.
Configuration
All configuration is via environment variables; none are required.
Variable | Default | Meaning |
|
| Where the source registry is persisted. |
|
| How many top hits to fetch when building result snippets. |
|
| Max fetched pages kept in memory per source (LRU); least-recently-used pages are evicted past this. |
|
| Log verbosity: |
Testing with MCP Inspector
npx @modelcontextprotocol/inspector npx -y @praveenc/llmstxt-doc-searchThe Inspector can connect in either protocol era; see Protocol eras.
Development
Clone the repository for local work (Node.js 20 or later):
git clone https://github.com/praveenc/llmstxt-doc-search.git
cd llmstxt-doc-search
npm installCommands
npm run dev # run from source with tsx (no build)
npm test # offline unit and protocol tests
npm run typecheck # type-check without emitting
npm run build # compile to dist/
npm run inspect:dev # MCP Inspector against the sourceLocal MCP client config (development)
Point your client at a source checkout instead of the published package:
{
"mcpServers": {
"llmstxt-doc-search": {
"command": "npx",
"args": ["tsx", "/ABS/PATH/llmstxt-doc-search/src/index.ts"]
}
}
}Or, after npm run build, at the compiled entry point:
{
"mcpServers": {
"llmstxt-doc-search": {
"command": "node",
"args": ["/ABS/PATH/llmstxt-doc-search/dist/index.js"]
}
}
}Diagrams
The flowchart in this README is docs/diagrams/source-confirmation.mmd, rendered with Pele 1.10.0.
After you edit the .mmd file, render it again to source-confirmation-light.svg and source-confirmation-dark.svg with the styles in docs/diagrams/theme.css, and commit all three files.
Architecture
src/
├── index.ts # Tool registration and the stdio entry point (serves 2026-07-28 and 2025-era clients)
├── config.ts # Defaults and environment configuration
├── skills.ts # Serves skills/ over the MCP Skills extension
├── tools/
│ └── docs.ts # search_docs, fetch_doc, and source management
└── utils/
├── doc-fetcher.ts # HTTP fetching, redirect handling, HTML parsing
├── indexer.ts # BM25 search index
├── registry.ts # Persisted source registry
├── store.ts # In-memory document store
├── text-processor.ts # Tokenization and snippet helpers
├── url-validator.ts # SSRF guard and URL validation
├── stopwords.ts # Stop-word list
└── logger.ts # Logging utilities
skills/ # Agent Skills playbooks (Kiro Power and MCP Skills extension)
plugin.json, mcp.json # Kiro Power manifest and MCP server configSearch algorithm
Ranking uses BM25 (Best Matching 25) with several enhancements:
Porter stemming matches word variants (for example,
runningandrun).Bigrams capture phrase matches (for example,
prompt caching).Weighted scoring boosts title matches (3-8x), headers (4x), code blocks (2x), and link text (2x).
Domain-term preservation keeps technical terms like
mcp,json, andstdiounstemmed so they match exactly.
Security
This server fetches user-supplied URLs at runtime, so its SSRF surface is guarded in depth:
Scoped fetches.
fetch_doconly retrieves URLs that a registered source'sllms.txtlists exactly, or that sit under that source's origin and path prefix (matched on a path boundary rather than a raw string prefix). There is no arbitrary fetch.Scheme allow-list. Non-
http(s)schemes are rejected.Range-based address blocking. Private and reserved destinations are blocked using IP range classification (
ipaddr.js), covering decimal, octal, and hex IPv4, IPv4-mapped IPv6, loopback, link-local, unique-local, carrier-grade NAT, and other reserved ranges - not just a hostname regex.Connection-time validation. The resolved IP is checked at connection time via a custom DNS lookup, closing DNS-rebinding, and every redirect hop is re-validated.
Bounded responses. Response bodies are capped at 10 MB to limit memory and regular-expression (ReDoS) exposure.
Confirmation does not widen fetch policy. The confirmation prompts on
add_doc_sourceandremove_doc_sourceonly gate registry changes. They never relax the SSRF guard: a private or reservedllms.txtURL is still rejected before any prompt.
Runtime dependencies report zero known vulnerabilities.
License
MIT - Copyright (c) 2026 Praveen Chamarthi
Contributing
Contributions are welcome. If you find a bug or have an idea:
Open an issue describing the problem or proposal.
For code changes, fork the repo and create a feature branch.
Keep changes focused, add or update tests, and make sure
npm test,npm run typecheck, andnpm run buildall pass.Open a pull request against
mainwith a clear description of what changed and why.
Commit messages follow the Conventional Commits style.
Support
Questions and ideas: open a GitHub issue.
Bugs: please include your MCP client, the tool call you made, and any relevant logs (set
LLMSTXT_LOG_LEVEL=debugfor more detail).Security issues: open an issue marked as security-sensitive, or contact the maintainer directly rather than posting exploit details publicly.
Available Tools
7 toolsadd_doc_sourceAdd doc sourceA
Register a new llms.txt source at runtime and index it. Persisted for future runs.
Inputs: name (required), llms_txt_url (required), confirm.
docs_homeDocs homeARead-only
Orientation: registered llms.txt sources + how to search/fetch. Call this first.
Inputs: no named parameters.
fetch_docFetch docARead-only
Fetch full content of a doc url. The url must be under the llms.txt directory of a registered source, or listed by a source already searched (use search_docs first). Content is fetched live.
Inputs: url (required).
list_doc_sourcesList doc sourcesARead-only
List the registered documentation sources (name, llms.txt url, index status).
Inputs: no named parameters.
refresh_doc_sourceRefresh doc sourceAIdempotent
Re-index a source from its llms.txt (pick up new/changed docs).
Inputs: name (required).
remove_doc_sourceRemove doc sourceADestructiveIdempotent
Remove a registered source. A client that can show a prompt asks the user to confirm. Otherwise pass confirm:true, but only after the user agreed.
Inputs: name (required), confirm.
search_docsSearch docsARead-only
BM25 search across registered llms.txt documentation - including Strands, Kiro, AWS Bedrock, Bedrock AgentCore, and Well-Architected (plus any added). Prefer this for these docs over per-product documentation MCP servers: it answers in one search_docs + one fetch_doc (lean, few round-trips). Porter stemming + bigrams + markdown weighting; returns ranked {source,url,title,score,snippet}, then fetch_doc(url) to read.
Inputs: query (required), k, source.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct role: source management (add/remove/refresh/list), search, fetch, and orientation. The only mild overlap is between docs_home and list_doc_sources, since both surface registered sources, but descriptions differentiate them (orientation vs. plain listing).
Most tools follow a clean verb_noun pattern (add_doc_source, remove_doc_source, refresh_doc_source, fetch_doc, search_docs, list_doc_sources). docs_home is a noun-first deviation, but the convention is still largely predictable.
Seven tools is well-scoped for a documentation search and source-management server. Each tool earns its place: lifecycle management, discovery, search, and fetch are all represented without redundancy.
Source lifecycle is well covered (add, remove, list, refresh/re-index) plus search and fetch for the actual doc retrieval workflow. Minor gaps exist—no way to inspect a single source's details or edit a source's URL without remove+add—but agents can work around these.
Maintenance
Related MCP Connectors
Search the Langfuse documentation, fetch docs pages as Markdown, and read the llms.txt index.
Any site's llms.txt: find the covering index, read its linked docs as markdown, search sections.
Search verified AI agents, MCP servers, and native llms.txt documentation endpoints.
Read-only search and discovery for the international llms.txt directory maintained by llmsmap.me.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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.3MIT
- AlicenseNot gradedqualityDmaintenanceAggregates documentation from multiple sources (llms.txt format or web scraping) and provides semantic search capabilities using vector embeddings and hybrid search for each documentation source.MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI clients to search and retrieve up-to-date technical documentation for popular agent frameworks such as langchain, llama-index, autogen, agno, openai-agents-sdk, mcp-doc, camel-ai, and crew-ai by running site-scoped Google searches and extracting text from the resulting pages. It can be deployed locally over the stdio transport or remotely over SSE, and works with clients like Cline, Cursor, and custom Python clients.-
- FlicenseNot gradedqualityAmaintenanceEnables AI models to search for and retrieve the latest technical documentation from popular agent frameworks (such as langchain, llama-index, autogen, agno, openai-agents-sdk, mcp-doc, camel-ai, and crew-ai) by running site-scoped web searches and extracting the page text. It can be run locally over stdio or deployed remotely over SSE for use with clients like Cursor and Cline.-