@cyanheads/browser-compat-mcp-server 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/AGENTS.md +451 -0
  2. package/CLAUDE.md +451 -0
  3. package/Dockerfile +140 -0
  4. package/LICENSE +201 -0
  5. package/README.md +306 -0
  6. package/THIRD_PARTY_NOTICES.md +279 -0
  7. package/changelog/0.1.x/0.1.1.md +20 -0
  8. package/changelog/template.md +151 -0
  9. package/dist/data/browserslist-bcd-map.d.ts +40 -0
  10. package/dist/data/browserslist-bcd-map.d.ts.map +1 -0
  11. package/dist/data/browserslist-bcd-map.js +42 -0
  12. package/dist/data/browserslist-bcd-map.js.map +1 -0
  13. package/dist/index.d.ts +7 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +51 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.d.ts +79 -0
  18. package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.d.ts.map +1 -0
  19. package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.js +213 -0
  20. package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.js.map +1 -0
  21. package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.d.ts +103 -0
  22. package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.d.ts.map +1 -0
  23. package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.js +320 -0
  24. package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.js.map +1 -0
  25. package/dist/mcp-server/tools/definitions/browsercompat-get-feature.tool.d.ts +110 -0
  26. package/dist/mcp-server/tools/definitions/browsercompat-get-feature.tool.d.ts.map +1 -0
  27. package/dist/mcp-server/tools/definitions/browsercompat-get-feature.tool.js +229 -0
  28. package/dist/mcp-server/tools/definitions/browsercompat-get-feature.tool.js.map +1 -0
  29. package/dist/mcp-server/tools/definitions/browsercompat-list-reference.tool.d.ts +40 -0
  30. package/dist/mcp-server/tools/definitions/browsercompat-list-reference.tool.d.ts.map +1 -0
  31. package/dist/mcp-server/tools/definitions/browsercompat-list-reference.tool.js +237 -0
  32. package/dist/mcp-server/tools/definitions/browsercompat-list-reference.tool.js.map +1 -0
  33. package/dist/mcp-server/tools/definitions/browsercompat-search-features.tool.d.ts +79 -0
  34. package/dist/mcp-server/tools/definitions/browsercompat-search-features.tool.d.ts.map +1 -0
  35. package/dist/mcp-server/tools/definitions/browsercompat-search-features.tool.js +208 -0
  36. package/dist/mcp-server/tools/definitions/browsercompat-search-features.tool.js.map +1 -0
  37. package/dist/mcp-server/tools/definitions/compat-shapes.d.ts +96 -0
  38. package/dist/mcp-server/tools/definitions/compat-shapes.d.ts.map +1 -0
  39. package/dist/mcp-server/tools/definitions/compat-shapes.js +164 -0
  40. package/dist/mcp-server/tools/definitions/compat-shapes.js.map +1 -0
  41. package/dist/services/baseline/baseline-service.d.ts +45 -0
  42. package/dist/services/baseline/baseline-service.d.ts.map +1 -0
  43. package/dist/services/baseline/baseline-service.js +119 -0
  44. package/dist/services/baseline/baseline-service.js.map +1 -0
  45. package/dist/services/baseline/feature-resolver.d.ts +21 -0
  46. package/dist/services/baseline/feature-resolver.d.ts.map +1 -0
  47. package/dist/services/baseline/feature-resolver.js +85 -0
  48. package/dist/services/baseline/feature-resolver.js.map +1 -0
  49. package/dist/services/baseline/types.d.ts +83 -0
  50. package/dist/services/baseline/types.d.ts.map +1 -0
  51. package/dist/services/baseline/types.js +8 -0
  52. package/dist/services/baseline/types.js.map +1 -0
  53. package/dist/services/bcd/bcd-service.d.ts +89 -0
  54. package/dist/services/bcd/bcd-service.d.ts.map +1 -0
  55. package/dist/services/bcd/bcd-service.js +420 -0
  56. package/dist/services/bcd/bcd-service.js.map +1 -0
  57. package/dist/services/bcd/types.d.ts +54 -0
  58. package/dist/services/bcd/types.d.ts.map +1 -0
  59. package/dist/services/bcd/types.js +7 -0
  60. package/dist/services/bcd/types.js.map +1 -0
  61. package/dist/services/data-version/data-version-service.d.ts +21 -0
  62. package/dist/services/data-version/data-version-service.d.ts.map +1 -0
  63. package/dist/services/data-version/data-version-service.js +60 -0
  64. package/dist/services/data-version/data-version-service.js.map +1 -0
  65. package/dist/services/search/search-service.d.ts +37 -0
  66. package/dist/services/search/search-service.d.ts.map +1 -0
  67. package/dist/services/search/search-service.js +264 -0
  68. package/dist/services/search/search-service.js.map +1 -0
  69. package/dist/services/search/types.d.ts +37 -0
  70. package/dist/services/search/types.d.ts.map +1 -0
  71. package/dist/services/search/types.js +7 -0
  72. package/dist/services/search/types.js.map +1 -0
  73. package/dist/services/targets/targets-service.d.ts +58 -0
  74. package/dist/services/targets/targets-service.d.ts.map +1 -0
  75. package/dist/services/targets/targets-service.js +176 -0
  76. package/dist/services/targets/targets-service.js.map +1 -0
  77. package/dist/services/targets/types.d.ts +28 -0
  78. package/dist/services/targets/types.d.ts.map +1 -0
  79. package/dist/services/targets/types.js +7 -0
  80. package/dist/services/targets/types.js.map +1 -0
  81. package/package.json +118 -0
  82. package/server.json +99 -0
@@ -0,0 +1,279 @@
1
+ # Third-party notices
2
+
3
+ browser-compat-mcp-server ships four upstream datasets inside the package and answers every
4
+ request from them, with no network call at runtime. This file carries the licenses and
5
+ attribution those datasets require.
6
+
7
+ | Dataset | Version range | License | Source |
8
+ |:--------|:--------------|:--------|:-------|
9
+ | `@mdn/browser-compat-data` | ^8.1.1 | CC0-1.0 | https://github.com/mdn/browser-compat-data |
10
+ | `web-features` | ^3.38.0 | Apache-2.0 | https://github.com/web-platform-dx/web-features |
11
+ | `caniuse-lite` | ^1.0.30001810 | CC-BY-4.0 | https://github.com/browserslist/caniuse-lite |
12
+ | `browserslist` | ^4.29.0 | MIT | https://github.com/browserslist/browserslist |
13
+
14
+ Every tool response echoes the exact version of each dataset it answered from, under
15
+ `data_version`.
16
+
17
+ ---
18
+
19
+ ## @mdn/browser-compat-data — CC0-1.0
20
+
21
+ Browser compatibility data provided by MDN Web Docs contributors, dedicated to the public
22
+ domain under CC0 1.0 Universal. CC0 imposes no attribution obligation; the credit here is
23
+ offered as a courtesy.
24
+
25
+ Full dedication: https://creativecommons.org/publicdomain/zero/1.0/
26
+
27
+ ---
28
+
29
+ ## web-features — Apache-2.0
30
+
31
+ Baseline status data from the W3C WebDX Community Group's `web-features` project.
32
+
33
+ The package ships `LICENSE.txt` and no `NOTICE` file, so Apache-2.0 §4(d) adds no obligation
34
+ beyond carrying the license text below and stating this attribution.
35
+
36
+ ```
37
+ Apache License
38
+ Version 2.0, January 2004
39
+ http://www.apache.org/licenses/
40
+
41
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
42
+
43
+ 1. Definitions.
44
+
45
+ "License" shall mean the terms and conditions for use, reproduction,
46
+ and distribution as defined by Sections 1 through 9 of this document.
47
+
48
+ "Licensor" shall mean the copyright owner or entity authorized by
49
+ the copyright owner that is granting the License.
50
+
51
+ "Legal Entity" shall mean the union of the acting entity and all
52
+ other entities that control, are controlled by, or are under common
53
+ control with that entity. For the purposes of this definition,
54
+ "control" means (i) the power, direct or indirect, to cause the
55
+ direction or management of such entity, whether by contract or
56
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
57
+ outstanding shares, or (iii) beneficial ownership of such entity.
58
+
59
+ "You" (or "Your") shall mean an individual or Legal Entity
60
+ exercising permissions granted by this License.
61
+
62
+ "Source" form shall mean the preferred form for making modifications,
63
+ including but not limited to software source code, documentation
64
+ source, and configuration files.
65
+
66
+ "Object" form shall mean any form resulting from mechanical
67
+ transformation or translation of a Source form, including but
68
+ not limited to compiled object code, generated documentation,
69
+ and conversions to other media types.
70
+
71
+ "Work" shall mean the work of authorship, whether in Source or
72
+ Object form, made available under the License, as indicated by a
73
+ copyright notice that is included in or attached to the work
74
+ (an example is provided in the Appendix below).
75
+
76
+ "Derivative Works" shall mean any work, whether in Source or Object
77
+ form, that is based on (or derived from) the Work and for which the
78
+ editorial revisions, annotations, elaborations, or other modifications
79
+ represent, as a whole, an original work of authorship. For the purposes
80
+ of this License, Derivative Works shall not include works that remain
81
+ separable from, or merely link (or bind by name) to the interfaces of,
82
+ the Work and Derivative Works thereof.
83
+
84
+ "Contribution" shall mean any work of authorship, including
85
+ the original version of the Work and any modifications or additions
86
+ to that Work or Derivative Works thereof, that is intentionally
87
+ submitted to Licensor for inclusion in the Work by the copyright owner
88
+ or by an individual or Legal Entity authorized to submit on behalf of
89
+ the copyright owner. For the purposes of this definition, "submitted"
90
+ means any form of electronic, verbal, or written communication sent
91
+ to the Licensor or its representatives, including but not limited to
92
+ communication on electronic mailing lists, source code control systems,
93
+ and issue tracking systems that are managed by, or on behalf of, the
94
+ Licensor for the purpose of discussing and improving the Work, but
95
+ excluding communication that is conspicuously marked or otherwise
96
+ designated in writing by the copyright owner as "Not a Contribution."
97
+
98
+ "Contributor" shall mean Licensor and any individual or Legal Entity
99
+ on behalf of whom a Contribution has been received by Licensor and
100
+ subsequently incorporated within the Work.
101
+
102
+ 2. Grant of Copyright License. Subject to the terms and conditions of
103
+ this License, each Contributor hereby grants to You a perpetual,
104
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
105
+ copyright license to reproduce, prepare Derivative Works of,
106
+ publicly display, publicly perform, sublicense, and distribute the
107
+ Work and such Derivative Works in Source or Object form.
108
+
109
+ 3. Grant of Patent License. Subject to the terms and conditions of
110
+ this License, each Contributor hereby grants to You a perpetual,
111
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
112
+ (except as stated in this section) patent license to make, have made,
113
+ use, offer to sell, sell, import, and otherwise transfer the Work,
114
+ where such license applies only to those patent claims licensable
115
+ by such Contributor that are necessarily infringed by their
116
+ Contribution(s) alone or by combination of their Contribution(s)
117
+ with the Work to which such Contribution(s) was submitted. If You
118
+ institute patent litigation against any entity (including a
119
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
120
+ or a Contribution incorporated within the Work constitutes direct
121
+ or contributory patent infringement, then any patent licenses
122
+ granted to You under this License for that Work shall terminate
123
+ as of the date such litigation is filed.
124
+
125
+ 4. Redistribution. You may reproduce and distribute copies of the
126
+ Work or Derivative Works thereof in any medium, with or without
127
+ modifications, and in Source or Object form, provided that You
128
+ meet the following conditions:
129
+
130
+ (a) You must give any other recipients of the Work or
131
+ Derivative Works a copy of this License; and
132
+
133
+ (b) You must cause any modified files to carry prominent notices
134
+ stating that You changed the files; and
135
+
136
+ (c) You must retain, in the Source form of any Derivative Works
137
+ that You distribute, all copyright, patent, trademark, and
138
+ attribution notices from the Source form of the Work,
139
+ excluding those notices that do not pertain to any part of
140
+ the Derivative Works; and
141
+
142
+ (d) If the Work includes a "NOTICE" text file as part of its
143
+ distribution, then any Derivative Works that You distribute must
144
+ include a readable copy of the attribution notices contained
145
+ within such NOTICE file, excluding those notices that do not
146
+ pertain to any part of the Derivative Works, in at least one
147
+ of the following places: within a NOTICE text file distributed
148
+ as part of the Derivative Works; within the Source form or
149
+ documentation, if provided along with the Derivative Works; or,
150
+ within a display generated by the Derivative Works, if and
151
+ wherever such third-party notices normally appear. The contents
152
+ of the NOTICE file are for informational purposes only and
153
+ do not modify the License. You may add Your own attribution
154
+ notices within Derivative Works that You distribute, alongside
155
+ or as an addendum to the NOTICE text from the Work, provided
156
+ that such additional attribution notices cannot be construed
157
+ as modifying the License.
158
+
159
+ You may add Your own copyright statement to Your modifications and
160
+ may provide additional or different license terms and conditions
161
+ for use, reproduction, or distribution of Your modifications, or
162
+ for any such Derivative Works as a whole, provided Your use,
163
+ reproduction, and distribution of the Work otherwise complies with
164
+ the conditions stated in this License.
165
+
166
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
167
+ any Contribution intentionally submitted for inclusion in the Work
168
+ by You to the Licensor shall be under the terms and conditions of
169
+ this License, without any additional terms or conditions.
170
+ Notwithstanding the above, nothing herein shall supersede or modify
171
+ the terms of any separate license agreement you may have executed
172
+ with Licensor regarding such Contributions.
173
+
174
+ 6. Trademarks. This License does not grant permission to use the trade
175
+ names, trademarks, service marks, or product names of the Licensor,
176
+ except as required for reasonable and customary use in describing the
177
+ origin of the Work and reproducing the content of the NOTICE file.
178
+
179
+ 7. Disclaimer of Warranty. Unless required by applicable law or
180
+ agreed to in writing, Licensor provides the Work (and each
181
+ Contributor provides its Contributions) on an "AS IS" BASIS,
182
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
183
+ implied, including, without limitation, any warranties or conditions
184
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
185
+ PARTICULAR PURPOSE. You are solely responsible for determining the
186
+ appropriateness of using or redistributing the Work and assume any
187
+ risks associated with Your exercise of permissions under this License.
188
+
189
+ 8. Limitation of Liability. In no event and under no legal theory,
190
+ whether in tort (including negligence), contract, or otherwise,
191
+ unless required by applicable law (such as deliberate and grossly
192
+ negligent acts) or agreed to in writing, shall any Contributor be
193
+ liable to You for damages, including any direct, indirect, special,
194
+ incidental, or consequential damages of any character arising as a
195
+ result of this License or out of the use or inability to use the
196
+ Work (including but not limited to damages for loss of goodwill,
197
+ work stoppage, computer failure or malfunction, or any and all
198
+ other commercial damages or losses), even if such Contributor
199
+ has been advised of the possibility of such damages.
200
+
201
+ 9. Accepting Warranty or Additional Liability. While redistributing
202
+ the Work or Derivative Works thereof, You may choose to offer,
203
+ and charge a fee for, acceptance of support, warranty, indemnity,
204
+ or other liability obligations and/or rights consistent with this
205
+ License. However, in accepting such obligations, You may act only
206
+ on Your own behalf and on Your sole responsibility, not on behalf
207
+ of any other Contributor, and only if You agree to indemnify,
208
+ defend, and hold each Contributor harmless for any liability
209
+ incurred by, or claims asserted against, such Contributor by reason
210
+ of your accepting any such warranty or additional liability.
211
+
212
+ END OF TERMS AND CONDITIONS
213
+
214
+ APPENDIX: How to apply the Apache License to your work.
215
+
216
+ To apply the Apache License to your work, attach the following
217
+ boilerplate notice, with the fields enclosed by brackets "[]"
218
+ replaced with your own identifying information. (Don't include
219
+ the brackets!) The text should be enclosed in the appropriate
220
+ comment syntax for the file format. We also recommend that a
221
+ file or class name and description of purpose be included on the
222
+ same "printed page" as the copyright notice for easier
223
+ identification within third-party archives.
224
+
225
+ Copyright [yyyy] [name of copyright owner]
226
+
227
+ Licensed under the Apache License, Version 2.0 (the "License");
228
+ you may not use this file except in compliance with the License.
229
+ You may obtain a copy of the License at
230
+
231
+ http://www.apache.org/licenses/LICENSE-2.0
232
+
233
+ Unless required by applicable law or agreed to in writing, software
234
+ distributed under the License is distributed on an "AS IS" BASIS,
235
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
236
+ See the License for the specific language governing permissions and
237
+ limitations under the License.
238
+ ```
239
+
240
+ ---
241
+
242
+ ## caniuse-lite — CC BY 4.0
243
+
244
+ Browser usage and support statistics from the Can I Use project, licensed under the Creative
245
+ Commons Attribution 4.0 International License. CC BY 4.0 requires attribution wherever the
246
+ data is conveyed, so alongside this file every tool response that quotes a usage percentage
247
+ carries this string verbatim in its `attribution` field:
248
+
249
+ > Usage data from caniuse.com, © Can I Use contributors, CC BY 4.0. Figures are a share of
250
+ > the ~96.7% of global traffic caniuse tracks.
251
+
252
+ Full license: https://creativecommons.org/licenses/by/4.0/legalcode
253
+
254
+ ---
255
+
256
+ ## browserslist — MIT
257
+
258
+ ```
259
+ The MIT License (MIT)
260
+
261
+ Copyright 2014 Andrey Sitnik <andrey@sitnik.es> and other contributors
262
+
263
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
264
+ this software and associated documentation files (the "Software"), to deal in
265
+ the Software without restriction, including without limitation the rights to
266
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
267
+ the Software, and to permit persons to whom the Software is furnished to do so,
268
+ subject to the following conditions:
269
+
270
+ The above copyright notice and this permission notice shall be included in all
271
+ copies or substantial portions of the Software.
272
+
273
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
274
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
275
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
276
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
277
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
278
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
279
+ ```
@@ -0,0 +1,20 @@
1
+ ---
2
+ summary: "Five browsercompat_* tools answering browser support and Baseline questions offline from bundled @mdn/browser-compat-data, web-features, caniuse-lite, and browserslist — no API key, no network, and no verdict claimed for a target browser the data could not evaluate."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.1.1 — 2026-09-19
8
+
9
+ ## Added
10
+
11
+ - **`browsercompat_get_feature`** — one feature's full record: Baseline state and the date it crossed, standards status, per-browser version added and removed with flags and prefixes, MDN and specification links. Takes a BCD key (`css.selectors.has`) or a web-features id (`has`) and echoes `resolved_as` for which one matched.
12
+ - **`browsercompat_check_baseline`** — ship-or-not across up to 20 features per call: Baseline state and dates, the limiting browser, `deprecated` / `experimental` / `discouraged`, and the traffic share requiring each feature would exclude. `all_widely_available` turns on Baseline alone; deprecation does not enter it.
13
+ - **`browsercompat_compare_support`** — per-feature verdicts against a required browserslist query, naming each failing target with the reason (`partial`, `prefixed`, `flagged`, `removed`, `unsupported`, `preview_only`) and the traffic share the evaluated targets cover.
14
+ - **`browsercompat_search_features`** — the canonical key behind a plain-language name, ranked with `matched_on` naming the field that matched, filterable by BCD namespace and Baseline state.
15
+ - **`browsercompat_list_reference`** — the vocabulary the other tools expect, one `topic` at a time: BCD namespaces and browser ids, browserslist agents and their BCD counterparts, Baseline states, web-features groups, ECMAScript snapshots.
16
+ - **Four datasets ship inside the package** — `@mdn/browser-compat-data` `^8.1.1`, `web-features` `^3.38.0`, `caniuse-lite` `^1.0.30001810`, `browserslist` `^4.29.0`. No runtime network call, no API key, no rate limit, no server-specific environment variable; every response echoes `data_version`, since a pinned snapshot goes stale on exactly the newest features.
17
+ - **Baseline reported per browser-compat-data key, in four states** — `widely`, `newly`, `limited`, and `not_mapped` for a key outside the web-features mapping. Read from `status.by_compat_key` rather than rolled up from the feature, because keys under one feature legitimately disagree.
18
+ - **`unchecked_targets`** — every resolved target the server declined to judge, with `no_bcd_browser`, `unknown_version`, or `no_bcd_data`. `all_clear` requires the list empty, so support is never claimed for a browser that was not evaluated.
19
+ - **Misses are results, not errors** — an unresolved feature returns `found: false` with `guidance` naming the next call; typed failures carry recovery hints for the input a caller has to fix.
20
+ - **caniuse attribution on every response carrying a usage figure** — CC BY 4.0 requires it wherever the data travels, so it rides the `attribution` enrichment field into both `structuredContent` and `content[]`. Full license texts are in `THIRD_PARTY_NOTICES.md`.
@@ -0,0 +1,151 @@
1
+ ---
2
+ # FORMAT REFERENCE — do not edit. Copy this file to
3
+ # `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.8.x/0.8.6.md`)
4
+ # to author a new release. Set that file's H1 to `# <version> — YYYY-MM-DD`
5
+ # with a concrete date.
6
+
7
+ # Required. One-line GitHub Release-style headline. 350 character cap — a
8
+ # ceiling, not a target. Default short and scannable. Don't pad, don't stitch
9
+ # unrelated changes with commas/semicolons into an inventory — pick the one
10
+ # headline the release is about. Quotes required: unquoted YAML treats
11
+ # `: ` inside the value as a key separator and fails GitHub's strict parser.
12
+ summary: ""
13
+
14
+ # Set `true` when consumers must change code to upgrade: API removals,
15
+ # signature changes, config renames, behavior changes that break existing
16
+ # usage. Flagged as `Breaking` in the rollup.
17
+ breaking: false
18
+
19
+ # Set `true` ONLY for a security fix in THIS project's own source code — a
20
+ # vulnerability or hardening in code you ship. A dependency or transitive CVE
21
+ # bump is routine maintenance, NOT a security release: record it under
22
+ # `## Dependencies` (with the advisory ID) and leave this `false`. When true,
23
+ # pairs with the `## Security` section below and flags `Security` in the rollup.
24
+ security: false
25
+
26
+ # Optional free-form notes for maintenance agents processing this release.
27
+ # Not rendered in CHANGELOG — consumed by agents running `maintenance` on
28
+ # downstream servers. ADOPTION STEPS ONLY — new files to create, fields to
29
+ # populate, one-time migration steps. Never a second rendering of the body:
30
+ # if a body bullet already says it, name the bullet's symbol instead of
31
+ # re-explaining. Omit the field entirely when there's nothing to say.
32
+ # agent-notes: |
33
+ # <instructions for downstream maintenance agents>
34
+ ---
35
+
36
+ # <version> — YYYY-MM-DD
37
+
38
+ <!--
39
+ AUTHORING GUIDE — applies to the new per-version file you create from this
40
+ template.
41
+
42
+ Audience: someone scanning release notes to decide what affects them. Lead
43
+ each bullet with the symbol or concept name in **bold** so they can skip
44
+ what's irrelevant and zoom in on what's not.
45
+
46
+ Tone: terse, fact-dense, not verbose. Bullet shape: **symbol** + what
47
+ changed + at most one consumer-facing caveat. One sentence by default, two
48
+ when the second carries weight — a bullet past ~40 words or three sentences
49
+ is wrong. The depth lives one hop away: the linked issue carries the why,
50
+ the commit diff carries the how. The changelog names what changed and what
51
+ a consumer does about it; a reader who wants mechanism opens the link.
52
+
53
+ Model length on THIS guide, never on the previous entry — entries modeled
54
+ on entries compound.
55
+
56
+ Cut (each has shipped as a wall of text; these are the cruft):
57
+ - History/justification narration — how the bug worked, why the old
58
+ behavior was wrong. One short clause at most; the issue carries the story.
59
+ - Design-rationale defense — "chosen over Y because…", "guarding the
60
+ getter is not enough…". That is the author arguing with a reviewer;
61
+ reviewers read the PR, not the changelog.
62
+ - Defensive unchanged-clauses — "X is unchanged", "byte-identical to
63
+ <prev>". Keep one only where its absence would cause a real misread,
64
+ as a short parenthetical.
65
+ - Edge-case inventories — marker lists, not-flagged lists, escape tables.
66
+ Tests and the issue carry those.
67
+ - Mechanism walkthroughs (JSDoc, CLAUDE.md/AGENTS.md, or the relevant
68
+ skill own those), ceremonial framings ("This release introduces…"),
69
+ backwards-compat paragraphs, file-by-file test enumerations. Prefer
70
+ code/symbol names over English re-explanations.
71
+
72
+ Verified ≠ included: the every-claim-verified-from-the-diff rule bounds
73
+ the TRUTH of what you write, never the AMOUNT.
74
+
75
+ Example — same fact, right size:
76
+
77
+ TOO LONG: **`fetchWithTimeout`'s `timeoutMs` bounds the whole exchange**
78
+ (#341). `fetch` resolves once headers arrive and the deadline was
79
+ cleared as the helper returned, so a peer that answered promptly and
80
+ then stalled the stream held the request open indefinitely. A 2xx
81
+ carrying a body now comes back as a passthrough wrapper that disarms
82
+ the deadline when the body closes, errors, or is cancelled; …
83
+ [+90 more words of mechanism and edge cases]
84
+
85
+ RIGHT: **`fetchWithTimeout`'s `timeoutMs` now bounds the whole
86
+ exchange, not just the headers** (#341). A stalled body aborts with
87
+ the same `Timeout` error; the returned `Response` is a wrapper, so
88
+ identity assertions (`toBe(response)`) no longer hold.
89
+
90
+ Narrative intro: skip by default. Add one short sentence only when the
91
+ release theme genuinely needs framing the bullets can't carry. When many
92
+ bullets share one upgrade consequence, state it ONCE — intro line or
93
+ agent-notes — never per bullet.
94
+
95
+ Sections: Keep a Changelog order — Added, Changed, Deprecated, Removed,
96
+ Fixed, Security. Include only sections with entries; delete the rest
97
+ (including the commented-out scaffolding below). Don't ship empty headers.
98
+
99
+ Include: every distinct fact a reader needs to adopt or audit the release —
100
+ new exports, signatures, lint rule IDs, env vars, breaking changes, version
101
+ bumps on shipped skills. Nothing more.
102
+
103
+ Links: link issues, PRs, docs, or skills where they help a reader jump to
104
+ context. Once per item per entry — don't re-link the same issue in summary,
105
+ narrative, and bullet. Skip links for inline symbol names; code spans speak
106
+ for themselves.
107
+
108
+ Issue/PR URLs: use full URLs. GitHub's bare `#NN` auto-link only resolves
109
+ inside its own UI, not in npm reads or local editors.
110
+
111
+ [#38](https://github.com/cyanheads/mcp-ts-core/issues/38) ← issue
112
+ [#42](https://github.com/cyanheads/mcp-ts-core/pull/42) ← PR
113
+
114
+ Verify numbers exist before linking (`gh issue view NN`, `gh pr view NN`).
115
+ Never speculate on a future number — `#42` for an upcoming PR silently
116
+ resolves to whatever real item already owns 42, and timeline previews pull
117
+ in that unrelated item's metadata.
118
+
119
+ TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
120
+ via `gh release create --notes-from-tag`. It is a condensed digest of this
121
+ entry, never a copy, and its format is owned by the `release-and-publish`
122
+ skill (step 4, "Create the annotated tag"): a short subject line without the
123
+ version, flat headline bullets — no Keep-a-Changelog section headers, no
124
+ gates line — at most one deps line, issue backlinks, and the changelog link
125
+ last. In release-PR mode the `git-wrapup` skill authors those bullets as the
126
+ PR body's `## Changes` and the tag copies them.
127
+ -->
128
+
129
+ ## Added
130
+
131
+ -
132
+
133
+ ## Changed
134
+
135
+ -
136
+
137
+ <!-- ## Deprecated
138
+
139
+ - -->
140
+
141
+ <!-- ## Removed
142
+
143
+ - -->
144
+
145
+ ## Fixed
146
+
147
+ -
148
+
149
+ <!-- ## Security
150
+
151
+ - -->
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @fileoverview Hand-maintained mapping from browserslist/caniuse agent ids to
3
+ * browser-compat-data browser ids. Declares all 19 agents explicitly — mapped or
4
+ * `null` — so an agent added to caniuse-lite surfaces as an unchecked target
5
+ * rather than disappearing from the comparison.
6
+ * @module data/browserslist-bcd-map
7
+ */
8
+ /**
9
+ * Every caniuse agent id, mapped to its browser-compat-data counterpart or to
10
+ * `null` where no counterpart exists. `webview_ios` is the one reported BCD
11
+ * browser with no agent, so it never appears as a target.
12
+ */
13
+ export declare const BROWSERSLIST_BCD_MAP: {
14
+ readonly chrome: 'chrome';
15
+ readonly and_chr: 'chrome_android';
16
+ readonly edge: 'edge';
17
+ readonly firefox: 'firefox';
18
+ readonly and_ff: 'firefox_android';
19
+ readonly ie: 'ie';
20
+ readonly opera: 'opera';
21
+ readonly op_mob: 'opera_android';
22
+ readonly safari: 'safari';
23
+ readonly ios_saf: 'safari_ios';
24
+ readonly samsung: 'samsunginternet_android';
25
+ readonly android: 'webview_android';
26
+ readonly op_mini: null;
27
+ readonly bb: null;
28
+ readonly and_uc: null;
29
+ readonly and_qq: null;
30
+ readonly baidu: null;
31
+ readonly kaios: null;
32
+ readonly ie_mob: null;
33
+ };
34
+ /** A caniuse agent id declared in {@link BROWSERSLIST_BCD_MAP}. */
35
+ export type BrowserslistAgentId = keyof typeof BROWSERSLIST_BCD_MAP;
36
+ /** Resolve a caniuse agent id to a BCD browser id, or `null` when none exists. */
37
+ export declare function bcdBrowserForAgent(agent: string): string | null;
38
+ /** True when the agent id is declared in the map, mapped or not. */
39
+ export declare function isDeclaredAgent(agent: string): agent is BrowserslistAgentId;
40
+ //# sourceMappingURL=browserslist-bcd-map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browserslist-bcd-map.d.ts","sourceRoot":"","sources":["../../src/data/browserslist-bcd-map.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;qBACvB,QAAQ;sBACP,gBAAgB;mBACnB,MAAM;sBACH,SAAS;qBACV,iBAAiB;iBACrB,IAAI;oBACD,OAAO;qBACN,eAAe;qBACf,QAAQ;sBACP,YAAY;sBACZ,yBAAyB;sBACzB,iBAAiB;;;;;;;;CAQsB,CAAC;AAEnD,mEAAmE;AACnE,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,oBAAoB,CAAC;AAEpE,kFAAkF;AAClF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE/D;AAED,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,mBAAmB,CAE3E"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @fileoverview Hand-maintained mapping from browserslist/caniuse agent ids to
3
+ * browser-compat-data browser ids. Declares all 19 agents explicitly — mapped or
4
+ * `null` — so an agent added to caniuse-lite surfaces as an unchecked target
5
+ * rather than disappearing from the comparison.
6
+ * @module data/browserslist-bcd-map
7
+ */
8
+ /**
9
+ * Every caniuse agent id, mapped to its browser-compat-data counterpart or to
10
+ * `null` where no counterpart exists. `webview_ios` is the one reported BCD
11
+ * browser with no agent, so it never appears as a target.
12
+ */
13
+ export const BROWSERSLIST_BCD_MAP = {
14
+ chrome: 'chrome',
15
+ and_chr: 'chrome_android',
16
+ edge: 'edge',
17
+ firefox: 'firefox',
18
+ and_ff: 'firefox_android',
19
+ ie: 'ie',
20
+ opera: 'opera',
21
+ op_mob: 'opera_android',
22
+ safari: 'safari',
23
+ ios_saf: 'safari_ios',
24
+ samsung: 'samsunginternet_android',
25
+ android: 'webview_android',
26
+ op_mini: null,
27
+ bb: null,
28
+ and_uc: null,
29
+ and_qq: null,
30
+ baidu: null,
31
+ kaios: null,
32
+ ie_mob: null,
33
+ };
34
+ /** Resolve a caniuse agent id to a BCD browser id, or `null` when none exists. */
35
+ export function bcdBrowserForAgent(agent) {
36
+ return BROWSERSLIST_BCD_MAP[agent] ?? null;
37
+ }
38
+ /** True when the agent id is declared in the map, mapped or not. */
39
+ export function isDeclaredAgent(agent) {
40
+ return Object.hasOwn(BROWSERSLIST_BCD_MAP, agent);
41
+ }
42
+ //# sourceMappingURL=browserslist-bcd-map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browserslist-bcd-map.js","sourceRoot":"","sources":["../../src/data/browserslist-bcd-map.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,gBAAgB;IACzB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,iBAAiB;IACzB,EAAE,EAAE,IAAI;IACR,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,yBAAyB;IAClC,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,IAAI;IACb,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;CACoC,CAAC;AAKnD,kFAAkF;AAClF,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAQ,oBAAkE,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;AAC5F,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @fileoverview browser-compat-mcp-server MCP server entry point.
4
+ * @module index
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG"}
package/dist/index.js ADDED
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @fileoverview browser-compat-mcp-server MCP server entry point.
4
+ * @module index
5
+ */
6
+ import { createApp } from '@cyanheads/mcp-ts-core';
7
+ import { browsercompatCheckBaseline } from './mcp-server/tools/definitions/browsercompat-check-baseline.tool.js';
8
+ import { browsercompatCompareSupport } from './mcp-server/tools/definitions/browsercompat-compare-support.tool.js';
9
+ import { browsercompatGetFeature } from './mcp-server/tools/definitions/browsercompat-get-feature.tool.js';
10
+ import { browsercompatListReference } from './mcp-server/tools/definitions/browsercompat-list-reference.tool.js';
11
+ import { browsercompatSearchFeatures } from './mcp-server/tools/definitions/browsercompat-search-features.tool.js';
12
+ import { getBaselineService } from './services/baseline/baseline-service.js';
13
+ import { getBcdService } from './services/bcd/bcd-service.js';
14
+ import { getDataVersion } from './services/data-version/data-version-service.js';
15
+ import { getSearchService } from './services/search/search-service.js';
16
+ import { getTargetsService } from './services/targets/targets-service.js';
17
+ await createApp({
18
+ name: 'browser-compat-mcp-server',
19
+ title: 'browser-compat-mcp-server',
20
+ cacheHints: {
21
+ 'tools/list': { ttlMs: 3_600_000, cacheScope: 'public' },
22
+ 'server/discover': { ttlMs: 3_600_000, cacheScope: 'public' },
23
+ },
24
+ tools: [
25
+ browsercompatListReference,
26
+ browsercompatGetFeature,
27
+ browsercompatCheckBaseline,
28
+ browsercompatSearchFeatures,
29
+ browsercompatCompareSupport,
30
+ ],
31
+ resources: [],
32
+ prompts: [],
33
+ instructions: 'Browser support and Baseline status for web platform features, served from bundled MDN browser-compat-data, web-features, and caniuse data — offline, no API key, no rate limit. Start at browsercompat_search_features when the feature key is unknown; browsercompat_get_feature returns the per-feature record and browsercompat_check_baseline answers ship-or-not across up to 20 features at once. Every tool takes one feature string that is either a BCD key (css.selectors.has) or a web-features id (has), and echoes resolved_as saying which namespace it matched; an unresolved feature comes back as found: false with guidance, never an error. browsercompat_compare_support requires an explicit browserslist query and reports unchecked_targets for target browsers with no compatibility data — a pass is never claimed for a browser that was not evaluated. browsercompat_list_reference enumerates the namespaces, browser ids, browserslist agents, Baseline states, groups, and snapshots the other tools expect. Every response echoes data_version; the data is a package snapshot, so a feature that shipped in the last few weeks may lag.',
34
+ // Keyless public reference data — serve the full inventory without an auth gate.
35
+ landing: { requireAuth: false },
36
+ setup(core) {
37
+ // Start the dataset loads without awaiting, so a hosted container warms
38
+ // during boot while stdio startup stays instant. The first tool call awaits
39
+ // the same promises.
40
+ Promise.all([
41
+ getBcdService(),
42
+ getBaselineService(),
43
+ getTargetsService(),
44
+ getSearchService(),
45
+ getDataVersion(),
46
+ ]).catch((error) => {
47
+ core.logger.error('Dataset warm-up failed', error instanceof Error ? error : new Error(String(error)));
48
+ });
49
+ },
50
+ });
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,qEAAqE,CAAC;AACjH,OAAO,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AACnH,OAAO,EAAE,uBAAuB,EAAE,MAAM,kEAAkE,CAAC;AAC3G,OAAO,EAAE,0BAA0B,EAAE,MAAM,qEAAqE,CAAC;AACjH,OAAO,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AACnH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,MAAM,SAAS,CAAC;IACd,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,2BAA2B;IAClC,UAAU,EAAE;QACV,YAAY,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;QACxD,iBAAiB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;KAC9D;IACD,KAAK,EAAE;QACL,0BAA0B;QAC1B,uBAAuB;QACvB,0BAA0B;QAC1B,2BAA2B;QAC3B,2BAA2B;KAC5B;IACD,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,YAAY,EACV,0mCAA0mC;IAC5mC,iFAAiF;IACjF,OAAO,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;IAE/B,KAAK,CAAC,IAAI;QACR,wEAAwE;QACxE,4EAA4E;QAC5E,qBAAqB;QACrB,OAAO,CAAC,GAAG,CAAC;YACV,aAAa,EAAE;YACf,kBAAkB,EAAE;YACpB,iBAAiB,EAAE;YACnB,gBAAgB,EAAE;YAClB,cAAc,EAAE;SACjB,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;YAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,wBAAwB,EACxB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAC1D,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}