npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mcp-get-community/server-llm-txt

v0.6.2

Published

MCP server that extracts and serves context from llm.txt files, enabling AI models to understand file structure, dependencies, and code relationships in development environments

Downloads

163

Readme

LLM.txt MCP Server

MCP Package

A Model Context Protocol (MCP) server that extracts and serves context from llm.txt files, enabling AI models to understand file structure, dependencies, and code relationships in development environments. This server provides comprehensive access to the LLM.txt Directory, supporting file listing, content retrieval, and advanced multi-query search capabilities.

Features

  • Directory listing with local caching (24-hour cache)
  • OS-specific cache locations:
    • Windows: %LOCALAPPDATA%\llm-txt-mcp
    • macOS: ~/Library/Caches/llm-txt-mcp
    • Linux: ~/.cache/llm-txt-mcp
  • Multi-query search with context

Installation

Recommended: Using MCP Get

The easiest way to install is using MCP Get, which will automatically configure the server in Claude Desktop:

npx @michaellatman/mcp-get@latest install @mcp-get-community/server-llm-txt

Manual Configuration

Alternatively, you can manually configure the server in your Claude Desktop configuration by adding this to your claude_desktop_config.json:

{
  "mcpServers": {
    "llm-txt": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-llm-txt"
      ]
    }
  }
}

Tools

1. list_llm_txt

Lists all available LLM.txt files from the directory. Results are cached locally for 24 hours.

Example response:

[
  {
    "id": 1,
    "url": "https://docs.squared.ai/llms.txt",
    "name": "AI Squared",
    "description": "AI Squared provides a data and AI integration platform that helps make intelligent insights accessible to all."
  }
]

2. get_llm_txt

Fetches content from an LLM.txt file by ID (obtained from list_llm_txt).

Parameters:

  • id: The numeric ID of the LLM.txt file

Example response:

{
  "id": 1,
  "url": "https://docs.squared.ai/llms.txt",
  "name": "AI Squared",
  "description": "AI Squared provides a data and AI integration platform that helps make intelligent insights accessible to all.",
  "content": "# AI Squared\n\n## Docs\n\n- [Create Catalog](https://docs.squared.ai/api-reference/catalogs/create_catalog)\n- [Update Catalog](https://docs.squared.ai/api-reference/catalogs/update_catalog)\n..."
}

3. search_llm_txt

Search for multiple substrings within an LLM.txt file.

Parameters:

  • id: The numeric ID of the LLM.txt file
  • queries: Array of strings to search for (case-insensitive)
  • context_lines (optional): Number of lines to show before and after matches (default: 2)

Example response:

{
  "id": 1,
  "url": "https://docs.squared.ai/llms.txt",
  "name": "AI Squared",
  "matches": [
    {
      "lineNumber": 42,
      "snippet": "- [PostgreSQL](https://docs.squared.ai/guides/data-integration/destinations/database/postgresql): PostgreSQL\n popularly known as Postgres, is a powerful, open-source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale data workloads.\n- [null](https://docs.squared.ai/guides/data-integration/destinations/e-commerce/facebook-product-catalog)",
      "matchedLine": "- [PostgreSQL](https://docs.squared.ai/guides/data-integration/destinations/database/postgresql): PostgreSQL\n popularly known as Postgres, is a powerful, open-source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale data workloads.",
      "matchedQueries": ["postgresql", "database"]
    }
  ]
}

FAQ

Why do the tools use numeric IDs instead of string identifiers?

While the examples above show string IDs for clarity, the actual implementation uses numeric IDs. We found that when using string IDs (like domain names or slugs), language models were more likely to hallucinate plausible-looking but non-existent LLM.txt files. Using opaque numeric IDs encourages models to actually check the list of available files first rather than guessing at possible IDs.

Development

To run in development mode with automatic recompilation:

npm install
npm run watch

License

MIT