llms-mcp MCP Server

$git clone https://github.com/druellan/llms-mcp && cd llms-mcp && npm install
README.md

Expose llms.txt and referenced resources to provide context for AI models.

llms-mcp

An MCP (Model Context Protocol) server that exposes the llms.txt file from your project root as a resource for AI context enhancement.

Overview

llms-mcp is a MCP server that looks for the llms.txt file in the root of your project directory and exposes it as a resource that can be consumed by MCP-compatible AI clients, based on the llms.txt proposed standard.

Features

  • Detection: Finds the llms.txt file in your project root
  • File Resource: Exposes the file via file:// URI for direct content access
  • Parsing: Extracts local file references and external URLs from llms.txt content. Automatically exposes referenced local files and external URLs as additional MCP resources.
  • Fetching: Can fetch external resources on-demand.

Installation

Prerequisites

  • Node.js >= 18.0.0

Setup

  1. Clone or download this repository
  2. Install dependencies:
    npm install
    

Usage

Running the Server

Start the MCP server:

npm start

Test Mode

Validate that the server can detect your llms.txt file:

npm test

This will scan your project directory and show if an llms.txt file is detected without starting the server.

Environment Configuration

The server uses the ProjectPath environment variable to determine the root directory to scan:

export ProjectPath="/path/to/your/project"
npm start
$env:projectPath = "/path/to/your/project"; npm start

MCP Client Configuration

Claude Desktop/Cline/Roo/Kilocode

Add this configuration to your Claude Desktop config file:

{
  "mcpServers": {
    "llms-mcp": {
      "command": "node",
      "args": ["path/to/llms-mcp/src/index.js"],
      "env": {
        "ProjectPath": "./"
      }
    }
  }
}

Referenced Resources

The server automatically parses the llms.txt content and exposes referenced files and URLs as additional resources:

Local Files:

  • Markdown-style file links: [text](file.ext)

External URLs:

  • HTTP/HTTPS URLs: https://example.com
  • URLs in markdown links: [text](https://example.com)

All local files are validated for existence before being exposed as resources. External URLs are exposed as-is and fetched on-demand when accessed.

License

MIT License - see LICENSE file for details.

Related Projects

Environment Variables

ProjectPathrequiredThe root directory to scan for the llms.txt file

Configuration

claude_desktop_config.json
{"mcpServers": {"llms-mcp": {"command": "node", "args": ["path/to/llms-mcp/src/index.js"], "env": {"ProjectPath": "./"}}}}

Try it

Read the llms.txt file in my project root to understand the documentation structure.
Access the external documentation URLs referenced in my llms.txt file.
Fetch the content of the local markdown files linked in the project's llms.txt.
Scan my project directory to see if an llms.txt file is detected and available as a resource.

Frequently Asked Questions

What are the key features of llms-mcp?

Finds the llms.txt file in your project root automatically.. Exposes the llms.txt file via file:// URI for direct content access.. Extracts local file references and external URLs from llms.txt content.. Automatically exposes referenced local files and external URLs as additional MCP resources.. Fetches external resources on-demand when accessed by the AI client..

What can I use llms-mcp for?

Providing AI models with a structured entry point to project documentation via the llms.txt standard.. Automatically pulling in external API documentation or web resources linked in a project's root.. Giving Claude access to a curated list of local markdown files for better codebase context.. Validating that a project's llms.txt file is correctly formatted and all local links are resolvable..

How do I install llms-mcp?

Install llms-mcp by running: git clone https://github.com/druellan/llms-mcp && cd llms-mcp && npm install

What MCP clients work with llms-mcp?

llms-mcp works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use llms-mcp with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free