Browser Compat Mcp Server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.3.0更新於 Oct 26, 2026

Browser compatibility and Baseline status for any web feature — offline, from bundled MDN data.

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取開發者工具

概覽

AI 產生的概覽

離線查詢瀏覽器相容性:讓助理查看網頁功能的 Baseline 狀態、各瀏覽器支援情況,以及是否符合 browserslist 目標。

可以做什麼
  • 依名稱、關鍵字或寫法搜尋網頁功能,可依命名空間、Baseline 狀態、群組與 ECMAScript 快照篩選
  • 讀取單一功能的相容性紀錄:Baseline 狀態與達標日期、標準狀態、各瀏覽器版本及旗標與前綴
  • 一次檢查最多 20 個功能是否可上線,包含限制支援的瀏覽器與被排除的流量占比
  • 依明確的 browserslist 目標查詢比較功能,給出判定、覆蓋率與失敗的版本區間
  • 列出參考詞彙:BCD 命名空間、瀏覽器 id、browserslist 代理、Baseline 狀態、群組與快照
適用情境
適合在判斷某個 CSS、JavaScript、HTML 或 Web API 功能能否安全上線時使用,也適合排查舊瀏覽器中的相容性問題,或讓助理依據權威資料而非記憶回答支援情況。
執行需求
可使用公開託管的 Streamable HTTP 端點,或透過 npx/bunx(需 Node.js v24+ 或 Bun v1.4.0+)或 Docker 在本機執行。不需 API 金鑰、帳號或網路存取,資料集隨套件提供。選用的框架變數用於傳輸方式、HTTP 埠、日誌與 OpenTelemetry。
安裝前請注意
僅做唯讀查詢,執行時不寫入資料也不向第三方傳送資料。內建資料是套件快照,剛發布不久的功能可能落後。使用率為全球原始百分比,並附帶 caniuse 署名要求。若啟用 LOG_TOOL_FAILURE_PAYLOADS,失敗呼叫的參數與結果會被記錄,且去識別僅依欄位名稱比對。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Browser Compat Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cyanheads%2Fbrowser-compat-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "browser-compat": {
      "type": "http",
      "url": "https://browser-compat.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/browser-compat-mcp-server

Browser compatibility and Baseline status for any web feature — offline, from MDN's browser-compat-data, web-features, and caniuse. STDIO or Streamable HTTP.

5 Tools


Overview

Browser support and Baseline status for any web platform feature, from MDN's @mdn/browser-compat-data, web-features, and caniuse-lite usage data. Check whether a feature is safe to ship against your browserslist targets. All data ships in the package: no network calls, no API key, no rate limit.

The browser-compat-guide covers assessing code against a project's browser policy and diagnosing historical support failures. It ships with plugin, npm, Docker, and MCPB installs and is available over MCP at skill://browser-compat-guide/SKILL.md.

Tools

ToolDescription
browsercompat_list_referenceEnumerate the reference vocabulary the other tools expect — BCD namespaces and browser ids, browserslist agents, Baseline states, groups, and ECMAScript snapshots.
browsercompat_get_featureFull compatibility record for one feature: Baseline state, standards status, per-browser versions with flags and prefixes, MDN and specification links.
browsercompat_check_baselineShip-or-not across up to 20 features per call: Baseline state and date, the limiting browser, deprecation flags, and the traffic share requiring it would exclude.
browsercompat_search_featuresFind features by plain name, keyword, or code notation when the canonical key is unknown, ranked with the field that matched, filterable by group or ECMAScript snapshot, and pageable.
browsercompat_compare_supportCheck features against an explicit browserslist target query: a whole-query verdict, evaluated coverage, and failing version runs per feature.

Capability reference

browsercompat_list_reference tool

  • Required topic: bcd_namespaces (12), bcd_browsers (17), browserslist_agents (19), baseline_states (4), groups (104), or snapshots (11). Group and snapshot ids feed the search filters.
  • Entries carry id, label, and detail, plus count, reported, bcd_browser, usage_percent, maps_from, or spec_url where applicable. An agent's bcd_browser: null means support comparisons cannot evaluate it and report it in unchecked_targets.

browsercompat_get_feature tool

  • One feature, 1–200 characters: a BCD key (css.selectors.has) or web-features id (has). resolve: true (off by default) also accepts a name or notation when it matches exactly one feature. include_runtimes: true adds bun, deno, nodejs, and oculus support rows.
  • outcome is found, no_compat_data, or miss; a miss returns found: false with guidance, and whitespace-only input returns invalid_feature_input. Each support row gives the newest release's statement, with the other BCD statements for that browser in other_statements.
  • A multi-key id such as grid returns feature_support (one row per Baseline core browser) instead of support, status, mdn_url, and spec_urls; call one of its compat_keys for a key-level answer. compat_keys and subkeys page 100 at a time with compat_keys_offset and subkeys_offset (default 0). limiting_browser is the Baseline core browser with the newest required release.

browsercompat_check_baseline tool

  • BCD keys or web-features ids, 1–200 characters each. Up to 100 are accepted and the first 20 are evaluated in input order; the rest come back verbatim in omitted_features. More than 100 is rejected, and a whitespace-only entry returns invalid_feature_input.
  • Results carry Baseline state and dates, limiting_browser, deprecated, experimental, and discouraged, plus usage_percent_excluded and usage_source where caniuse covers the feature. Usage is left out when unavailable, never reported as zero.
  • all_widely_available is true only when every entry resolves at widely and none was omitted; it does not assess deprecation.

browsercompat_search_features tool

  • query, 1–100 characters, accepts names, keywords, or notation such as Array.prototype.at, display: grid, or <dialog>. Combine namespace (12 BCD namespaces), baseline (widely, newly, limited, not_mapped), group (including nested groups), and snapshot (such as ecmascript-2023).
  • matched_on says why a result ranked where it did, and support_summary covers the seven Baseline core browsers: Firefox 33 (flagged), Safari 3 (prefixed), Chrome 94 (partial), and Edge ≤18 preserve the selected verdict and addition bound; — means unsupported, removed, or preview-only, and ? means unknown. Typed failures: invalid_query (zero searchable tokens), unknown_group, unknown_snapshot.
  • Page with limit (default 10, at most 50; larger values are served as 50 and reported in cap) and offset (default 0); totalCount and nextOffset drive paging. Zero hits succeed with a notice naming a filter to drop.

browsercompat_compare_support tool

  • Up to 20 features per call against a required self-contained targets browserslist query, such as defaults or > 0.5%, last 2 versions; config packages and custom configuration are rejected, and local config discovery is disabled. Up to 100 features are accepted and the rest come back in omitted_features, which makes all_clear false. Typed failures: invalid_target_query, no_targets_resolved, invalid_feature_input.
  • Each verdict is clears, fails, inconclusive, miss, or ambiguous. A feature clears only when every target in the query was evaluated and supports it, so a query that includes a browser with no compatibility data, as defaults does, never clears. all_clear is true only when every feature clears.
  • Results report support_source, failing_ranges, failing_total, and evaluated and unchecked totals with coverage percentages. Target rows page with target_offset (default 0) and target_limit (default 10, at most 10; larger values are served as 10 and reported in cap); verdicts and totals are the same on every page, and totalCount and nextOffset drive paging.

Data sources

PackageVersionLicenseSupplies
@mdn/browser-compat-data^8.1.7CC0-1.0Per-browser support, standards status, MDN and specification links
web-features^3.44.0Apache-2.0Baseline state and dates, feature-level core-browser support, discouraged flags, groups, ECMAScript snapshots
caniuse-lite^1.0.30001819CC-BY-4.0Usage weighting, plus feature titles for the search index
browserslist^4.29.4MITTarget query resolution and coverage figures

CC BY 4.0 requires attribution wherever the caniuse data travels, so every response carrying a usage figure carries this string: Usage data from caniuse.com, © Can I Use contributors, CC BY 4.0. Figures are percentage points of global traffic. The bundled data tracks ~97.5% of global traffic; the remainder is untracked and unknown. Values are raw global percentages, without normalization to tracked traffic. Full license texts and notices are in THIRD_PARTY_NOTICES.md.


Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

Browser-compat-specific:

  • All four datasets are bundled and loaded in process — no runtime network calls, no API key, no rate limit, and nothing to configure
  • Baseline is read per browser-compat-data key from status.by_compat_key, never rolled up from the feature level, because keys under one feature legitimately disagree
  • Every tool resolves a feature the same way: exact BCD key, then web-features id, then a moved redirect
  • Target versions follow browser-compat-data's release order, with caniuse spellings normalized (safari 16.0 ↔ 16)

Agent-friendly output:

  • Every response echoes data_version, the version of each bundled dataset behind the answer
  • A pass is never claimed for a browser that was not evaluated; targets without data land in unchecked_targets and make the verdict inconclusive
  • Misses are results, not failures: found: false with guidance naming the next call, and typed errors with recovery hints
  • Usage figures state the population they are a share of and carry the caniuse attribution

Getting started

Public Hosted Instance

A public instance is available at https://browser-compat.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:

json
{  "mcpServers": {    "browser-compat-mcp-server": {      "type": "streamable-http",      "url": "https://browser-compat.caseyjhand.com/mcp"    }  }}

Self-Hosted / Local

Add the following to your MCP client configuration file:

json
{  "mcpServers": {    "browser-compat-mcp-server": {      "type": "stdio",      "command": "bunx",      "args": ["@cyanheads/browser-compat-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info"      }    }  }}

Or with npx (no Bun required):

json
{  "mcpServers": {    "browser-compat-mcp-server": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@cyanheads/browser-compat-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info"      }    }  }}

Or with Docker:

json
{  "mcpServers": {    "browser-compat-mcp-server": {      "type": "stdio",      "command": "docker",      "args": [        "run", "-i", "--rm",        "-e", "MCP_TRANSPORT_TYPE=stdio",        "ghcr.io/cyanheads/browser-compat-mcp-server:latest"      ]    }  }}

For Streamable HTTP, set the transport and start the server:

sh
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http# Server listens at http://localhost:3010/mcp

Prerequisites

  • Bun v1.4.0 or higher (or Node.js v24+).
  • No API keys, accounts, or network access required — every dataset ships with the package.

Installation

  1. Clone the repository:
sh
git clone https://github.com/cyanheads/browser-compat-mcp-server.git
  1. Navigate into the directory:
sh
cd browser-compat-mcp-server
  1. Install dependencies:
sh
bun install
  1. Configure environment (optional):
sh
cp .env.example .env# edit .env if you want to override transport or logging defaults

Configuration

There are no server-specific environment variables: no API keys, no base URLs, and deliberately no browserslist configuration variable — the target query is always a tool input rather than ambient state. Framework transport, logging, and telemetry settings remain configurable.

VariableDescriptionDefault
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTPort for the HTTP server.3010
MCP_SESSION_MODEHTTP session mode.stateless
OTEL_ENABLEDEnable OpenTelemetry.false
OTEL_EXPORTER_OTLP_ENDPOINTBase URL for traces and metrics.Unset
OTEL_EXPORTER_OTLP_LOGS_ENDPOINTOTLP log endpoint.Unset
LOG_TOOL_FAILURE_PAYLOADSLog failed-call arguments and results. Redaction matches key names only; free-form values can retain secrets.false
LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTESUTF-8 byte cap per logged payload.16384

See .env.example for the full list of optional framework overrides.


Running the server

Local development

sh
# One-time buildbun run rebuild
# Run the built serverbun run start:stdio# orbun run start:http
sh
bun run devcheck   # Lint, format, typecheck, securitybun run test       # Vitest test suitebun run lint:mcp   # Validate MCP definitions against spec

Docker

sh
docker build -t browser-compat-mcp-server .docker run --rm -p 3010:3010 browser-compat-mcp-server

The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/browser-compat-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.


Project structure

DirectoryPurpose
src/index.tscreateApp() entry point — registers the tools and warms the datasets.
src/data/The browserslist agent to browser-compat-data browser map.
src/mcp-server/tools/Tool definitions (*.tool.ts) and the output shapes they share.
src/services/bcd, baseline, targets, search, and data-version services over the bundled datasets.
src/types/Ambient module declaration for caniuse-lite, which ships no types.
skills/Published browser compatibility workflow guide.
tests/Vitest suites mirroring src/.
docs/design.md — the surface, the data shapes behind it, and the decisions log.
changelog/Per-version changelog files.

The generated file tree is docs/tree.md.


Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging, ctx.state for tenant-scoped storage
  • Register new tools directly in src/index.ts
  • Data integrity: read the bundled datasets as they are and preserve their uncertainty; never fabricate a support fact the data does not carry

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

Apache-2.0 — see LICENSE for details.

來源:README.md,提交 7cc81e5

工具

5

browsercompat_list_reference

Browsercompat List Reference

Enumerate the reference vocabulary this server uses: BCD namespaces, BCD browser ids, browserslist agent ids and their BCD counterparts, Baseline states, web-features groups, and ECMAScript snapshots. Use it to build valid inputs for the other tools and to see which target browsers can be evaluated.

輸入參數topic必填

browsercompat_get_feature

Browsercompat Get Feature

Get the compatibility record for one web feature: Baseline state and the date it crossed, deprecation and standards status, per-browser version added and removed with flags, vendor prefixes and partial-implementation notes — with every other support statement recorded for that browser, such as an earlier prefixed or flagged release, in other_statements — and the MDN and specification links. Accepts a BCD key such as css.selectors.has or a web-features id such as has; the response echoes which one it matched. A web-features id that spans several BCD keys, such as grid, returns web-features’ own feature-level release per Baseline core browser in feature_support and its compat_keys, 100 per page, in place of per-key fields. An unresolved feature returns found: false with guidance rather than an error.

輸入參數feature必填resolvesubkeys_offsetinclude_runtimescompat_keys_offset

browsercompat_check_baseline

Browsercompat Check Baseline

Check whether web features are safe to ship: Baseline state and the date it crossed, the browser and version that limits support, whether the feature is deprecated or discouraged, and the percentage points of global traffic that requiring it would exclude. Evaluates up to 20 BCD keys or web-features ids per call; up to 100 may be sent, and entries past the 20th come back unevaluated in omitted_features for the next call.

輸入參數resolvefeatures必填

browsercompat_search_features

Browsercompat Search Features

Find web features by plain name or keyword when the canonical key is unknown, across CSS, JavaScript, HTML, Web APIs, SVG, MathML, WebAssembly, and HTTP headers. Returns ranked matches with the BCD key, the web-features id, the Baseline state, a one-line support summary, and which field matched. Feed a result key into browsercompat_get_feature for the full record.

輸入參數grouplimitquery必填offsetbaselinesnapshotnamespace

browsercompat_compare_support

Browsercompat Compare Support

Compute whether a set of web features clears an explicit browserslist target query. Compares up to 20 features per call; up to 100 may be sent, and entries past the 20th come back unevaluated in omitted_features for the next call. Every call evaluates the whole query: each feature gets a verdict, the count of failing targets, those targets grouped into runs of consecutive query targets per browser in failing_ranges, and its own evaluated and unevaluated target counts with the percentage points of global traffic each covers. The target rows behind those numbers — which release each target maps to, which targets were not evaluated and why, and the failing and unevaluated targets of each feature, a failing row carrying the prefix, alternative name, or flag behind its verdict — cover at most ten query targets per call; page through them with target_offset and target_limit, and the verdicts, coverage, and totals stay identical on every page. A target counts as evaluated only where compatibility data was read for it, so a feature clears only when every target in the query was evaluated and supports it, and is inconclusive otherwise — a query that includes a browser with no compatibility data, as "defaults" does, never clears. A BCD key is judged on its own per-browser support. A web-features id spanning several keys, such as grid, is judged on the release web-features lists for the feature as a whole in each Baseline core browser, as support_source says; its other browsers are not evaluated.

輸入參數resolvetargets必填features必填target_limittarget_offset

版本歷史

7
  1. v0.3.0最新Oct 26, 2026
  2. v0.2.1Oct 16, 2026
  3. v0.2.0Sep 30, 2026
  4. v0.1.5Sep 27, 2026
  5. v0.1.4Sep 23, 2026
  6. v0.1.3Sep 20, 2026
  7. v0.1.2Sep 20, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分