Skip to content

Add configurable MCP support for ReSpec report workflows#5168

Open
danielcamposramos wants to merge 1 commit intospeced:mainfrom
danielcamposramos:codex/respec-mcp-authoring-guidance
Open

Add configurable MCP support for ReSpec report workflows#5168
danielcamposramos wants to merge 1 commit intospeced:mainfrom
danielcamposramos:codex/respec-mcp-authoring-guidance

Conversation

@danielcamposramos
Copy link
Copy Markdown

Summary

This PR adds a configurable stdio MCP companion for ReSpec so AI tools and editors can scaffold, preflight, validate, and build reports from repo-local profiles.

What Changed

  • add respec-mcp stdio entrypoints and MCP core/server modules
  • add repo-local profile/config discovery via respec-mcp.config.json and respec-mcp/profiles/*.json
  • add Docker runtime for Node 24 + Chromium environments
  • add focused MCP tests
  • add LLM authoring guidance for W3C and Community Group report workflows, including standards-transition patterns and examples
  • expose the authoring guidance path in MCP responses so clients can discover and apply it

Why

The goal is to let Community Groups and similar spec repositories keep local policy and templates while reusing one upstream MCP runtime. The added authoring guidance is meant to make the MCP useful for real standards-oriented writing and review, not only for rendering HTML.

Validation

  • docker build -t respec-mcp:local .
  • docker run --rm --entrypoint node respec-mcp:local /app/node_modules/jasmine/bin/jasmine.js --random=false /app/tests/mcp.cjs

Introduce a stdio MCP interface for ReSpec so editors and AI tools can scaffold, preflight, validate, and build reports from repo-local profiles.

Keep group-specific policy out of the core implementation by loading statuses, templates, required sections, required links, and phrase checks from repository configuration.

Add a Docker runtime for Node 24 and Chromium-based environments so the same workflow can run consistently in local and containerized setups.
@sidvishnoi
Copy link
Copy Markdown
Member

Can you share a video demo to show how it works?

@danielcamposramos
Copy link
Copy Markdown
Author

Can you share a video demo to show how it works?

Hi @sidvishnoi,

Thanks for looking at this. We built this MCP as a side project within the PM-KR Community Group to support our own report authoring workflow. The group's focus is on the main specification work, so we don't have the bandwidth to record a video demo right now — but the MCP is functional and has already been used in practice.

How to use it:
The server runs over stdio, so any MCP-aware client can connect.

VSCode agents (Claude Code, Cline, GitHub Copilot, etc.) — add to your MCP settings:

{
"mcpServers": {
"respec-mcp": {
"command": "node",
"args": ["tools/respec-mcp.js", "--repo-root", "/path/to/your/spec-repo"],
"transport": "stdio"
}
}
}

Docker (includes Node 24 + headless Chromium for respec_build):

docker build -t respec-mcp:local .
docker run --rm -i respec-mcp:local

CLI (directly, for scripting or CI):

node tools/respec-mcp.js --repo-root /path/to/your/spec-repo

Once connected, the agent gets five tools:
respec_list_profiles, respec_scaffold, respec_preflight, respec_validate, and respec_build.
Each consuming repo provides its own respec-mcp.config.json and respec-mcp/profiles/*.json to define allowed statuses, required sections, forbidden phrases, templates, and build paths — so group-specific policy stays in the repo, not in the MCP server.

Live artifact
The PM-KR Standards Track Transition Report was drafted using this setup with LLM assistance (Codex). The PM-KR repo at w3c-cg/pm-kr has a working respec-mcp.config.json and profile that can serve as a reference for other groups.

Happy to answer any questions about the implementation or integration patterns.

@danielcamposramos danielcamposramos marked this pull request as ready for review April 10, 2026 18:52
@marcoscaceres
Copy link
Copy Markdown
Contributor

Will take a look soon…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants