Skip to main content
Glama
llmstxt-mcp
by vitaleap

llmstxt-mcp

用于管理远程 llms.txt 文档的 MCP

当前提供 6 个工具:

  • add:新增一个 llms.txt,抓取成功后保存配置和文档。

  • edit:按 id 修改名称、URL 或简介;URL 变更时会重新抓取文档。

  • del:按 id 删除配置和本地文档目录。

  • list:列出所有 llms 的 id、name、url、description。

  • view:按 id 读取本地缓存的 llms.txt 内容,返回的文本里包含的绝对 URL 可通过 view_doc 进一步获取。

  • view_doc:按绝对 URL 抓取并返回 llms.txt 中链接到的文档内容。

开发

1. 安装

pnpm install

2. 启动

pnpm dev

3. 调试

在弹出的 MCP Inspector 跳时网页,选择 SSE 模式并连接,SSE 支持自动重连,更好支持本地开发调试,当然你也可以选择其他模式

4. 参数传递

  • stdio 模式,可以用 process.env 获取 mcp 配置的 env 变量

  • sse/streamable-http 模式,可以用封装的 ctx.get() 获取 mcp 配置的请求头,方便鉴权等

Related MCP server: mcp-llm

部署 Stdio

1. 打包

pnpm build

2. 发布到 npm

pnpm publish

3. MCP 配置

{
  "mcpServers": {
    "llmstxt-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["llmstxt-mcp"]
    }
  }
}

部署 docker

1. Build

docker build -t llmstxt-mcp .

2. Run the server

docker run -p 3000:3000 llmstxt-mcp
# 或启动 sse
docker run -p 4000:4000 llmstxt-mcp node sse.js

3. MCP 配置

{
  "mcpServers": {
    "llmstxt-mcp": {
      "type": "streamableHttp",
      "url": "http://localhost:3000/mcp",
      "headers": {
        "API_KEY": "sk-123"
      }
    },
    // 或 sse
    "llmstxt-mcp": {
      "type": "sse",
      "url": "http://localhost:4000/mcp",
      "headers": {
        "API_KEY": "sk-123"
      }
    }
  }
}

Available Tools

6 tools
addA

Add a new llms.txt (https://llmstxt.org) by URL. Fetches and caches the document locally. Use when the user wants to save, import, or subscribe to an llms.txt.

Inputs: url (required), name (required), description (required).

delA

Delete an llms.txt entry and its cached content by id. Call list first if you don't have the id.

Inputs: id (required).

editA

Update name, url, or description of an llms.txt entry by id. Re-fetches if url changes. Call list first if you don't have the id.

Inputs: id (required), url, name, description.

listA

List all saved llms.txt entries (id, name, url, description). Use when the user asks what's available, or to look up an id for other tools.

Inputs: no named parameters.

viewA

Read the content of a stored llms.txt document by id. The returned text contains absolute URLs that can be fetched via view_doc. Call list first if you don't have the id.

Inputs: id (required).

view_docA

Fetch a document content linked from a stored llms.txt by its absolute URL. Typically called with a URL discovered via view.

Inputs: docUrl (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct operation: add creates an entry, edit updates metadata, del removes it, list shows summaries, view reads stored content, and view_doc fetches linked documents. There is no meaningful overlap or ambiguity between tool purposes.

    Naming Consistency4/5

    Most names follow a simple imperative verb style: add, edit, del, list, view. The main deviation is view_doc, which uses a verb_noun pattern, and del is an abbreviation of delete, but the set is still readable and predictable overall.

    Tool Count5/5

    Six tools is an appropriate size for this server's focused purpose of managing and viewing llms.txt documents. The tool count is neither too thin nor bloated.

    Completeness5/5

    The tool set covers the full lifecycle of stored llms.txt entries: add, edit, delete, list, and view content, plus fetching linked documents. No obvious operations needed for the described domain are missing.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers