Skip to main content
Glama

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.

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/druellan/llms-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server