@community-access/accessibility-agents-mcp 0.0.0-stage → 7.1.0

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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +439 -2
  3. package/dist/stdio.mjs +41596 -0
  4. package/package.json +79 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Taylor Arndt
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,440 @@
1
- # Temporary Holding Version
1
+ # A11y Agent Team MCP Server
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ MCP (Model Context Protocol) server that provides 39 accessibility scanning tools over Streamable HTTP or stdio. Works with Claude Code, Claude Desktop, VS Code, the Copilot CLI and any MCP-compatible client. It is built on `@modelcontextprotocol/sdk` 1.32.2 and implements what that SDK provides (protocol revisions up to 2025-11-25); see [the MCP standards page](../docs/standards/mcp.md) for where it stands against 2026-07-28.
4
+
5
+ In this repository, the MCP server lives in the top-level `mcp-server/` directory. The main entry points are `server.js` (HTTP) and `stdio.js` (stdio).
6
+
7
+ ## What Works Out Of The Box
8
+
9
+ The MCP server is the executable part of document scanning. The skills (for PDF, `pdf-accessibility` and `pdf-scan-config` under `skills/`) tell the model when to scan; this server provides the actual `scan_pdf_document` tool.
10
+
11
+ | What you install | What you get | PDF scanning works? |
12
+ |------------------|--------------|---------------------|
13
+ | Skills only | PDF scanning instructions in chat | No |
14
+ | Skills + MCP server | Working `scan_pdf_document` tool | Yes |
15
+ | Skills + MCP server + veraPDF | Baseline scan + deep PDF/UA validation | Yes |
16
+
17
+ A plugin install launches `dist/stdio.mjs`, a single esbuild bundle of the stdio server and its dependencies, so it starts with no `npm install` (`mcp.json`, and `mcpServers` in `.claude-plugin/plugin.json`). Playwright, `@axe-core/playwright` and `pdf-lib` are left out of the bundle and stay optional; the tools that need them say how to install them. Run `npm install` in this folder only for the HTTP server (`server.js`) or to work on the source.
18
+
19
+ If you change the server's source, run `npm run build` here and commit the rebuilt `dist/stdio.mjs`: the `bundle` gate in `npm run verify` fails when the committed bundle differs from a fresh build.
20
+
21
+ ## Architecture
22
+
23
+ The server supports two transport modes:
24
+
25
+ | Mode | Entry Point | Transport | Use Case |
26
+ |------|-------------|-----------|----------|
27
+ | **HTTP** | `server.js` | Streamable HTTP (stateful with a GET event stream by default; stateless with `A11Y_MCP_STATELESS=1`). The legacy HTTP+SSE transport is not offered | Remote clients, shared servers, CI/CD |
28
+ | **stdio** | `stdio.js` (bundled as `dist/stdio.mjs`) | stdin/stdout | Claude Desktop, plugin installs, local use |
29
+
30
+ Both modes share the same tool implementations via `server-core.js`.
31
+
32
+ ## Quick Start
33
+
34
+ Before you start, make sure `node --version` reports a supported Node.js LTS line (26, 24 or 22) and that `npm` is available. The repository installer does not install Node.js; get it from <https://nodejs.org/en/download>.
35
+
36
+ ```bash
37
+ # stdio, from the bundle: no install needed
38
+ node mcp-server/dist/stdio.mjs
39
+
40
+ # HTTP mode needs the dependencies
41
+ cd mcp-server
42
+ npm install
43
+ npm start
44
+ # -> http://127.0.0.1:3100/mcp
45
+ ```
46
+
47
+ From npm, with no checkout (from 7.1.0, once published as
48
+ `@community-access/accessibility-agents-mcp`; also listed in the MCP Registry
49
+ as `io.github.Community-Access/accessibility-agents`):
50
+
51
+ ```bash
52
+ npx -y @community-access/accessibility-agents-mcp
53
+ claude mcp add accessibility-agents -- npx -y @community-access/accessibility-agents-mcp
54
+ ```
55
+
56
+ The npm package is the stdio bundle alone. The browser and PDF form tools need
57
+ their optional packages in the same `node_modules`, so for those install the
58
+ server into a folder with them and run it from there:
59
+ `npm install @community-access/accessibility-agents-mcp playwright @axe-core/playwright pdf-lib`,
60
+ `npx playwright install chromium`, then `npx accessibility-agents-mcp`.
61
+
62
+ For a PDF-only walkthrough, see [PDF-QUICKSTART.md](PDF-QUICKSTART.md).
63
+
64
+ ## Prerequisite Matrix
65
+
66
+ Each class, with requirement, needed for and required.
67
+
68
+ | Class | Requirement | Needed For | Required? |
69
+ |------|-------------|------------|-----------|
70
+ | Runtime | Node.js LTS (26, 24 or 22) | Running the MCP server | Yes |
71
+ | Runtime | none for the stdio bundle | `dist/stdio.mjs` carries `@modelcontextprotocol/sdk` and `zod` inside it | No |
72
+ | HTTP or development | npm, then `npm install` in this folder (`@modelcontextprotocol/sdk`, `zod`, `express`) | The HTTP server (`server.js`), running the unbundled source and the tests | Only for those |
73
+ | Client | MCP-compatible client | Calling the server tools | Yes |
74
+ | Optional feature | Java 11+ + `verapdf` | Deep PDF validation with `run_verapdf_scan` | No |
75
+ | Optional feature | `playwright`, `@axe-core/playwright`, Chromium | Browser-based scanning tools | No |
76
+ | Optional feature | `pdf-lib` | `convert_pdf_form_to_html` | No |
77
+ | Installer-only | `git` | Cloning the repository | No |
78
+
79
+ Python is not required to run the MCP server or to install the package.
80
+
81
+ ## Local Vs Shared Server
82
+
83
+ You can run this MCP server either locally on your own machine or as a shared HTTP service.
84
+
85
+ | Mode | Where it runs | Best for |
86
+ |------|---------------|----------|
87
+ | Local stdio | Your machine, started by the client | Claude Desktop and local-only use |
88
+ | Local HTTP | Your machine on `127.0.0.1` | VS Code Copilot, local testing, debugging |
89
+ | Shared HTTP | A server or container | Team use, CI/CD, remote clients |
90
+
91
+ For most users, start locally first. The default HTTP binding is `127.0.0.1`, so it is not exposed to the network unless you deliberately change the host.
92
+
93
+ ## Configuration
94
+
95
+ Each environment variable, with its default and description.
96
+
97
+ | Environment Variable | Default | Description |
98
+ |---------------------|---------|-------------|
99
+ | `PORT` | `3100` | HTTP server port |
100
+ | `A11Y_MCP_HOST` | `127.0.0.1` | Bind address |
101
+ | `A11Y_MCP_STATELESS` | (unset) | Set to `1` for stateless mode |
102
+ | `GLOW_API_BASE_URL` | `https://letitglow.app/mcp` | Endpoint the GLOW bridge tools call |
103
+
104
+ ### Stateful vs Stateless
105
+
106
+ - **Stateful** (default): Sessions persist across requests (`Mcp-Session-Id`), and a GET request opens a server-sent event stream for that session. Best for interactive use. The 2026-07-28 MCP revision removes sessions and the GET endpoint; this mode follows the SDK.
107
+ - **Stateless**: Each request creates a fresh server instance. No sessions, POST only. Best for CI/CD and serverless deployments.
108
+
109
+ ## Client Configuration
110
+
111
+ ### Claude Desktop (`claude_desktop_config.json`)
112
+
113
+ Claude Desktop starts local servers from `claude_desktop_config.json` (Settings, Developer, Edit Config), using stdio:
114
+
115
+ ```json
116
+ {
117
+ "mcpServers": {
118
+ "a11y-agent-team": {
119
+ "command": "node",
120
+ "args": ["/path/to/mcp-server/dist/stdio.mjs"]
121
+ }
122
+ }
123
+ }
124
+ ```
125
+
126
+ Remote HTTP servers are added in Claude Desktop as custom connectors rather than in this file; see <https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp>.
127
+
128
+ ### Claude Code
129
+
130
+ The plugin registers the server for you. Without the plugin:
131
+
132
+ ```bash
133
+ claude mcp add --transport stdio a11y-agent-team -- node /path/to/mcp-server/dist/stdio.mjs
134
+ ```
135
+
136
+ ### VS Code (`.vscode/mcp.json`)
137
+
138
+ ```json
139
+ {
140
+ "servers": {
141
+ "a11y-agent-team": {
142
+ "type": "http",
143
+ "url": "http://127.0.0.1:3100/mcp"
144
+ }
145
+ }
146
+ }
147
+ ```
148
+
149
+ ## Using GLOW Bridge Tools
150
+
151
+ The GLOW bridge tools are part of this MCP server. You do not register a second MCP server for GLOW.
152
+
153
+ ### Default behavior
154
+
155
+ - The bridge targets `https://letitglow.app/mcp` by default.
156
+ - You can call `glow_health_check` immediately after starting this server.
157
+
158
+ ### Use a different GLOW endpoint
159
+
160
+ Option 1: set server environment variable before startup:
161
+
162
+ ```bash
163
+ # Linux/macOS
164
+ export GLOW_API_BASE_URL="https://letitglow.app/mcp"
165
+ npm start
166
+ ```
167
+
168
+ ```powershell
169
+ # Windows PowerShell
170
+ $env:GLOW_API_BASE_URL = "https://letitglow.app/mcp"
171
+ npm start
172
+ ```
173
+
174
+ Option 2: pass `baseUrl` per tool call (for one-off testing):
175
+
176
+ - `glow_health_check` with `baseUrl`
177
+ - `glow_audit_document` with `baseUrl`
178
+ - `glow_fix_document` with `baseUrl`
179
+ - `glow_convert_document` with `baseUrl`
180
+ - `glow_generate_report` with `baseUrl`
181
+
182
+ ### Example prompts after connection
183
+
184
+ - `Run glow_health_check`
185
+ - `Audit ./docs/sample.md with glow_audit_document using format markdown`
186
+ - `Convert ./docs/sample.md from markdown to html with glow_convert_document`
187
+ - `Generate an html report for ./docs/sample.md with glow_generate_report`
188
+
189
+ ## PDF-Only Quick Start
190
+
191
+ If your immediate goal is only PDF accessibility scanning, this is the smallest working path:
192
+
193
+ 1. Install a Node.js LTS release (26, 24 or 22).
194
+ 2. Open this folder: `mcp-server/`
195
+ 3. Run `npm install`
196
+ 4. Start the server with `npm start`
197
+ 5. Point your MCP client at `http://127.0.0.1:3100/mcp`
198
+ 6. Install the skills (see [Getting started](../docs/getting-started/README.md)) if you want the guided PDF workflow in chat
199
+
200
+ Minimum files for the MCP side:
201
+
202
+ - `package.json`
203
+ - `server.js`
204
+ - `server-core.js`
205
+ - `stdio.js`
206
+ - `tools/`
207
+
208
+ If you also want the chat workflow layer, add:
209
+
210
+ - the `pdf-accessibility` and `pdf-scan-config` skills (`skills/pdf-accessibility/`, `skills/pdf-scan-config/`), installed with the rest of the package
211
+ - `templates/pdf-config-moderate.json` copied to your project as `.a11y-pdf-config.json` (optional)
212
+
213
+ ## Available Tools
214
+
215
+ ### Core Tools
216
+
217
+ Each tool, with its description.
218
+
219
+ | Tool | Description |
220
+ |------|-------------|
221
+ | `check_contrast` | Calculate WCAG contrast ratio between two colors |
222
+ | `get_accessibility_guidelines` | Get WCAG AA guidelines for component types |
223
+ | `check_heading_structure` | Analyze HTML heading hierarchy |
224
+ | `check_link_text` | Detect ambiguous or missing link text |
225
+ | `check_form_labels` | Check form inputs for accessible labels |
226
+
227
+ ### Document Tools
228
+
229
+ Each tool, with its description.
230
+
231
+ | Tool | Description |
232
+ |------|-------------|
233
+ | `scan_office_document` | Scan .docx/.xlsx/.pptx for accessibility issues |
234
+ | `scan_pdf_document` | Scan PDF using PDF/UA checks |
235
+ | `scan_epub_document` | Scan .epub files for EPUB Accessibility 1.1 conformance |
236
+ | `extract_document_metadata` | Extract accessibility-relevant metadata |
237
+ | `batch_scan_documents` | Scan multiple documents in one call |
238
+ | `fix_document_metadata` | Fix document metadata (title, language, author) |
239
+ | `fix_document_headings` | Fix heading structure in documents |
240
+
241
+ ### GLOW Bridge Tools
242
+
243
+ Each tool, with its description.
244
+
245
+ | Tool | Description |
246
+ |------|-------------|
247
+ | `glow_health_check` | Check health of a GLOW endpoint (default: `https://letitglow.app/mcp`) |
248
+ | `glow_audit_document` | Upload a markdown/html/docx file to GLOW and run `/audit` |
249
+ | `glow_fix_document` | Upload a markdown/html/docx file to GLOW and run `/fix` |
250
+ | `glow_convert_document` | Upload a markdown/html/docx file to GLOW and run `/convert` |
251
+ | `glow_generate_report` | Upload a markdown/html/docx file to GLOW and run `/report` |
252
+
253
+ ### Advanced Tools (Optional Dependencies)
254
+
255
+ Each tool, with its requires and description.
256
+
257
+ | Tool | Requires | Description |
258
+ |------|----------|-------------|
259
+ | `run_axe_scan` | playwright, @axe-core/playwright | Run axe-core against a live URL |
260
+ | `run_playwright_a11y_tree` | playwright | Capture accessibility tree |
261
+ | `run_playwright_keyboard_scan` | playwright | Test keyboard navigation |
262
+ | `run_playwright_contrast_scan` | playwright | Visual contrast analysis |
263
+ | `run_playwright_viewport_scan` | playwright | Test reflow at multiple widths |
264
+ | `run_verapdf_scan` | veraPDF CLI | PDF/UA-1 (default), PDF/UA-2 or PDF/A validation, chosen with `flavour` (SARIF output) |
265
+ | `convert_pdf_form_to_html` | pdf-lib | Convert PDF forms to accessible HTML |
266
+
267
+ ### Markdown Tools
268
+
269
+ Each tool, with its description.
270
+
271
+ | Tool | Description |
272
+ |------|-------------|
273
+ | `scan_markdown_document` | Scan markdown files for accessibility issues (links, alt text, headings, tables, emoji) |
274
+
275
+ ### Caching Tools
276
+
277
+ Each tool, with its description.
278
+
279
+ | Tool | Description |
280
+ |------|-------------|
281
+ | `check_audit_cache` | Check if a cached audit result exists for a file |
282
+ | `update_audit_cache` | Store or update an audit result in the cache |
283
+
284
+ ### Installing Optional Dependencies
285
+
286
+ ```bash
287
+ # Playwright + axe-core (for web scanning)
288
+ npm install playwright @axe-core/playwright
289
+ npx playwright install chromium
290
+
291
+ # pdf-lib (for PDF form conversion)
292
+ npm install pdf-lib
293
+
294
+ # veraPDF (external CLI)
295
+ # Download from https://verapdf.org/software/
296
+ ```
297
+
298
+ ## Actionable veraPDF Setup
299
+
300
+ veraPDF is optional. The built-in `scan_pdf_document` tool works without it. Install veraPDF when you need deeper PDF/UA validation than the built-in heuristic scan provides.
301
+
302
+ ### What veraPDF is for
303
+
304
+ - Validate PDF/UA conformance more deeply than the built-in scanner
305
+ - Confirm structure and metadata issues against a dedicated PDF validator
306
+ - Use as a second pass after baseline scanning
307
+
308
+ ### What veraPDF is not for
309
+
310
+ - It is not required for baseline PDF scanning
311
+ - It is not the primary remediation workflow in this repository
312
+ - Do not assume `verapdf --fix` is part of the supported workflow here
313
+
314
+ ### Install veraPDF
315
+
316
+ veraPDF requires Java 11 or later.
317
+
318
+ **Windows**
319
+
320
+ Install Java first if it is not already present:
321
+
322
+ ```bash
323
+ winget install --exact --id EclipseAdoptium.Temurin.21.JRE
324
+ ```
325
+
326
+ Then install veraPDF using Chocolatey if available:
327
+
328
+ ```bash
329
+ choco install verapdf
330
+ ```
331
+
332
+ If Chocolatey is not part of your environment, use the manual installer from <https://docs.verapdf.org/install/>.
333
+
334
+ **macOS**
335
+
336
+ ```bash
337
+ brew install verapdf
338
+ ```
339
+
340
+ **Manual download**
341
+
342
+ Download from <https://docs.verapdf.org/install/> and make sure `verapdf` is available on your `PATH`.
343
+
344
+ ### Verify veraPDF
345
+
346
+ ```bash
347
+ verapdf --version
348
+ ```
349
+
350
+ On Windows, restart your terminal or editor after installing Java or veraPDF so the updated `PATH` is picked up.
351
+
352
+ ### Use veraPDF directly
353
+
354
+ ```bash
355
+ verapdf --flavour ua1 --format text path/to/file.pdf
356
+ ```
357
+
358
+ ### Use veraPDF through this MCP server
359
+
360
+ Once the server is running and veraPDF is installed on the same machine, an MCP client can call `run_verapdf_scan`.
361
+
362
+ Example natural-language requests:
363
+
364
+ - `Run a deep PDF/UA scan on report.pdf using veraPDF`
365
+ - `Validate brochure.pdf with veraPDF and summarize the failures`
366
+
367
+ The tool will return installation guidance if `verapdf` is not installed.
368
+
369
+ For more background, see [veraPDF integration](../docs/reference/tools/verapdf-integration.md).
370
+
371
+ ## Health Check
372
+
373
+ ```bash
374
+ curl http://127.0.0.1:3100/health
375
+ # {"status":"ok","name":"a11y-agent-team","version":"7.1.0","mode":"stateful"}
376
+ ```
377
+
378
+ ## MCP Prompts
379
+
380
+ Pre-built prompt templates that guide the model through accessibility workflows.
381
+
382
+ | Prompt | Arguments | Description |
383
+ |--------|-----------|-------------|
384
+ | `audit-page` | `url` (required), `level` (optional: A/AA/AAA) | Structured WCAG audit instruction; walks through axe-core, heading, link, form, keyboard, and contrast scans |
385
+ | `check-component` | `component` (required) | Component-specific review using built-in guidelines (modal, tabs, accordion, combobox, carousel, form, live-region, navigation, general) |
386
+ | `explain-wcag` | `criterion` (required) | Explain a WCAG criterion with practical examples, common violations, and testing guidance |
387
+
388
+ ## MCP Resources
389
+
390
+ Read-only data endpoints for accessibility reference material. The two with a `{...}` parameter are resource templates: a client lists or completes them and reads a concrete address such as `a11y://guidelines/modal`.
391
+
392
+ | Resource URI | Description |
393
+ |-------------|-------------|
394
+ | `a11y://guidelines/{component}` | Component accessibility guidelines in Markdown (modal, tabs, accordion, combobox, carousel, form, live-region, navigation, general) |
395
+ | `a11y://tools` | Auto-generated list of all registered tools with descriptions |
396
+ | `a11y://config/{profile}` | Scan configuration templates as JSON (strict, moderate, minimal) |
397
+
398
+ ## Security
399
+
400
+ - **Path traversal prevention**: File operations validate paths against home directory and CWD boundaries (CWE-22)
401
+ - **Symlink resolution**: Write operations resolve symlinks to prevent escape (CWE-59)
402
+ - **SSRF protection**: URL-based tools validate schemes (http/https only)
403
+ - **Command injection prevention**: External commands use `execFile` (not `exec`) with argument arrays
404
+ - **File size limits**: Documents capped at 100 MB, batch operations at 50 files
405
+ - **Local binding**: Server binds to `127.0.0.1` by default (not exposed to network)
406
+
407
+ ## Deployment
408
+
409
+ ### Docker
410
+
411
+ ```dockerfile
412
+ FROM node:24-slim
413
+ WORKDIR /app
414
+ COPY package.json .
415
+ RUN npm install
416
+ COPY . .
417
+ EXPOSE 3100
418
+ CMD ["node", "server.js"]
419
+ ```
420
+
421
+ ### Systemd
422
+
423
+ ```ini
424
+ [Unit]
425
+ Description=A11y Agent Team MCP Server
426
+ After=network.target
427
+
428
+ [Service]
429
+ Type=simple
430
+ ExecStart=/usr/bin/node /opt/a11y-mcp/server.js
431
+ Environment=PORT=3100
432
+ Restart=on-failure
433
+
434
+ [Install]
435
+ WantedBy=multi-user.target
436
+ ```
437
+
438
+ ## License
439
+
440
+ MIT. See [LICENSE](../LICENSE) in the repository root.