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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@writechoice/docusaurus-plugin-llms-txt

v0.1.7

Published

Docusaurus plugin that generates llms.txt, llms-full.txt, and .md routes for all pages

Readme

@writechoice/docusaurus-plugin-llms-txt

Docusaurus plugin that makes your documentation AI-readable at build time.

  • Generates /llms.txt — a structured index of all your pages following the llms.txt spec
  • Generates /llms-full.txt — all doc content merged into a single file in sidebar order
  • Serves every doc page as raw Markdown at /{path}.md
  • Injects a <link rel="alternate" type="text/plain" href="/llms.txt"> tag into every page
  • Optional functions/[[path]].js for Cloudflare Pages to handle Accept: text/markdown content negotiation
  • Optional MCP server that exposes your docs as tools AI clients (Claude Code, Cursor, Claude.ai) can query at runtime

Installation

npm install @writechoice/docusaurus-plugin-llms-txt

Usage

// docusaurus.config.js
export default {
  plugins: ['@writechoice/docusaurus-plugin-llms-txt'],
};

With options

export default {
  plugins: [
    [
      '@writechoice/docusaurus-plugin-llms-txt',
      {
        generateLlmsTxt: true,
        generateMarkdownFiles: true,
        generateLlmsFullTxt: true,
        description: 'API documentation for My Platform',
        deployTarget: 'cloudflare',
        generateMcp: true,
        maxMcpContent: 8000,
      },
    ],
  ],
};

Options

| Option | Type | Default | Description | |---|---|---|---| | generateLlmsTxt | boolean | true | Write /llms.txt to the build output | | generateMarkdownFiles | boolean | true | Write /{permalink}.md for each doc | | generateLlmsFullTxt | boolean | true | Write /llms-full.txt with all docs merged | | description | string | '' | Summary line in llms.txt (falls back to site tagline, then title) | | deployTarget | string\|null | null | Hosting target. Determines where deploy-specific files are written. Currently supports 'cloudflare'. | | generateMcp | boolean | false | Generate an MCP server that exposes your docs as queryable tools. Requires deployTarget to be set. | | maxMcpContent | number | 8000 | Maximum characters of content stored per page in the MCP index. Lower values reduce bundle size. |

What gets generated

/llms.txt

A plain-text index organized by sidebar section:

# My Site

> API documentation for My Platform

## Getting Started

- [Introduction](/getting-started.md): Overview of the platform
- [Authentication](/authentication.md): How to authenticate

## API Reference

- [Endpoints](/api/endpoints.md)

/{permalink}.md

Each doc page is available as clean Markdown (frontmatter stripped, # Title prepended):

GET /docs/introduction.md  →  # Introduction\n\nContent here...

/llms-full.txt

All docs concatenated in sidebar order, separated by ---, for feeding entire documentation to an LLM in one request.

Cloudflare Pages function

When deployTarget: 'cloudflare' is set, a functions/[[path]].js file is written to your project root during build. Cloudflare Pages picks it up alongside any other functions you have — it does not trigger Advanced Mode (_worker.js) and does not interfere with other routes in your functions/ folder. It intercepts requests with Accept: text/markdown and serves the pre-built .md file, enabling standard HTTP content negotiation.

MCP server

When generateMcp: true and deployTarget is set, the plugin generates two additional files during build:

  • functions/docs-data.json — a JSON index of all your docs (title, description, content, URL, version)
  • functions/mcp.js — a self-contained Cloudflare Pages Function that implements the Model Context Protocol over HTTP

The MCP server exposes three tools:

| Tool | Description | |---|---| | list_docs | Lists all indexed pages with title, path, and description | | get_doc | Returns the full content of one or more pages by path (batch reads supported) | | search_docs | Keyword search with relevance scoring; supports filtering by version and language |

The content served by these tools comes directly from the same .md pages the plugin generates — they are always in sync.

Connecting an AI client

After deploying, your MCP endpoint is available at https://your-site.pages.dev/mcp.

Claude Code — add to .claude/settings.json in your project:

{
  "mcpServers": {
    "docs": { "url": "https://your-site.pages.dev/mcp" }
  }
}

Cursor — Settings → MCP → Add server → paste the URL.

Claude.ai — Settings → Integrations → Add → paste the URL.

Future deploy targets

generateMcp is designed to work alongside deployTarget. Support for additional targets (Vercel, Netlify) will generate the MCP function in the correct location for each platform automatically — no other changes needed.

Compatibility

| Docusaurus | Node | |---|---| | >= 3.0.0 | >= 18 |

Companion package

This plugin handles the build side — generating the files. To give users a Copy page button in the UI that lets them copy Markdown, open the page in ChatGPT or Claude, or view the raw .md directly, install the companion theme package:

npm install @writechoice/docusaurus-theme-llms-txt

Together they cover the full AI-readiness stack: the plugin makes your content machine-readable, the theme gives users the tools to use it.

See @writechoice/docusaurus-theme-llms-txt for setup instructions.

License

MIT