{"_id":"@a11y-context/mcp-server","_rev":"2-a2138abb4b402e7c9057cf1de8afcb2e","name":"@a11y-context/mcp-server","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@a11y-context/mcp-server","version":"0.1.0","keywords":["mcp","model-context-protocol","accessibility","a11y","wcag","react","ai-agents","patterns"],"author":{"name":"John Sweet"},"license":"Apache-2.0","_id":"@a11y-context/mcp-server@0.1.0","maintainers":[{"name":"jsweet_a11y","email":"johnsweethf@gmail.com"}],"homepage":"https://a11y-context-project.vercel.app/getting-started/ai-coding-agents/install/mcp-server","bugs":{"url":"https://github.com/a11y-context/accessibility-pattern-mcp/issues"},"bin":{"a11y-context-mcp":"dist/index.js"},"dist":{"shasum":"51a119d0e2c3a0ec2ff15f37a0c86f47823806cf","tarball":"https://registry.npmjs.org/@a11y-context/mcp-server/-/mcp-server-0.1.0.tgz","fileCount":47,"integrity":"sha512-pQCfBRfjEPicafyj1tOPk7Vu0vRkWdyCppryjVHvoG/8mScpzbg93h4baJv/pjhhfxm8AXO64tdHhevqhCuMKA==","signatures":[{"sig":"MEUCIAW8i4MCdtOOiXg9NyCO5NLyuoVmcDYeu1thLXG3nLoYAiEAzt7dqDiGect9BHknuFr6imR3lao9ZpgLBCwObKdQU4Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":312261},"main":"dist/index.js","type":"module","engines":{"node":">=20"},"gitHead":"97eaa4657edbe3787051655eb067e5401bc5da19","scripts":{"dev":"ts-node src/index.ts","build":"tsc -p tsconfig.json","start":"node dist/http.js","dev:http":"tsx watch src/http.ts","inspector":"npm run build && mcp-inspector node dist/index.js","smoke:remote":"npm run build && node dist/smoke/smoke-remote-mcp.js","prepublishOnly":"npm run build","test:regression":"ts-node scripts/regression-runner.ts","test:regression:update":"ts-node scripts/regression-runner.ts --update","test:regression:ignore-ttl":"ts-node scripts/regression-runner.ts --ignore-cache-ttl"},"_npmUser":{"name":"jsweet_a11y","email":"johnsweethf@gmail.com"},"repository":{"url":"git+https://github.com/a11y-context/accessibility-pattern-mcp.git","type":"git"},"_npmVersion":"11.11.0","description":"Model Context Protocol server that serves the A11y Context accessibility-pattern corpus (WCAG 2.2 AA patterns, Foundations rules) to AI coding agents.","directories":{},"_nodeVersion":"22.19.0","dependencies":{"zod":"^4.3.6","dotenv":"^17.3.1","express":"^5.2.1","fast-glob":"^3.3.3","gray-matter":"^4.0.3","@modelcontextprotocol/sdk":"^1.26.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","typescript":"^5.9.3","@types/node":"^25.3.0","@types/express":"^5.0.6"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.1.0_1783725308180_0.9986339868084799","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@a11y-context/mcp-server","version":"0.1.1","description":"Model Context Protocol server that serves the A11y Context accessibility-pattern corpus (WCAG 2.2 AA patterns, Foundations rules) to AI coding agents.","type":"module","main":"dist/index.js","bin":{"a11y-context-mcp":"dist/index.js"},"engines":{"node":">=20"},"scripts":{"dev":"ts-node src/index.ts","build":"tsc -p tsconfig.json","start":"node dist/http.js","dev:http":"tsx watch src/http.ts","inspector":"npm run build && mcp-inspector node dist/index.js","smoke:remote":"npm run build && node dist/smoke/smoke-remote-mcp.js","smoke:stdio":"npm run build && node scripts/smoke-stdio.mjs","test:regression":"npm run build && node scripts/regression-runner.mjs","test:regression:update":"npm run build && node scripts/regression-runner.mjs --update","test:regression:ignore-ttl":"npm run build && node scripts/regression-runner.mjs --ignore-cache-ttl","sync-corpus":"node scripts/sync-corpus.mjs","prepublishOnly":"npm run build"},"keywords":["mcp","model-context-protocol","accessibility","a11y","wcag","react","ai-agents","patterns"],"author":{"name":"John Sweet"},"license":"Apache-2.0","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/a11y-context/accessibility-pattern-mcp.git"},"bugs":{"url":"https://github.com/a11y-context/accessibility-pattern-mcp/issues"},"homepage":"https://a11y-context-project.vercel.app/getting-started/ai-coding-agents/install/mcp-server","dependencies":{"@modelcontextprotocol/sdk":"^1.26.0","dotenv":"^17.3.1","express":"^5.2.1","fast-glob":"^3.3.3","gray-matter":"^4.0.3","zod":"^4.3.6"},"devDependencies":{"@types/express":"^5.0.6","@types/node":"^25.3.0","ts-node":"^10.9.2","typescript":"^5.9.3"},"gitHead":"eeae2907afc58cacef03a556d6730d20dc40b5c9","_id":"@a11y-context/mcp-server@0.1.1","_nodeVersion":"22.19.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-Yb/B++GL99t6quujfhKN52ETUmbuYGIgk+Rot787OC0+wJ7517+gQd4A0wLZnObLb40oY4fipeLf9Q/YwpcBEw==","shasum":"66b9b0f840f5a661e5b9ed55b7bb894ed8efb20e","tarball":"https://registry.npmjs.org/@a11y-context/mcp-server/-/mcp-server-0.1.1.tgz","fileCount":49,"unpackedSize":326248,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDMV31ZpAfHbmoAM0dwzqePWwJOlimA9IJNDBaQPCMFXAiEAuIcPW8mMISdd3ynD/98TJDUJe1Ow6P75MSMzX8DKbM4="}]},"_npmUser":{"name":"jsweet_a11y","email":"johnsweethf@gmail.com"},"directories":{},"maintainers":[{"name":"jsweet_a11y","email":"johnsweethf@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server_0.1.1_1783801937519_0.8939793084576173"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-10T23:15:08.064Z","modified":"2026-07-11T20:32:17.827Z","0.1.0":"2026-07-10T23:15:08.395Z","0.1.1":"2026-07-11T20:32:17.707Z"},"bugs":{"url":"https://github.com/a11y-context/accessibility-pattern-mcp/issues"},"author":{"name":"John Sweet"},"license":"Apache-2.0","homepage":"https://a11y-context-project.vercel.app/getting-started/ai-coding-agents/install/mcp-server","keywords":["mcp","model-context-protocol","accessibility","a11y","wcag","react","ai-agents","patterns"],"repository":{"type":"git","url":"git+https://github.com/a11y-context/accessibility-pattern-mcp.git"},"description":"Model Context Protocol server that serves the A11y Context accessibility-pattern corpus (WCAG 2.2 AA patterns, Foundations rules) to AI coding agents.","maintainers":[{"name":"jsweet_a11y","email":"johnsweethf@gmail.com"}],"readme":"# @a11y-context/mcp-server\n\nA [Model Context Protocol](https://modelcontextprotocol.io) server that serves the [A11y Context](https://a11y-context-project.vercel.app) accessibility-pattern corpus — WCAG 2.2 AA component patterns and cross-cutting Foundations rules — to AI coding agents.\n\nThe server is the **retrieval mechanism**. Pair it with the A11y Context **MCP skill** (the brain that selects which patterns a task needs); the skill calls these tools. See the [setup guide](https://a11y-context-project.vercel.app/getting-started/ai-coding-agents/install/mcp-server).\n\n## Install\n\n**Claude Code:**\n\n```bash\nclaude mcp add a11y-context -- npx -y @a11y-context/mcp-server\n```\n\nOr add it to your MCP client config (`.mcp.json`, `.cursor/mcp.json`, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"a11y-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@a11y-context/mcp-server\"]\n    }\n  }\n}\n```\n\nThen run `/mcp` (in Claude Code) to confirm it's connected.\n\n## Tools\n\n| Tool | Purpose |\n|---|---|\n| `list_patterns` | List the available component patterns for a stack. Call first to select which patterns a task needs (via each entry's `selection_excerpt`). |\n| `get_pattern` | Get the full spec for one pattern by `id`: `must_haves`, `donts`, `golden_pattern`, `customizable`, `acceptance_checks`. |\n| `get_foundations` | Get the cross-cutting Foundations rules (focus, landmarks, headings, contrast, page structure). Retrieve on every UI task; each rule's `scope` decides where it applies. |\n\nAll tools take a `stack` argument (defaults to `web/react`, the only fully populated stack today).\n\n## Corpus\n\nThe server ships a bundled snapshot of the corpus at `corpus/<stack>/`, refreshed per release. Retrieval is deterministic ID-based selection — no vector database, no embeddings.\n\n## Transports\n\n- **stdio** (default, via `npx`) — runs locally in your MCP client.\n- **HTTP** — `npm run start` serves the same tools over HTTP for clients that connect by URL. The HTTP endpoint is stateless (no session state to leak) and rate-limited. For any publicly reachable deployment, set `ALLOWED_HOSTS` and/or `ALLOWED_ORIGINS` (comma-separated) to enable Host/Origin validation (DNS-rebinding protection); it stays off with a warning until configured.\n\n  | Env var | Default | Purpose |\n  |---|---|---|\n  | `PORT` | `3000` | HTTP listen port. |\n  | `ALLOWED_HOSTS` | *(unset)* | Comma-separated allowlist of `Host` header values. |\n  | `ALLOWED_ORIGINS` | *(unset)* | Comma-separated allowlist of `Origin` header values. |\n  | `TRUST_PROXY` | `false` | Express `trust proxy`. Set to `1` (hop count) behind a single reverse proxy (e.g. Railway) so per-IP rate limiting uses the real client IP. Leave off when directly exposed; never `true`. |\n  | `RATE_LIMIT_MAX` | `120` | Max requests per IP per window. |\n  | `RATE_LIMIT_WINDOW_MS` | `60000` | Rate-limit window in ms. |\n\n## Development\n\n```bash\nnpm install\nnpm run build\nnpm run dev          # stdio, ts-node\nnpm run inspector    # MCP Inspector\n```\n\nOverride the corpus location with `PATTERN_REPO_PATH` (absolute, or relative to the package root) to develop against a live corpus checkout.\n\n### Refreshing the bundled corpus\n\nThe package ships a snapshot of the corpus under `corpus/<stack>/`. Refresh it from a checkout of the corpus repo with:\n\n```bash\nnpm run sync-corpus -- --source /path/to/accessibility-pattern-api\n# options: --stack web/react (default), --dry-run\n# or set A11Y_CORPUS_SOURCE instead of --source\n```\n\nIt copies only the published read-slice — `patterns.json`, `global/global_rules.md`, and the components listed in `patterns.json` — into `corpus/<stack>/`. Membership is driven by `patterns.json`, so `status: draft` and `status: deprecated` components are excluded (a draft/deprecated member aborts the sync). The copied `patterns.json` records the source `catalog_revision`. Commit the resulting `corpus/` changes as part of the release.\n\n## License\n\n[Apache-2.0](./LICENSE). The bundled corpus content is also Apache-2.0.\n","readmeFilename":"README.md"}