llms.txt

io.github.basitalisandhuv0.1.1更新於 Oct 5, 2026

Build llms.txt from local Markdown or a sitemap.xml and check an existing llms.txt file.

已驗證STDIO僅桌面Developer ToolsKnowledge & Memory

概覽

AI 產生的概覽

從本機 Markdown 檔案或本機 sitemap.xml 產生 llms.txt,並依慣例檢查既有的 llms.txt 檔案。

功能
此伺服器提供三個工具。generate_llms_txt 會掃描目錄中的 .md、.mdx 與 .markdown 檔案,略過 node_modules、.git、建置產物與隱藏目錄,從 frontmatter、第一個 H1 或檔名取得標題,依最上層資料夾分組,並回傳文字、項目與被略過的檔案。generate_from_sitemap 會把本機 sitemap.xml 轉成每個 url 一條連結,依第一個路徑區段分組。check_llms_txt 會針對檔案路徑或提供的內容,依行號回報錯誤、警告與資訊。
適用情境
當你維護文件或網站,想依現有 Markdown 或 sitemap 產生 llms.txt,或想在發布前依慣例驗證既有的 llms.txt 時,適合使用。
執行需求
透過 stdio 在本機執行;不需要網路存取、帳號、API 金鑰或環境變數。可用 npx 安裝固定版本的套件,或執行 Docker 映像 ghcr.io/basitalisandhu/mcp-llms-txt:0.1.1。從程式碼檢出執行時需要 Node.js 並先進行建置。它只讀取你指定的檔案。
安裝前請注意
它會讀取你指定目錄或路徑下的本機檔案,最多 1000 個檔案、每個 1 MB、12 層深度,或單一不超過 2 MB 的 sitemap 或 llms.txt。它從不寫入,也不抓取 URL,因此回傳的文字需要你自己儲存。由 sitemap 產生的項目備註為空,因為不會抓取頁面內容,發布前請補齊。請固定套件版本,以免更新在你未察覺時改變編輯器中執行的內容。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 llms.txt,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

llms-txt MCP server

Generates an llms.txt from a directory of Markdown or from a local sitemap.xml, and checks an existing llms.txt against the convention. Reads local files only; never writes and never fetches a URL.

Part of dev-mcp-servers. Stdio transport only; the server never opens a port.

Tools

ToolInputWhat it returns
generate_llms_txtdirectory, title, description?, details?, base_url?, url_style?, max_files?, include_dirs?, optional_sections?Scans .md, .mdx and .markdown files (skipping node_modules, .git, build output and hidden directories), takes each title from frontmatter, the first H1 or the file name and the notes from frontmatter or the first paragraph, groups by top-level folder, and returns the text plus the entries and anything skipped.
generate_from_sitemappath, title, description?, details?, include_prefix?, exclude_prefix?, optional_sections?, max_urls?One link per <url>, grouped by first path segment, titles derived from the URL (pages are not fetched).
check_llms_txtpath or contentErrors, warnings and info with line numbers: single H1 first, blockquote summary, H2 sections of - [name](url): notes, no deeper headings, no duplicates, modest size.

Install

Claude Code:

bash
claude mcp add llms-txt -- npx -y @basitalisandhu/[email protected]

Add -s user to make it available in every project. Any client that reads .mcp.json (Claude Code, Claude Desktop, Cursor):

json
{  "mcpServers": {    "llms-txt": {      "command": "npx",      "args": ["-y", "@basitalisandhu/[email protected]"]    }  }}

Pin the version as shown so that an update to the package cannot change what runs in your editor without you noticing. From a checkout, use "command": "node", "args": ["<path>/packages/llms-txt/dist/index.js"] after npm install && npm run build at the repository root.

What it touches

  • Network: None.
  • Local files: Reads Markdown files under the directory you name (up to 1000 files, 1 MB each, 12 levels deep) or the one sitemap or llms.txt you name (up to 2 MB).
  • Telemetry: none.

Notes

  • The output is returned as text; write it to llms.txt yourself after reviewing it.
  • Sitemap-derived files have empty notes because page content is not fetched; fill them in before publishing.

Build and test

bash
npm install        # at the repository rootnpm run build -w @basitalisandhu/mcp-llms-txtnpm test -w @basitalisandhu/mcp-llms-txt

Tests use node:test and the SDK's in-memory transport; they do not reach the network.

Licence

MIT. See LICENSE.

來源:packages/llms-txt/README.md,提交 58c8c95

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.1.1最新Oct 5, 2026