Skip to main content

MCP Server

Model Context Protocol (MCP) is Anthropic's open standard for connecting AI agents to context sources. The A11y Context MCP server exposes the corpus as MCP tools that any MCP-compatible agent can call.

Server repo: a11y-context/accessibility-pattern-mcp

MCP is a retrieval mechanism, not a replacement for the skill. This MCP server exposes three tools:

  • list_patterns — the catalog (id, title, summary, latest_version, tags, aliases) for selection.
  • get_pattern(id) — the full spec (Must Haves, Don'ts, Customizable, Golden Pattern).
  • get_foundations() — the cross-cutting Foundations ruleset.

Step 1 — Install the skill​

The skill is the brain, and it's required no matter which transport you pick below. Pick your stack and your AI tool, then run the commands from your project's root. Unlike the HTTP and Local variants, the MCP skill carries only the brain and its decisions protocol: the catalog and Foundations rules come from the server's tools at retrieval time.

Your stack
Your AI tool
BASH
mkdir -p .claude/skills
curl -fsSL https://a11y-context-project.vercel.app/downloads/a11y-context-web-react-mcp.zip -o /tmp/a11y-context.zip
unzip -o /tmp/a11y-context.zip -d .claude/skills/

Or download a11y-context-web-react-mcp.zip and unzip it into .claude/skills/ yourself.

your-project/
├── .claude/
│ └── skills/
│ └── a11y-context-web-react-mcp/
│ ├── SKILL.md # brain: invocation + selection, retrieves via MCP tools
│ └── decisions-protocol.md # when to ask before replacing your codebase's components
├── src/
└── package.json

To install it for every project instead, unzip into ~/.claude/skills/. Claude Code reaches for the skill on its own when you build UI; to call it by name, type /a11y-context-web-react-mcp.

To update, run the same commands again. Every ZIP is also on the Downloads page.

Step 2 — Add the MCP server​

The skill selects patterns; the server answers the retrieval calls. Add the server one of two ways — pick the transport that matches your client.

Local (stdio)​

The MCP client spawns the server as a local subprocess. Zero hosting — it runs on your machine. The bundled corpus refreshes with each server release, the same model as the Local skill.

Claude Code. Run this from your project's root directory — the config is scoped to the directory you run it in. Use --scope project (recommended) so the server is written to a committed .mcp.json: A11y Context needs no secrets or per-user config, and every developer on the project wants it identically, so sharing it via the repo is the right default.

BASH
claude mcp add --scope project a11y-context -- npx -y @a11y-context/mcp-server

The pieces after claude mcp add:

  • --scope project — writes the config to a .mcp.json at your repo root, committed and shared with your team. Omit it and the server is added only to your personal config for this project (private to you, no file in the repo) — fine for a solo "just trying it" run.
  • a11y-context — the name you'll see in /mcp (your choice).
  • -- — separates Claude's own flags from the command that launches the server.
  • npx -y @a11y-context/mcp-server — the command Claude runs to start the server.

--scope project produces a .mcp.json at your project root:

your-project/
├── .mcp.json # created by `claude mcp add --scope project`
├── src/
└── package.json
JSON
// .mcp.json
{
"mcpServers": {
"a11y-context": {
"command": "npx",
"args": ["-y", "@a11y-context/mcp-server"]
}
}
}

Run /mcp in Claude Code to confirm a11y-context is listed and connected. (/mcp shows your configured servers and lets you check status — you add the server first, then it appears there.)

Cursor, Continue, Zed, other clients. Add the same mcpServers block to the client's MCP config file (.cursor/mcp.json for Cursor; the equivalent for others). The command / args shape is identical.

HTTP (hosted or self-hosted)​

For clients that connect by URL rather than spawning a subprocess — enterprise setups, remote agents, hosted-agent platforms.

BASH
claude mcp add --transport http a11y-context https://accessibility-pattern-mcp-production.up.railway.app/

Health check: GET /health returns {"ok":true,"contract_version":"v1"}. You can also self-host — the repo includes the HTTP entry point (node dist/http.js); deploy it to any Node host (Railway, Fly, Render) and point your client at your own URL.

Verify​

After installing the skill and adding the server, restart your client, then run the prompts on Verify It's Working. The agent should call list_patterns then get_pattern before generating UI code.