New:Socket for Asana Is Now Available.Learn more
Get Started

@wcagc/mcp

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wcagc/mcp - npm Package Compare versions

Comparing version
0.5.0
to
0.6.0
+1
-1
dist/server.js

@@ -9,3 +9,3 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";

// test/version.test.ts fails the build if the two ever drift.
export const VERSION = "0.5.0";
export const VERSION = "0.6.0";
/**

@@ -12,0 +12,0 @@ * One server, two transports (hosted Streamable HTTP + local stdio) share this — the tool

@@ -67,2 +67,36 @@ import { z } from "zod";

});
const rootCausesSchema = z.object({
scope: z.string(),
status: z.string(),
signatureVersion: z.string(),
summary: z.object({
findingsTotal: z.number(),
analyzedFindings: z.number(),
clustersTotal: z.number(),
clusteredFindings: z.number(),
pagesTotal: z.number().nullish(),
}),
truncated: z.boolean(),
clusters: z.array(z.object({
key: z.string(),
ruleId: z.string(),
impact: z.string(),
wcagSc: z.array(z.string()),
pattern: z.string(),
selectorSignature: z.string(),
component: z.object({
label: z.string(),
source: z.string(),
platform: z.string().nullish(),
}).nullish(),
nodesCount: z.number(),
pagesCount: z.number().nullish(),
samplePages: z.array(z.string()),
sampleSelectors: z.array(z.string()),
guidance: z.string().nullish(),
exampleFix: z.string().nullish(),
helpUrl: z.string(),
})),
coverageDisclaimer: z.string(),
});
/**

@@ -195,2 +229,28 @@ * Reading back a record the account already owns. The domain is closed and enumerable — one id,

});
server.registerTool("get_root_causes", {
title: "Get a scan run's root causes",
description: "Returns deterministic repeated DOM patterns and factual blast-radius counts " +
"for a full-site run. Grouping does not expand automated-test coverage and may not match " +
"the site's real component boundaries. Pro+.",
inputSchema: { runId: z.string().uuid().describe("The id returned by scan_site.") },
outputSchema: { rootCauses: rootCausesSchema },
annotations: { title: "Get a scan run's root causes", ...READ_ONLY },
}, async ({ runId }, extra) => {
try {
const bearer = resolveBearer(extra);
const rootCauses = await apiJson(bearer, `/api/v1/scan-runs/${runId}/root-causes`);
const facts = rootCauses.clusters.length === 0
? `No root-cause clusters recorded for run ${runId} yet.`
: rootCauses.clusters.map((cluster) => `[${cluster.impact}] ${cluster.ruleId}: ${cluster.nodesCount} finding(s)` +
`${cluster.pagesCount === null ? "" : ` across ${cluster.pagesCount} page(s)`}` +
" share this pattern.").join("\n");
return {
content: [{ type: "text", text: `${facts}\n\n${rootCauses.coverageDisclaimer}` }],
structuredContent: { rootCauses },
};
}
catch (err) {
return toolError(err);
}
});
server.registerTool("run_journey", {

@@ -197,0 +257,0 @@ title: "Run a saved user journey",

{
"name": "@wcagc/mcp",
"version": "0.5.0",
"version": "0.6.0",
"mcpName": "io.github.WCAG-Compliance/mcp",

@@ -5,0 +5,0 @@ "description": "wcagc MCP server \u2014 a thin, stateless adapter that translates MCP tool calls into wcagc-api HTTP calls. No database, no secrets beyond WCAGC_API_BASE_URL (+ WCAGC_MCP_KEY for local stdio mode). Open-source: this package holds no business logic or credentials of its own.",

@@ -69,2 +69,3 @@ # wcagc-mcp

| `get_run` · `get_run_findings` | Pro+ | Read a full-site run from `scan_site`. |
| `get_root_causes` | Pro+ | Group a run's repeated DOM patterns and return factual element/page blast radius. |
| `run_journey` | Pro+ | Replay a saved multi-step journey and check each step. |

@@ -71,0 +72,0 @@ | `get_trends` | Pro+ | Read a site's violation-count history over time. |