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

@devista/docs-mcp

v1.0.1

Published

Generic MCP server for full-text search over Markdown/MDX documentation

Readme

@devista/docs-mcp

A generic MCP server that gives AI agents (Claude Code, Cursor, etc.) full-text search over any Markdown/MDX documentation folder. Point it at your docs and your AI assistant can search, browse, and read your project documentation during development.

How It Works

The server runs as a local process communicating over stdio (the standard MCP transport). When it starts:

  1. Freshness check — compares modification times of your doc files against the last-built index
  2. Auto-rebuild — if any file changed (or the index doesn't exist yet), it parses all Markdown/MDX files, strips MDX syntax (imports, JSX component tags), extracts frontmatter, and builds a Flexsearch full-text search index
  3. Serve — exposes three MCP tools (search_docs, get_page, list_sections) that agents can call to query your documentation
  4. Cached — the index is stored in .docs-mcp/ in your working directory, so subsequent startups are instant if nothing changed

The server understands standard Markdown frontmatter (title, description) and organizes pages into sections based on directory structure (e.g. backend/payments.md belongs to the backend section).

Quick Start

Add to your project's .mcp.json:

{
  "mcpServers": {
    "docs": {
      "command": "npx",
      "args": ["-y", "@devista/docs-mcp", "--docs", "./docs"]
    }
  }
}

That's it. Restart your AI tool and the docs are queryable.

Usage Examples

Relative path — docs inside your project

When your documentation lives alongside your code:

my-project/
├── src/
├── docs/           <-- your markdown docs
├── .mcp.json
└── package.json
{
  "mcpServers": {
    "docs": {
      "command": "npx",
      "args": ["-y", "@devista/docs-mcp", "--docs", "./docs"]
    }
  }
}

Relative path — Astro/Starlight project

For documentation sites using Astro Starlight:

{
  "mcpServers": {
    "docs": {
      "command": "npx",
      "args": ["-y", "@devista/docs-mcp", "--docs", "./src/content/docs"]
    }
  }
}

Absolute path — docs in a separate repo or folder

When your docs live outside the current project (e.g. a monorepo or a separate docs repo):

{
  "mcpServers": {
    "project-docs": {
      "command": "npx",
      "args": [
        "-y", "@devista/docs-mcp",
        "--docs", "/Users/me/projects/my-docs/src/content/docs",
        "--name", "project-docs"
      ]
    }
  }
}

Multiple documentation sources

You can register multiple instances for different doc folders:

{
  "mcpServers": {
    "api-docs": {
      "command": "npx",
      "args": ["-y", "@devista/docs-mcp", "--docs", "./docs/api", "--name", "api-docs"]
    },
    "architecture-docs": {
      "command": "npx",
      "args": ["-y", "@devista/docs-mcp", "--docs", "./docs/architecture", "--name", "architecture-docs"]
    }
  }
}

Using a config file instead of CLI args

Create .docs-mcp.json in your project root:

{
  "docs": "./src/content/docs",
  "include": ["**/*.md", "**/*.mdx"],
  "exclude": ["**/drafts/**"],
  "name": "my-project-docs"
}

Then your .mcp.json simplifies to:

{
  "mcpServers": {
    "docs": {
      "command": "npx",
      "args": ["-y", "@devista/docs-mcp"]
    }
  }
}

Configuration

CLI Args

| Arg | Description | |-----|-------------| | --docs <path> | Path to documentation folder (required unless set in config file) | | --name <name> | Server name shown in MCP clients (default: docs-mcp) |

Config File (.docs-mcp.json)

| Setting | Type | Default | Description | |---------|------|---------|-------------| | docs | string | — | Path to documentation folder (required) | | include | string[] | ["**/*.md", "**/*.mdx"] | Glob patterns for files to index | | exclude | string[] | ["**/node_modules/**"] | Glob patterns for files to skip | | name | string | docs-mcp | Server name shown in MCP clients |

CLI args override config file values. Paths are resolved relative to the working directory.

Tools

search_docs

Full-text search across all documentation pages. Returns ranked results with text excerpts.

  • query (string, required) — The search query
  • limit (number, optional, default: 5) — Max results to return

get_page

Retrieve the full Markdown content of a specific page, including frontmatter metadata.

  • path (string, required) — Page path relative to docs root, without extension (e.g. backend/payments)

list_sections

List all documentation sections and their pages. Returns a structured table of contents. No parameters.

Add to .gitignore

The search index is cached locally. Add this to your .gitignore:

.docs-mcp/

License

MIT