mdn-mcp
Provides tools to search MDN Web Docs, fetch documentation pages with section filtering and pagination, check browser compatibility, browse BCD features, and retrieve CSS and HTTP reference data.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mdn-mcp check browser support for CSS grid"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
| Search MDN by keyword | MDN Search API (remote) |
| Fetch full documentation for a page | MDN JSON API (remote) |
| Browser compatibility check |
|
| Browse & discover BCD features by namespace |
|
| CSS property formal definitions |
|
| HTTP headers, status codes, methods reference |
|
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-mcpOr 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-mcpOr 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-mcpSee the full list of MCP clients.
Local development
git clone https://github.com/anvme/mdn-mcp.git
cd mdn-mcp
npm install
node index.jsTool Reference
mdn_search
Search MDN Web Docs by keyword.
Parameter | Type | Required | Default | Description |
| string | yes | — | Search query |
| 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 |
| string | yes | — | MDN doc path or full URL |
| string[] | no | — | Filter sections: |
| number | no | 5000 | Max characters to return (500–50000) |
| 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 |
| string | yes | BCD feature path, e.g. |
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 |
| string | no |
| BCD path to browse, e.g. |
| string | no | — | Filter features by keyword |
| boolean | no | — |
|
| boolean | no | — |
|
| 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 |
| 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 |
| string | no |
| HTTP topic path, e.g. |
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 toolsmdn_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.
mdn_searchB
Search MDN Web Docs by keyword. Returns matching documentation pages with titles, summaries, and URLs.
Inputs: query (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
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.
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.
Six tools is well-scoped for an MDN docs server, covering search, retrieval, and reference data without bloat. Each tool earns its place.
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
Related MCP Connectors
Docsy gives AI assistants current, version-specific documentation for libraries, frameworks and SDKs. Resolve library IDs and versions, then search and fetch focused official documentation with original source links using five read-only MCP tools. Hosted Streamable HTTP with OAuth 2.1 sign-in.
Web knowledge fetching tools for your agent.
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Search and read Apple developer documentation, HIG, and WWDC transcripts as Markdown.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides 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 npm338ISC
- AlicenseNot gradedqualityDmaintenanceEnables 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.6ISC
- AlicenseNot gradedqualityCmaintenanceProvides tools to search MDN documentation, get page summaries, and retrieve browser compatibility data.60 npmMIT
- AlicenseAqualityCmaintenanceEnables 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.5MIT