
Llmstxt Doc Search
io.github.praveenc由 GitHub 帳號 praveenc 發布v1.0.0更新於 Oct 24, 2026
BM25 search over llms.txt doc indexes (Strands, Kiro, AWS); sources addable at runtime.
概覽
一個本機 MCP 伺服器,把 llms.txt 文件索引變成 BM25 排序搜尋,讓助理能搜尋並取得已註冊來源的最新文件。
- 可以做什麼
- 檢視與列出來源:顯示已註冊的 llms.txt 來源、其網址和索引狀態,包括最近的索引錯誤。搜尋文件:在單一來源或全部來源上執行 BM25 排序查詢,回傳標題、網址、分數和摘要片段。取得文件:依需求抓取某筆結果的完整 Markdown 或 HTML 內容。管理來源:在執行時新增 llms.txt 來源、移除來源或重新整理既有索引。
- 適用情境
- 適合助理需要從有發布 llms.txt 索引的文件網站(例如 Strands、Kiro 或 AWS 指南)取得快速、最新的參考資料,而不必在本機保存整套文件快照。適用於範圍廣、更新快的技術文件。
- 執行需求
- 以 npm 套件形式透過 stdio 在本機執行,可用 npx 或全域安裝;需要 Node.js 20 或更新版本。需要網路存取以抓取 llms.txt 索引和頁面。不需帳號、API 金鑰或標頭;選用環境變數可設定登錄檔路徑、摘要抓取數量、頁面快取大小和日誌等級。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Llmstxt Doc Search,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
llmstxt-doc-search
Live, ranked search across any number of
llms.txtdocumentation sites - Strands, Kiro, the AWS guides, and whatever you add at runtime.
[npm version] [MCP Registry] [License: MIT] [Release]
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.
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:
Global install
Then point your MCP client at the installed binary:
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:
Tools
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.
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.
Testing with MCP Inspector
The Inspector can connect in either protocol era; see Protocol eras.
Development
Clone the repository for local work (Node.js 20 or later):
Commands
Local MCP client config (development)
Point your client at a source checkout instead of the published package:
Or, after npm run build, at the compiled entry point:
Architecture
Search 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.
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.
來源:README.md,提交 768954a
工具
0版本歷史
3- v1.0.0最新Sep 30, 2026
- v0.2.0Sep 30, 2026
- v0.1.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分