@wcag-checkr/mcp 1.0.0-rc.340 → 1.0.0-rc.342
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.
- package/package.json +1 -1
- package/wcagcheckr-mcp.mjs +28 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wcag-checkr/mcp",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.342",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Model Context Protocol server for wcagcheckr. Lets LLM-IDEs (Claude Code, Cursor, Continue, etc.) drive accessibility audits, verify forensic receipts, and look up tier features programmatically. Same audit engine as the Chrome extension and CI runner.",
|
|
6
6
|
"license": "UNLICENSED",
|
package/wcagcheckr-mcp.mjs
CHANGED
|
@@ -163,6 +163,34 @@ async function auditUrl(args) {
|
|
|
163
163
|
],
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
+
// rc.342 — Per-feature tier gate. Hit the license validate endpoint
|
|
167
|
+
// directly to read the features blob; refuse if mcpServer is explicitly
|
|
168
|
+
// disabled. `features.mcpServer === undefined` falls through as permissive.
|
|
169
|
+
try {
|
|
170
|
+
const validateRes = await fetch(`${SERVER_BASE_URL}/v1/products/wcagcheckr/license/validate`, {
|
|
171
|
+
method: 'POST',
|
|
172
|
+
headers: { 'content-type': 'application/json' },
|
|
173
|
+
body: JSON.stringify({ token: licenseToken }),
|
|
174
|
+
});
|
|
175
|
+
if (validateRes.ok) {
|
|
176
|
+
const body = await validateRes.json();
|
|
177
|
+
if (body?.features && body.features.mcpServer === false) {
|
|
178
|
+
return {
|
|
179
|
+
isError: true,
|
|
180
|
+
content: [{
|
|
181
|
+
type: 'text',
|
|
182
|
+
text: 'wcagcheckr MCP server is not available on your current plan. Upgrade at https://wcagcheckr.com/pricing.',
|
|
183
|
+
}],
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
// Non-ok or parse failure: fall through. The CLI delegate will fail
|
|
188
|
+
// license validation itself if the token is bad; per-feature gating
|
|
189
|
+
// requires a successful validate, so a network glitch shouldn't lock
|
|
190
|
+
// out a paying customer.
|
|
191
|
+
} catch {
|
|
192
|
+
/* swallow — same fall-through rationale */
|
|
193
|
+
}
|
|
166
194
|
|
|
167
195
|
return new Promise((resolveResult) => {
|
|
168
196
|
const args = [
|