llms-txt-mcp

llms-txt-mcp

Enables fast, token-efficient access to large documentation files in llms.txt format through semantic search. Solves token limit issues by searching first and retrieving only relevant sections instead of dumping entire documentation.

Category
Visit Server

README

llms-txt-mcp

llms-txt-mcp Python 3.12+ MCP SDK 1.12+ License: MIT

Fast, surgical access to big docs in Claude Code via llms.txt. Search first, fetch only what matters.

Why this exists

  • Hitting token limits and timeouts on huge llms.txt files hurts flow and drowns context.
  • This MCP keeps responses tiny and relevant. No dumps, no noise — just the parts you asked for.

Quick start (Claude Desktop)

Add to ~/Library/Application Support/Claude/claude_desktop_config.json or .mcp.json in your project:

{
  "mcpServers": {
    "llms-txt-mcp": {
      "command": "uvx",
      "args": [
        "llms-txt-mcp",
        "https://ai-sdk.dev/llms.txt",
        "https://nextjs.org/docs/llms.txt",
        "https://orm.drizzle.team/llms.txt"
      ]
    }
  }
}

Now Claude Code|Desktop can instantly search and retrieve exactly what it needs from those docs.

How it works

URL → Parse YAML/Markdown → Embed → Search → Get Section

  • Parses multiple llms.txt formats (YAML frontmatter + Markdown)
  • Embeds sections and searches semantically
  • Retrieves only the top matches with a byte cap (default: 75KB)

Features

  • Instant startup with lazy loading and background indexing
  • Search-first; no full-document dumps
  • Byte-capped responses to protect context windows
  • Human-readable IDs (e.g. https://ai-sdk.dev/llms.txt#rag-agent)

Source resolution and crawling behavior

  • Always checks for llms-full.txt first, even when llms.txt is configured. If present, it uses llms-full.txt for richer structure.
  • For a plain llms.txt that only lists links, it indexes those links in the collection but does not crawl or scrape the pages behind them. Link-following/scraping may be added later.

Talk to it in Claude Code|Desktop

  • "Search Next.js docs for middleware routing. Give only the most relevant sections and keep it under 60 KB."
  • "From Drizzle ORM docs, show how to define relations. Retrieve the exact section content."
  • "List which sources are indexed right now."
  • "Refresh the Drizzle docs so I get the latest version, then search for migrations."
  • "Get the section for app router dynamic routes from Next.js using its canonical ID."

Configuration (optional)

  • --store-path PATH (default: none) Absolute path to persist embeddings. If set, disk persistence is enabled automatically. Prefer absolute paths (e.g., /Users/you/.llms-cache).

  • --ttl DURATION (default: 24h) Refresh cadence for sources. Supports 30m, 24h, 7d.

  • --timeout SECONDS (default: 30) HTTP timeout.

  • --embed-model MODEL (default: BAAI/bge-small-en-v1.5) SentenceTransformers model id.

  • --max-get-bytes N (default: 75000) Byte cap for retrieved content.

  • --auto-retrieve-threshold FLOAT (default: 0.1) Score threshold (0–1) to auto-retrieve matches.

  • --auto-retrieve-limit N (default: 5) Max docs to auto-retrieve per query.

  • --no-preindex (default: off) Disable automatic pre-indexing on launch.

  • --no-background-preindex (default: off) If preindexing is on, wait for it to finish before serving.

  • --no-snippets (default: off) Disable content snippets in search results.

  • --sources ... / positional sources One or more llms.txt or llms-full.txt URLs.

  • --store {memory|disk} (default: auto) Not usually needed. Auto-selected based on --store-path. Use only to explicitly override behavior.

Development

make install  # install deps
make test     # run tests
make check    # format check, lint, type-check, tests
make fix      # auto-format and fix lint

Built on FastMCP and the Model Context Protocol. MIT license — see LICENSE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured