# MCP And Manifests *For plugging CW into editors and other tools, and for keeping the vendor adapters in step. If you only use the `cw` command, you can skip this page.* CW has two main surfaces for machines: - CLI JSON: `cw --json` - MCP tools: `cw_*` JSON-RPC tools Both go through the same runtime entries where parity is declared — the same data comes out of both. The human-friendly CLI print-out is only a layer of paint on top of that shared payload. ## Hook It Up The MCP server is `scripts/mcp-server.js` inside the installed package. After `npm install -g cool-workflow`, its full path is `$(npm root -g)/cool-workflow/scripts/mcp-server.js`. Claude Code, one line: ```bash claude mcp add cool-workflow -- node "$(npm root -g)/cool-workflow/scripts/mcp-server.js" ``` Claude Desktop and Cursor take the same `mcpServers` JSON block (put the full path from `npm root -g` in `args`): ```json { "mcpServers": { "cool-workflow": { "command": "node", "args": ["/path/from/npm-root-g/cool-workflow/scripts/mcp-server.js"] } } } ``` See **[From your editor](#from-your-editor)** below for the per-editor config file locations and the VS Code variant. ## From your editor CW offers the same runtime over MCP — a standard way for editors to call tools. Claude Desktop, Cursor, and VS Code call CW as a tool, so your agent can plan a run, drive it, and verify a report without leaving the editor.
Claude Code The simple way — as a plugin (this wires MCP for you): ```text /plugin marketplace add coo1white/cool-workflow /plugin install cool-workflow@cool-workflow ``` Or use the one-line MCP command in [Hook It Up](#hook-it-up).
Claude Desktop Add the `mcpServers` block from [Hook It Up](#hook-it-up) to `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/`, Windows: `%APPDATA%\Claude\`), then restart Claude Desktop.
Cursor Add the same block to `~/.cursor/mcp.json` (or `.cursor/mcp.json` inside one project).
VS Code VS Code uses a `servers` key. Add this to `.vscode/mcp.json` in your project (or run **MCP: Add Server** from the Command Palette): ```json { "servers": { "cool-workflow": { "type": "stdio", "command": "node", "args": ["/path/from/npm-root-g/cool-workflow/scripts/mcp-server.js"] } } } ```
Once connected, your agent sees the `cw_*` tools — `cw_plan`, `cw_status`, `cw_report`, and the rest — the same registry the CLI uses, parity-checked. ## Generated Vendor Targets The manifest source currently targets: | Target | Purpose | | --- | --- | | `claude` | Claude Code plugin and MCP configuration. | | `codex` | Codex plugin manifest. | | `agents` | Generic `.agents` adapter. | | `gemini` | Gemini plugin manifest and MCP configuration. | | `opencode` | OpenCode plugin manifest and MCP configuration. | The source of truth is: ```text plugins/cool-workflow/manifest/plugin.manifest.json ``` Generated files live under directories such as `.claude-plugin/`, `.codex-plugin/`, `.gemini-plugin/`, `.opencode-plugin/`, and `.agents/`. ## Regenerate And Check From `plugins/cool-workflow`: ```bash npm run gen:manifests npm run gen:manifests -- --check npm run manifest:load-check npm run parity:check ``` `gen:manifests -- --check` catches generated byte drift. `manifest:load-check` boots generated MCP configs and checks JSON-RPC `initialize` plus `tools/list`. `parity:check` validates declared CLI and MCP payload parity. ## CLI To MCP Examples | CLI | MCP | | --- | --- | | `cw app list --json` | `cw_app_list` | | `cw report --json` | `cw_report` | | `cw run import PATH --target DIR` | `cw_run_import` | | `cw run verify-import ` | `cw_run_verify_import` | | `cw telemetry verify ` | `cw_telemetry_verify` | | `cw workbench view --json` | `cw_workbench_view` | Some capabilities are intentionally CLI-only, such as `quickstart`, because they are convenience wrappers over lower-level mechanisms MCP hosts can compose. ## Adding A Vendor The intended path is data-first: 1. Add a `targets.` entry to `plugin.manifest.json`. 2. Add the vendor output template in the manifest source. 3. Run `npm run gen:manifests`. 4. Run `npm run manifest:load-check`. Do not fork runtime logic per vendor. Vendor-specific rendering or prompt formatting belongs in wrappers or manifest data, not in the core runtime. ## Related Pages - [Commands or API](Commands-or-API.md) - [Architecture](Architecture.md) - [Operations](Operations.md)