|
| 1 | +--- |
| 2 | +title: "Author MCP Server" |
| 3 | +description: "Local read-only MCP server for IDE and Copilot Chat integrations. Exposes workflow inspection, graph traversal, lint, what-if, trace, and audit tools over the standard Model Context Protocol." |
| 4 | +--- |
| 5 | + |
| 6 | +import { Aside, Tabs, TabItem } from '@astrojs/starlight/components'; |
| 7 | + |
| 8 | +`ado-aw mcp-author` runs a **local, read-only MCP server over stdio** for IDE and Copilot Chat integrations. It exposes the full set of IR analysis commands — inspect, graph traversal, lint, what-if, trace, and audit — as MCP tools so your IDE agent can reason about ado-aw workflows without you running CLI commands by hand. |
| 9 | + |
| 10 | +<Aside type="caution" title="Not the SafeOutputs MCP server"> |
| 11 | + `mcp-author` is a **local developer tool**. It is completely separate from the `ado-aw mcp` / `ado-aw mcp-http` servers that compiled pipelines run in Stage 1 to record safe-output proposals. |
| 12 | + |
| 13 | + | Server | Purpose | Who runs it | |
| 14 | + |--------|---------|-------------| |
| 15 | + | `ado-aw mcp-author` | Local IR queries for IDE agents | You, on your laptop | |
| 16 | + | `ado-aw mcp` | Stage 1 safe-output recording | Compiled pipeline (Stage 1) | |
| 17 | + | `ado-aw mcp-http` | Same, over HTTP for MCPG routing | Compiled pipeline (Stage 1) | |
| 18 | +</Aside> |
| 19 | + |
| 20 | +## When to use it |
| 21 | + |
| 22 | +Connect `mcp-author` to your IDE agent when you want to: |
| 23 | + |
| 24 | +- **Inspect compiled workflow structure** — stages, jobs, steps, outputs, `dependsOn` edges — without reading raw YAML. |
| 25 | +- **Trace a failing build** to see which jobs were skipped because of an upstream failure. |
| 26 | +- **Lint a workflow** before opening a PR. |
| 27 | +- **Ask "what if this step fails?"** to understand blast radius. |
| 28 | +- **Audit a build** to get the full `AuditData` JSON for post-mortem analysis. |
| 29 | + |
| 30 | +## Tools |
| 31 | + |
| 32 | +Every tool maps directly to an equivalent `ado-aw` CLI command. The `source_path` parameter accepts any relative path to a `.md` workflow file — `..` traversal, `~` prefixes, and non-`.md` targets are rejected. |
| 33 | + |
| 34 | +| Tool | CLI equivalent | Description | |
| 35 | +|------|----------------|-------------| |
| 36 | +| `inspect_workflow` | `ado-aw inspect <source>` | Build and return the public [`PipelineSummary`](/ado-aw/reference/ir/) | |
| 37 | +| `graph_summary` | `ado-aw graph dump --format json` | Return the resolved `GraphSummary` as a structured object | |
| 38 | +| `graph_dump` | `ado-aw graph dump [--format text\|dot]` | Render the dependency graph as plain text or Graphviz DOT | |
| 39 | +| `step_dependencies` | `ado-aw graph deps <source> <step>` | Traverse upstream or downstream dependencies from one step | |
| 40 | +| `step_outputs` | `ado-aw graph outputs <source>` | List declared outputs and the steps that consume them | |
| 41 | +| `whatif` | `ado-aw whatif <source> --fail <id>` | Classify downstream jobs as `skipped` or `runs_anyway` if a step fails | |
| 42 | +| `lint_workflow` | `ado-aw lint <source>` | Run structural lint checks; returns findings with severity | |
| 43 | +| `catalog` | `ado-aw catalog [--kind]` | List safe-output tools, runtimes, first-class tools, engines, and models | |
| 44 | +| `trace_failure` | `ado-aw trace <build-id-or-url>` | Trace a build's failing-job chain using audit data + local IR graph | |
| 45 | +| `audit_build` | `ado-aw audit <build-id-or-url> --json` | Download and analyze a completed build; same JSON shape as `--json` output | |
| 46 | + |
| 47 | +### `inspect_workflow` |
| 48 | + |
| 49 | +Returns the public [`PipelineSummary`](/ado-aw/reference/ir/) for a workflow source file — stages, jobs, steps, output declarations, and derived `dependsOn` edges. |
| 50 | + |
| 51 | +```json |
| 52 | +{ "source_path": "agents/my-agent.md" } |
| 53 | +``` |
| 54 | + |
| 55 | +### `graph_summary` |
| 56 | + |
| 57 | +Returns the resolved `GraphSummary` as a structured JSON object. Use this when you want machine-readable graph data rather than a text rendering. |
| 58 | + |
| 59 | +```json |
| 60 | +{ "source_path": "agents/my-agent.md" } |
| 61 | +``` |
| 62 | + |
| 63 | +### `graph_dump` |
| 64 | + |
| 65 | +Renders the dependency graph as plain text or Graphviz DOT. Useful for generating diagrams. |
| 66 | + |
| 67 | +```json |
| 68 | +{ "source_path": "agents/my-agent.md", "format": "text" } |
| 69 | +``` |
| 70 | + |
| 71 | +`format` accepts `"text"` (default) or `"dot"`. Passing `"json"` returns a `GraphSummary` object (same as `graph_summary`). |
| 72 | + |
| 73 | +### `step_dependencies` |
| 74 | + |
| 75 | +Traverses upstream or downstream dependencies from a given step or job ID. |
| 76 | + |
| 77 | +```json |
| 78 | +{ "source_path": "agents/my-agent.md", "step_id": "Agent", "direction": "upstream" } |
| 79 | +``` |
| 80 | + |
| 81 | +`direction` accepts `"upstream"` (default) or `"downstream"`. |
| 82 | + |
| 83 | +### `step_outputs` |
| 84 | + |
| 85 | +Lists every declared step output and the steps that reference it. Both filters are optional. |
| 86 | + |
| 87 | +```json |
| 88 | +{ "source_path": "agents/my-agent.md", "producer": "Agent", "consumer": null } |
| 89 | +``` |
| 90 | + |
| 91 | +### `whatif` |
| 92 | + |
| 93 | +Treats `failing_id` as the failing step or job and classifies every downstream job as `skipped` or `runs_anyway` based on compiled ADO condition strings. |
| 94 | + |
| 95 | +```json |
| 96 | +{ "source_path": "agents/my-agent.md", "failing_id": "Agent" } |
| 97 | +``` |
| 98 | + |
| 99 | +### `lint_workflow` |
| 100 | + |
| 101 | +Runs structural lint checks over the workflow. Returns a `LintReport` with findings at `error`, `warning`, and `info` severity levels. |
| 102 | + |
| 103 | +```json |
| 104 | +{ "source_path": "agents/my-agent.md" } |
| 105 | +``` |
| 106 | + |
| 107 | +### `catalog` |
| 108 | + |
| 109 | +Lists the in-tree registries. `kind` is optional; omit it to see all categories. |
| 110 | + |
| 111 | +```json |
| 112 | +{ "kind": "safe-outputs" } |
| 113 | +``` |
| 114 | + |
| 115 | +`kind` accepts `"safe-outputs"`, `"runtimes"`, `"tools"`, `"engines"`, `"models"`, or `null` (all). |
| 116 | + |
| 117 | +### `trace_failure` |
| 118 | + |
| 119 | +Downloads audit artifacts for a completed build and correlates the failing-job chain with the local typed IR. Returns a `TraceReport`. See the [Audit reference](/ado-aw/reference/audit/) for accepted build-ID / URL forms. |
| 120 | + |
| 121 | +```json |
| 122 | +{ |
| 123 | + "build_id_or_url": "12345", |
| 124 | + "step": null, |
| 125 | + "org": null, |
| 126 | + "project": null, |
| 127 | + "pat": null |
| 128 | +} |
| 129 | +``` |
| 130 | + |
| 131 | +- `step` — optional typed-IR step ID to focus the trace on. |
| 132 | +- `org`, `project` — ADO overrides for bare build IDs; inferred from the git remote when omitted. |
| 133 | +- `pat` — explicit PAT; uses `AZURE_DEVOPS_EXT_PAT` or the Azure CLI auth chain when omitted. |
| 134 | + |
| 135 | +### `audit_build` |
| 136 | + |
| 137 | +Downloads and analyzes a completed build. Returns the full `AuditData` JSON — same shape as `ado-aw audit --json`. See the [Audit reference](/ado-aw/reference/audit/) for the report structure. |
| 138 | + |
| 139 | +Artifact downloads are cached under `${TEMP}/ado-aw/audit/<build-id>/` and reused on subsequent calls unless `no_cache` is set. |
| 140 | + |
| 141 | +```json |
| 142 | +{ |
| 143 | + "build_id_or_url": "12345", |
| 144 | + "org": null, |
| 145 | + "project": null, |
| 146 | + "pat": null, |
| 147 | + "artifacts": null, |
| 148 | + "no_cache": false |
| 149 | +} |
| 150 | +``` |
| 151 | + |
| 152 | +- `artifacts` — optional array of `"agent"`, `"detection"`, and/or `"safe-outputs"` to download only a subset. |
| 153 | +- `no_cache` — when `true`, forces re-download even if a cached `run-summary.json` exists. |
| 154 | + |
| 155 | +## Trust model |
| 156 | + |
| 157 | +`mcp-author` runs as the invoking local user with no bounding directory or sandbox. It has full read access to your local filesystem (within the path-safety rules described above). ADO-facing tools (`audit_build`, `trace_failure`) use the same auth chain as `ado-aw audit`: |
| 158 | + |
| 159 | +1. Explicit `pat` parameter |
| 160 | +2. `AZURE_DEVOPS_EXT_PAT` environment variable |
| 161 | +3. Azure CLI (`az`) interactive login |
| 162 | + |
| 163 | +## IDE configuration |
| 164 | + |
| 165 | +`ado-aw` must be on your `PATH`. Install it via the [Quick Start](/ado-aw/setup/quick-start/) guide. |
| 166 | + |
| 167 | +<Tabs> |
| 168 | + <TabItem label="VS Code"> |
| 169 | + |
| 170 | +Add to your `.vscode/mcp.json` (workspace) or VS Code user settings: |
| 171 | + |
| 172 | +```json |
| 173 | +{ |
| 174 | + "mcp": { |
| 175 | + "servers": { |
| 176 | + "ado-aw-author": { |
| 177 | + "command": "ado-aw", |
| 178 | + "args": ["mcp-author"] |
| 179 | + } |
| 180 | + } |
| 181 | + } |
| 182 | +} |
| 183 | +``` |
| 184 | + |
| 185 | + </TabItem> |
| 186 | + <TabItem label="Claude Desktop"> |
| 187 | + |
| 188 | +Add to `claude_desktop_config.json` (usually at `~/Library/Application Support/Claude/` on macOS): |
| 189 | + |
| 190 | +```json |
| 191 | +{ |
| 192 | + "mcpServers": { |
| 193 | + "ado-aw-author": { |
| 194 | + "command": "ado-aw", |
| 195 | + "args": ["mcp-author"] |
| 196 | + } |
| 197 | + } |
| 198 | +} |
| 199 | +``` |
| 200 | + |
| 201 | + </TabItem> |
| 202 | + <TabItem label="Cursor"> |
| 203 | + |
| 204 | +Add to your Cursor MCP settings (`~/.cursor/mcp.json` or the project-level `.cursor/mcp.json`): |
| 205 | + |
| 206 | +```json |
| 207 | +{ |
| 208 | + "mcpServers": { |
| 209 | + "ado-aw-author": { |
| 210 | + "command": "ado-aw", |
| 211 | + "args": ["mcp-author"] |
| 212 | + } |
| 213 | + } |
| 214 | +} |
| 215 | +``` |
| 216 | + |
| 217 | + </TabItem> |
| 218 | +</Tabs> |
| 219 | + |
| 220 | +## See also |
| 221 | + |
| 222 | +- [CLI Commands](/ado-aw/setup/cli/) — the equivalent CLI commands for every `mcp-author` tool. |
| 223 | +- [Pipeline IR](/ado-aw/reference/ir/) — `PipelineSummary` and `GraphSummary` schema reference. |
| 224 | +- [Audit reference](/ado-aw/reference/audit/) — `AuditData` report shape, accepted URL forms, and cache behavior. |
| 225 | +- [MCP Gateway](/ado-aw/reference/mcpg/) — the MCPG that routes MCP calls inside compiled pipelines (a separate concern). |
0 commit comments