New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@praveenc/llmstxt-doc-search

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@praveenc/llmstxt-doc-search

BM25 search over llms.txt doc indexes (Strands, Kiro, AWS); sources addable at runtime.

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
19
-13.64%
Maintainers
1
Weekly downloads
 
Created
Source

An MCP server that BM25-searches any number of llms.txt documentation indexes (Strands, Kiro, AWS user/dev guides, and any you add at runtime), then fetches full doc content on demand. Built on the search engine from @praveenc/mcp-docs-server, generalized to a registry of sources.

Why

llms.txt files are curated link indexes some doc sites publish. They can be huge (AWS Bedrock's is ~1,000 docs). This server indexes only the titles at first use (fast, tiny), ranks queries with BM25 + Porter stemming + bigrams + markdown-aware weighting, and fetches the full markdown/HTML of a result on demand. So you get current docs with near-zero local storage - the right model for broad, fast-moving reference (vs. snapshotting docs into a local vault).

Tools

ToolPurpose
docs_home()Orientation: registered sources + how to search/fetch. Call first.
list_doc_sources()List sources (name, llms.txt url, index status).
search_docs(query, source?, k?)BM25 search; omit source to search all, or scope to one. Returns {source,url,title,score,snippet}.
fetch_doc(url)Full content of a result url (must belong to a registered source).
add_doc_source(name, llms_txt_url)Register + index a new llms.txt at runtime (persisted).
remove_doc_source(name)Remove a source.
refresh_doc_source(name)Re-index a source (pick up changes).

Default sources (seeded on first run)

strands, kiro, aws-bedrock-userguide, aws-agentic-ai-lens, aws-bedrock-agentcore-devguide. Registry is persisted at ~/.config/llmstxt-doc-search/sources.json (override with LLMSTXT_REGISTRY_PATH).

Install

Published to npm as @praveenc/llmstxt-doc-search. No local build needed - run it via npx:

{
  "mcpServers": {
    "llmstxt-doc-search": {
      "command": "npx",
      "args": ["-y", "@praveenc/llmstxt-doc-search"]
    }
  }
}

Build & run (from source)

npm install
npm run build      # -> dist/
npm test           # offline unit tests
npm run typecheck

MCP client config (from a local build):

{
  "mcpServers": {
    "llmstxt-doc-search": {
      "command": "node",
      "args": ["/ABS/PATH/llmstxt-doc-search/dist/index.js"]
    }
  }
}

Dev (no build): "command": "npx", "args": ["tsx", "/ABS/PATH/src/index.ts"].

Config (env)

VarDefaultMeaning
LLMSTXT_REGISTRY_PATH~/.config/llmstxt-doc-search/sources.jsonWhere sources are persisted.
LLMSTXT_SNIPPET_HYDRATE_MAX5How many top hits to fetch for snippets.
LLMSTXT_LOG_LEVELinfodebug/info/warn/error (stderr only).

Security

This server fetches user-supplied URLs at runtime, so the SSRF surface is guarded in depth:

  • fetch_doc only fetches URLs under a registered source's origin + path prefix (matched on a path boundary, not a raw string prefix) - no arbitrary fetch.
  • Non-http(s) schemes are rejected.
  • Private/reserved destinations are blocked using range classification (ipaddr.js), covering decimal/octal/hex IPv4, IPv4-mapped IPv6, loopback, link-local, unique-local, carrier-grade NAT, and other reserved ranges - not just a hostname regex.
  • The resolved IP is validated at connection time via a custom DNS lookup, closing DNS-rebinding, and every redirect hop is re-validated.
  • Response bodies are capped (10 MB) to bound memory and regex (ReDoS) exposure.

License

MIT

Keywords

mcp

FAQs

Package last updated on 14 Jul 2026

Related posts