respec-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@respec-mcplist profiles in the repo"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
respec-mcp
A stdio Model Context Protocol server that wraps ReSpec rendering and adds repo-local profile discovery, so AI agents can scaffold, preflight, validate, and build W3C-style documents — Community Group reports, final reports, and explainers for TAG early design review — using policies that live in the spec repository itself, not in the MCP server.
Status: incubating. See the inline W3C discussion that led to this package being extracted from ReSpec core.
Why a separate package
ReSpec is consumed as a library by many projects. Bundling an MCP server and its ~30 transitive dependencies (Express, Hono, jose, pkce-challenge, ...) into every ReSpec install punishes every consumer for a feature only a few use. Keeping the MCP as its own package lets ReSpec stay lean and lets this server iterate on profile/policy design and security hardening independently.
Related MCP server: Specifai MCP Server
What it does
Five tools over stdio:
Tool | What it does |
| Lists repo-local profiles and their allowed statuses. |
| Creates a new source document from a profile template. |
| Fast source-only policy check (sections, links, forbidden phrases). No render. |
| Full ReSpec render via Puppeteer with diagnostics. No write. |
| Full render and writes static HTML to the build root. |
Two MCP resources:
respec-mcp://authoring-guide— guidance for LLMs producing W3C/CG reports.respec-mcp://profile/{profile_id}— resolved profile JSON.
Install
npm install -g respec-mcpOr run without installing:
npx -y respec-mcp --repo-root /path/to/spec-repoQuick start
In your spec repo, add
respec-mcp.config.json:{ "default_profile": "example-cg", "profile_directory": "respec-mcp/profiles", "source_root": "reports/source", "build_root": "reports/build" }Add a profile at
respec-mcp/profiles/example-cg.json:{ "profile_id": "example-cg", "allowed_statuses": ["CG-DRAFT", "CG-FINAL"], "default_status": "CG-DRAFT", "default_source": "reports/source/index.html", "status_templates": { "CG-DRAFT": "respec-mcp/templates/cg-draft.html" }, "required_sections": ["Abstract", "Introduction"], "required_links": ["https://www.w3.org/community/example/"], "forbidden_phrases": ["W3C Recommendation"] }Point an MCP client at it:
{ "mcpServers": { "respec-mcp": { "command": "npx", "args": ["-y", "respec-mcp", "--repo-root", "/path/to/spec-repo"], "transport": "stdio" } } }
Two complete worked examples ship in the repo:
examples/example-cg/— Community Group report.examples/example-explainer/— W3C explainer skeleton following TR/explainer-explainer/.
Wiring into MCP clients
All snippets below use npx -y respec-mcp (works once the package is on
npm). For local development before publishing, swap
"command": "npx", "args": ["-y", "respec-mcp", ...] for
"command": "node", "args": ["/absolute/path/to/respec-mcp/bin/respec-mcp.js", ...].
Replace /path/to/spec-repo with the absolute path to your W3C / CG spec
repo (the one containing respec-mcp.config.json).
Claude Code (~/.claude/settings.json)
Add a respec-mcp entry under mcpServers:
{
"mcpServers": {
"respec-mcp": {
"command": "npx",
"args": ["-y", "respec-mcp", "--repo-root", "/path/to/spec-repo"]
}
}
}Reload with /mcp or restart Claude Code.
Codex CLI (~/.codex/config.toml)
[mcp_servers.respec-mcp]
command = "npx"
args = ["-y", "respec-mcp", "--repo-root", "/path/to/spec-repo"]
enabled = trueCline (VS Code extension saoudrizwan.claude-dev)
Edit
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
(or use Cline's MCP Servers → Configure UI):
{
"mcpServers": {
"respec-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "respec-mcp", "--repo-root", "/path/to/spec-repo"],
"disabled": false,
"autoApprove": [
"respec_list_profiles",
"respec_preflight",
"respec_validate"
],
"timeout": 300
}
}
}Only the read-only tools are auto-approved. respec_scaffold and
respec_build write to disk and will prompt.
Roo Code (VS Code extension rooveterinaryinc.roo-cline)
Edit
~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json.
Same shape as Cline, except Roo spells the transport type with a hyphen
in its HTTP variant — for stdio the type key is still "stdio":
{
"mcpServers": {
"respec-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "respec-mcp", "--repo-root", "/path/to/spec-repo"],
"disabled": false,
"autoApprove": [
"respec_list_profiles",
"respec_preflight",
"respec_validate"
],
"timeout": 300
}
}
}Verifying the handshake
From a terminal, send an initialize + tools/list over stdio:
printf '%s\n%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"probe","version":"0"}}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| npx -y respec-mcp --repo-root /path/to/spec-repoYou should see serverInfo.name: "respec-mcp" and the five tools listed.
Security
Tool inputs in MCP are LLM-controlled and can be influenced by prompt injection from document content. This server defends against that:
Path containment. Every path input is resolved through a
resolveWithinRootcheck and rejected if it escapes the configured--repo-root.URL restriction.
sourceaccepts only relative paths orfile://URLs inside the repo root.http(s),data:,javascript:are rejected so Puppeteer never navigates to attacker-controlled URLs.No client-side
repo_rootoverride. The CLI flag is the boundary; the tool schema does not acceptrepo_root.Prototype pollution hardening.
overrides,template_defaults, andrespec_defaultsare merged with key filters that drop__proto__,constructor, andprototype.
See docs/SECURITY.md for the full model.
Docs
docs/USAGE.md — CLI flags, tool recommendations, client config.
docs/PROFILES.md — profile and config schema.
docs/SECURITY.md — trust boundaries and guarantees.
docs/AUTHORING_GUIDE.md — LLM authoring guide for W3C / Community Group reports.
Docker
docker build -t respec-mcp:local .
docker run --rm -i -v /path/to/spec-repo:/workspace respec-mcp:localThe image runs as a non-root user and bakes --disable-sandbox into the
ENTRYPOINT so Chromium starts cleanly.
Development
npm install
npm run test:unit # fast, no Puppeteer
npm test # unit + integration (needs Chromium)Provenance
This package was extracted from speced/respec#5168. Thanks to @marcoscaceres for the review that reshaped this into a standalone package, and to the PM-KR Community Group for the real-world report authoring workflow that motivated the design.
License
MIT. Integrates with ReSpec (W3C Software and Document License).
Available Tools
5 toolsrespec_buildBuild ReSpec DocumentC
Renders a ReSpec source file to static HTML using the resolved repo-local profile, writes the output, and returns compliance results.
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | ||
| status | No | ||
| overrides | No | ||
| source | No | ||
| output | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It mentions rendering, writing output, and returning compliance results, but lacks details on side effects (e.g., file overwriting), idempotency, permissions, or error behavior. Critical behavioral traits for a build tool are missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, concise and to the point. It front-loads the main action. Minor improvement could be breaking into two sentences for readability, but it is efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 5 parameters (none required), no output schema, and no parameter descriptions, the description is incomplete. It does not explain parameter roles, compliance result format, or prerequisites, leaving significant gaps for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description does not elaborate on any of the five parameters (profile, status, overrides, source, output). It mentions 'source file' and 'static HTML' but does not link them to parameters, providing no added value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool renders a ReSpec source file to static HTML using a repo-local profile, writes output, and returns compliance results. It uses a specific verb ('renders') and resource ('ReSpec source file'), and distinguishes itself from sibling tools like respec_list_profiles (listing) and respec_validate (validation) by focusing on the build action.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus siblings. It does not mention prerequisites, when-not scenarios, or alternative tools. The description only states what the tool does, not the context for its use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
respec_list_profilesList ReSpec MCP ProfilesA
Lists repo-local ReSpec MCP profiles discovered from respec-mcp.config.json and respec-mcp/profiles/*.json.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It states the tool lists profiles from specific file sources, which implies a read-only operation. While it does not explicitly say it does not modify data, the verb 'list' and the context make the behavior clear. Additional context about the return format or side effects would improve it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that efficiently conveys the tool's purpose and data sources. It is front-loaded with the action and resource, with no superfluous information. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no output schema, no complexity), the description provides the essential information: the sources of the profiles. It does not mention the return format or that the list may be empty, but for a list operation this is sufficient. A 5 would require more detail about the output structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the input schema is empty with 100% coverage. According to the guidelines, a baseline score of 4 is appropriate since the description cannot add meaning beyond the schema. The description does not need to elaborate on parameters, so this score reflects the minimum viable for a parameterless tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool's purpose: listing repo-local ReSpec MCP profiles from specific sources (respec-mcp.config.json and respec-mcp/profiles/*.json). It uses a specific verb-resource combination that distinguishes it from the sibling tools (build, preflight, scaffold, validate), which perform different actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is used to list profiles, and given the sibling tools are all for different operations (building, preflighting, scaffolding, validating), there is no ambiguity. However, it does not explicitly state when to use this tool over others or provide any exclusion criteria, but the context makes it clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
respec_preflightPreflight ReSpec Source (source-only, no render)A
Fast policy checks against the source file without rendering: required sections, required links, forbidden phrases, allowed statuses. Use this before edits to catch policy violations cheaply.
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | ||
| status | No | ||
| overrides | No | ||
| source | No | ||
| output | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden. It discloses it is fast, source-only, and no rendering, plus the checks performed. However, it does not mention side effects, destruction, or rate limits. With zero annotations, a 3 is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with purpose and usage. Every sentence adds value with no fluff. Excellent conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters, no output schema, and no parameter descriptions, the description is incomplete. It does not explain how to use the source parameter, what output produces, or the return format. Only the high-level policy checks are mentioned.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain any of the 5 parameters (profile, status, overrides, source, output). The description only lists what the tool checks, adding no parameter-specific meaning. This is a critical gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Fast policy checks against the source file without rendering', listing specific checks like required sections and forbidden phrases. It distinguishes from siblings like respec_build which does rendering.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear when-to-use guidance: 'Use this before edits to catch policy violations cheaply.' It implies that for rendering one should use respec_build, though it does not explicitly name alternatives or when-not-to-use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
respec_scaffoldScaffold ReSpec SourceC
Creates a ReSpec source document from a repo-local profile and status-specific template. Paths must stay within the configured repo root.
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | ||
| status | No | ||
| overrides | No | ||
| source | No | ||
| output | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It mentions a path constraint but does not disclose side effects (e.g., overwriting behavior), permissions needed, or what happens on failure. The behavior beyond creation is opaque.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, no wasted words. The first sentence defines purpose, the second adds a key constraint. It is efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters, no output schema, and no annotations, the description should cover return values, parameter interactions (e.g., how 'overrides' is used), and typical usage scenarios. It lacks this context, making it incomplete for an agent to use reliably.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It mentions 'repo-local profile' and 'status-specific template', hinting at the 'profile' and 'status' parameters, but leaves 'overrides', 'source', and 'output' unexplained. This is insufficient for 5 parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Creates') and the resource ('ReSpec source document'), and specifies the inputs ('repo-local profile and status-specific template'). It also distinguishes from sibling tools: respec_build is for building, respec_list_profiles for listing, etc., so this tool's role is clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like respec_build, respec_validate, or respec_preflight. It does not state prerequisites or conditions where scaffolding is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
respec_validateValidate ReSpec Document (full render, no write)C
Runs ReSpec rendering via Puppeteer and returns render diagnostics plus post-render compliance results. Does not write output.
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | ||
| status | No | ||
| overrides | No | ||
| source | No | ||
| output | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full burden. It discloses the use of Puppeteer for rendering and that it does not write output. However, it omits side effects, permissions needed, or potential failures. The disclosure is adequate but not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short and easy to read, but it sacrifices essential detail. While concise, it does not fully earn its place by covering key aspects beyond purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given five parameters, no output schema, and no annotations, the description is incomplete. It does not explain output format, error handling, prerequisites, or any usage context beyond basic validation. More detail is needed for adequate completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the description provides no explanation for any of the five parameters (profile, status, overrides, source, output). No defaults or formats are mentioned. The description fails entirely to add meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool validates a ReSpec document, runs rendering via Puppeteer, and returns diagnostics. The title adds 'full render, no write', distinguishing it from write tools. However, it could be more specific about the types of validation performed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions 'Does not write output', hinting at a contrast with respec_build, but provides no explicit guidance on when to use this tool over siblings like respec_preflight or respec_scaffold. No criteria for preferred usage are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
respec_build - First observed
respec_list_profiles - First observed
respec_preflight - First observed
respec_scaffold - First observed
respec_validate
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: build renders output, list_profiles discovers profiles, preflight checks policies, scaffold creates source, validate runs diagnostics. No overlap.
All tools follow the consistent pattern 'respec_verb' with snake_case naming (e.g., respec_build, respec_list_profiles).
5 tools is well-scoped for the ReSpec domain, covering creation, checking, building, and validation without unnecessary extras.
The tool surface covers the full lifecycle: source creation (scaffold), policy checks (preflight), rendering (build, validate), and configuration discovery (list_profiles).
Maintenance
Related MCP Connectors
Independent MCP server for the TC39 specs (ECMA-262 + ECMA-402): clauses, search, diffs, history.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
MCP server (stdio): lint OpenAPI specs with Spectral via the AgentForge API
Official DevSpeak MCP server — translate technical text into formal specs from any AI IDE or agent
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP Server for accessing W3C/WHATWG/IETF web specifications. Provides AI assistants with access to official web standards data including specifications, WebIDL definitions, CSS properties, and HTML elements.1129 npm4MIT

Specifai MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for Specifai project integration and automation with any MCP-compatible AI tool. This server currently exposes tools to read all documents generated by the Specifai project.4 npm13MIT- AlicenseCqualityBmaintenanceAn MCP server implementing Spec-Driven Development workflows for AI-agent CLIs and IDEs like Claude Code and Cursor, enabling spec-first development with automated workflow guidance and quality checks.16179 npm52MIT
- AlicenseAqualityDmaintenanceA comment-based spec-driven development MCP server that facilitates workflows from requirements creation to implementation via AI, using @spec-impl markers.52MIT