Skip to main content
Glama

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)

Related MCP server: mdnlookup

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

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

Available Tools

6 tools
mdn_compatB

Check browser compatibility for a web feature using MDN's browser-compat-data. Returns version support across browsers. Works offline.

Inputs: feature (required).

mdn_cssA

Get CSS property formal definitions — syntax, initial value, inheritance, computed value, animation type, and more. Uses mdn-data offline.

Inputs: name (required).

mdn_docA

Fetch full documentation for a specific MDN page. Use mdn_search first to find the correct path. Supports pagination for large pages via max_length and start_index.

Inputs: path (required), sections, max_length, start_index.

mdn_httpB

Browse HTTP reference data — headers, status codes, methods. Uses BCD data offline. Returns browser compatibility for specific items.

Inputs: topic.

mdn_listB

Browse and discover BCD features by namespace. List sub-features, filter by status (deprecated/experimental), or search by keyword. Works offline.

Inputs: path, limit, query, deprecated, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 6 tools

    Disambiguation4/5

    Each tool targets a distinct aspect of MDN docs (search, full page, compatibility, CSS, BCD browsing, HTTP), though mdn_compat, mdn_list, and mdn_http all draw from BCD data and could overlap slightly for compatibility queries. Descriptions help clarify boundaries.

    Naming Consistency5/5

    All tools use the consistent mdn_ prefix with snake_case, forming a clear and predictable naming scheme even though they mix verbs and nouns. No convention mixing.

    Tool Count5/5

    Six tools is well-scoped for an MDN docs server, covering search, retrieval, and reference data without bloat. Each tool earns its place.

    Completeness5/5

    The set covers discovery (search, list), detailed retrieval (doc), compatibility (compat), and specialized offline data (css, http), providing a complete read-only documentation workflow with no obvious dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides up-to-date CSS documentation and browser compatibility data from MDN through natural language queries. Features intelligent caching and supports all CSS properties, selectors, functions, and concepts with automatic normalization.
      115 npm
      338
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables searching and summarizing MDN Web Docs documentation directly from MCP-compatible clients. Allows developers to quickly retrieve concise documentation summaries for web technologies without leaving their workflow.
      6
      ISC
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI coding agents to fetch live MDN Web Docs pages, TypeScript handbook content, and npm package metadata as clean markdown, with local search, caching, and polite throttling.
      5
      MIT