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

mdn-mcp

v1.0.0

Published

MCP server for MDN Web Docs — search documentation, fetch pages, check browser compatibility, browse features, CSS definitions, and HTTP reference.

Readme

mdn-mcp

MCP server for MDN Web Docs — search documentation, fetch pages, and check browser compatibility right from your AI assistant.

Features

| Tool | Description | Data Source | |------|-------------|-------------| | mdn_search | Search MDN by keyword | MDN Search API (remote) | | mdn_doc | Fetch full documentation for a page | MDN JSON API (remote) | | mdn_compat | Browser compatibility check | @mdn/browser-compat-data (offline) | | mdn_list | Browse & discover BCD features by namespace | @mdn/browser-compat-data (offline) | | mdn_css | CSS property formal definitions | mdn-data (offline) | | mdn_http | HTTP headers, status codes, methods reference | @mdn/browser-compat-data (offline) |

Setup

No installation needed — just configure your MCP client:

Add to .vscode/mcp.json:

{
  "servers": {
    "mdn": {
      "command": "npx",
      "args": ["-y", "mdn-mcp"]
    }
  }
}

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "mdn": {
      "command": "npx",
      "args": ["-y", "mdn-mcp"]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "mdn": {
      "command": "npx",
      "args": ["-y", "mdn-mcp"]
    }
  }
}

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "mdn": {
      "command": "npx",
      "args": ["-y", "mdn-mcp"]
    }
  }
}
claude mcp add --transport stdio mdn -- npx -y mdn-mcp

Or add to .mcp.json (shared with team):

{
  "mcpServers": {
    "mdn": {
      "command": "npx",
      "args": ["-y", "mdn-mcp"]
    }
  }
}

Add to settings.json:

{
  "context_servers": {
    "mdn": {
      "command": "npx",
      "args": ["-y", "mdn-mcp"]
    }
  }
}

Open Settings → Tools → AI Assistant → MCP, click +, and paste:

{
  "mcpServers": {
    "mdn": {
      "command": "npx",
      "args": ["-y", "mdn-mcp"]
    }
  }
}
gemini mcp add mdn -- npx -y mdn-mcp

Or add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "mdn": {
      "command": "npx",
      "args": ["-y", "mdn-mcp"]
    }
  }
}

Any MCP client that supports stdio transport can use this server. The command is:

npx -y mdn-mcp

See the full list of MCP clients.

Local development

git clone https://github.com/anvme/mdn-mcp.git
cd mdn-mcp
npm install
node index.js

Tool Reference

mdn_search

Search MDN Web Docs by keyword.

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | query | string | yes | — | Search query | | limit | number | no | 5 | Max results (1–20) |

Example: { "query": "Array.map", "limit": 3 }

mdn_doc

Fetch full documentation for a specific MDN page. Supports pagination for large pages.

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | path | string | yes | — | MDN doc path or full URL | | sections | string[] | no | — | Filter sections: syntax, description, parameters, return_value, examples, see_also | | max_length | number | no | 5000 | Max characters to return (500–50000) | | start_index | number | no | 0 | Character offset for pagination |

Example: { "path": "Web/CSS/grid", "sections": ["syntax", "description"] }

mdn_compat

Check browser compatibility for a web feature. Works offline.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | feature | string | yes | BCD feature path, e.g. css.properties.grid, api.fetch, javascript.builtins.Array.map |

Example: { "feature": "javascript.builtins.Array.map" }

Returns a Markdown table with version support for Chrome, Edge, Firefox, Safari, Opera, iOS Safari, Chrome Android, Firefox Android, Node.js, Deno, and Bun.

mdn_list

Browse and discover BCD features by namespace. Filter by keyword or status.

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | path | string | no | "" | BCD path to browse, e.g. css.properties, api, javascript.builtins | | query | string | no | — | Filter features by keyword | | deprecated | boolean | no | — | true = only deprecated, false = exclude deprecated | | experimental | boolean | no | — | true = only experimental, false = exclude experimental | | limit | number | no | 50 | Max features to return (1–200) |

Examples:

  • { "path": "css.properties", "query": "grid" } — find CSS grid-related properties
  • { "path": "api", "deprecated": true, "limit": 20 } — list deprecated Web APIs
  • { "path": "" } — show all top-level BCD namespaces

mdn_css

Get CSS property formal definitions — syntax, initial value, inheritance, computed value, animation type, and more. Works offline.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | name | string | yes | CSS property, function, at-rule, selector, type, or unit name |

Examples:

  • { "name": "grid" } — full grid shorthand definition
  • { "name": "display" } — display property formal syntax
  • { "name": ":hover" } — :hover selector info
  • { "name": "calc" } — calc() function info

mdn_http

Browse HTTP reference data — headers, status codes, methods, with browser compatibility.

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | topic | string | no | "" | HTTP topic path, e.g. headers, headers.Content-Type, status.200 |

Examples:

  • { "topic": "" } — list all HTTP categories
  • { "topic": "headers" } — list all HTTP headers
  • { "topic": "headers.Content-Type" } — browser compat for Content-Type
  • { "topic": "status" } — list all HTTP status codes

Prerequisites

  • Node.js >= 18

License

MIT