
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.
概览
从本地 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 并先执行构建。它只读取你指定的文件。
安装
在 SourceWeft 中
- 打开 控制台中的 llms.txt,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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
Install
Claude Code:
Add -s user to make it available in every project. Any client that reads .mcp.json (Claude Code, Claude Desktop, Cursor):
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.txtyourself after reviewing it. - Sitemap-derived files have empty notes because page content is not fetched; fill them in before publishing.
Build and test
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- v0.1.1最新Oct 5, 2026


