|
| 1 | +--- |
| 2 | +name: sdk-tier-audit |
| 3 | +description: >- |
| 4 | + Perform a tier audit of the C# MCP SDK against SEP-1730 (the SDK Tiering System). |
| 5 | + Clones the conformance and C# SDK repositories, builds and runs conformance tests, |
| 6 | + runs the tier-check CLI, evaluates documentation and policies, and produces |
| 7 | + assessment and remediation reports. Delegates all audit logic to the |
| 8 | + mcp-sdk-tier-audit skill in the conformance repository. |
| 9 | +compatibility: Requires git, .NET SDK 10.0+, Node.js 20+, and npm. Needs read access to the C# SDK and conformance GitHub repositories. |
| 10 | +argument-hint: '[scope] [--csharp-sdk-repo <owner/repo>] [--csharp-sdk-branch <branch>] [--conformance-repo <owner/repo>] [--conformance-branch <branch>]' |
| 11 | +--- |
| 12 | + |
| 13 | +# SDK Tier Audit |
| 14 | + |
| 15 | +Perform a tier audit of the C# MCP SDK against [SEP-1730](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1730) (the SDK Tiering System). This skill delegates all audit logic to the `mcp-sdk-tier-audit` skill from the conformance repository — it handles setup, then follows the conformance skill's instructions. |
| 16 | + |
| 17 | +If any step fails, stop and report the error to the user. Do not proceed to the next step. |
| 18 | + |
| 19 | +## Arguments |
| 20 | + |
| 21 | +Parse optional arguments from the user's input: |
| 22 | + |
| 23 | +- **scope** — `Conformance + Repo Health` (default) or `Repo Health` |
| 24 | +- **--csharp-sdk-repo** — C# SDK repository as `owner/repo` (default: `modelcontextprotocol/csharp-sdk`) |
| 25 | +- **--csharp-sdk-branch** — C# SDK branch (default: `main`) |
| 26 | +- **--conformance-repo** — Conformance repository as `owner/repo` (default: `modelcontextprotocol/conformance`) |
| 27 | +- **--conformance-branch** — Conformance repo branch (default: `main`) |
| 28 | + |
| 29 | +If the user provides just a scope keyword (e.g., `/sdk-tier-audit Repo Health`), use that as the scope. All other arguments use the defaults if not specified. |
| 30 | + |
| 31 | +## Prerequisites |
| 32 | + |
| 33 | +The following tools must be available: |
| 34 | + |
| 35 | +- **git** — to clone repositories |
| 36 | +- **.NET SDK** (10.0+) — to build and run the C# SDK conformance server/client |
| 37 | +- **Node.js** (20+) and **npm** — to build and run the conformance CLI |
| 38 | + |
| 39 | +## Step 1: Clone and Build |
| 40 | + |
| 41 | +### Clone the C# SDK |
| 42 | + |
| 43 | +**macOS / Linux:** |
| 44 | + |
| 45 | +```bash |
| 46 | +git clone --depth 1 -b <csharp_sdk_branch> https://github.com/<csharp_sdk_repo>.git /tmp/csharp-sdk |
| 47 | +``` |
| 48 | + |
| 49 | +**Windows (PowerShell):** |
| 50 | + |
| 51 | +```powershell |
| 52 | +git clone --depth 1 -b <csharp_sdk_branch> https://github.com/<csharp_sdk_repo>.git $env:TEMP\csharp-sdk |
| 53 | +``` |
| 54 | + |
| 55 | +### Clone the conformance repository |
| 56 | + |
| 57 | +**macOS / Linux:** |
| 58 | + |
| 59 | +```bash |
| 60 | +git clone --depth 1 -b <conformance_branch> https://github.com/<conformance_repo>.git /tmp/conformance |
| 61 | +``` |
| 62 | + |
| 63 | +**Windows (PowerShell):** |
| 64 | + |
| 65 | +```powershell |
| 66 | +git clone --depth 1 -b <conformance_branch> https://github.com/<conformance_repo>.git $env:TEMP\conformance |
| 67 | +``` |
| 68 | + |
| 69 | +### Build the conformance CLI |
| 70 | + |
| 71 | +**macOS / Linux:** |
| 72 | + |
| 73 | +```bash |
| 74 | +cd /tmp/conformance && npm ci && npm run build |
| 75 | +``` |
| 76 | + |
| 77 | +**Windows (PowerShell):** |
| 78 | + |
| 79 | +```powershell |
| 80 | +cd $env:TEMP\conformance |
| 81 | +npm ci |
| 82 | +if ($LASTEXITCODE -ne 0) { throw "npm ci failed" } |
| 83 | +npm run build |
| 84 | +if ($LASTEXITCODE -ne 0) { throw "npm run build failed" } |
| 85 | +``` |
| 86 | + |
| 87 | +Use `/tmp` paths on macOS/Linux and `$env:TEMP` paths on Windows throughout the remaining steps. |
| 88 | + |
| 89 | +## Step 2: Start Conformance Server (if scope includes conformance) |
| 90 | + |
| 91 | +Skip this step if the scope is "Repo Health". |
| 92 | + |
| 93 | +### Build the C# SDK |
| 94 | + |
| 95 | +```bash |
| 96 | +cd /tmp/csharp-sdk && dotnet build |
| 97 | +``` |
| 98 | + |
| 99 | +### Start the conformance server |
| 100 | + |
| 101 | +The server must remain running throughout the audit. Use `nohup` (macOS/Linux) or `Start-Process` (Windows) to prevent the process from dying when the shell session changes. |
| 102 | + |
| 103 | +**macOS / Linux:** |
| 104 | + |
| 105 | +```bash |
| 106 | +cd /tmp/csharp-sdk |
| 107 | +nohup dotnet run --no-build --project tests/ModelContextProtocol.ConformanceServer --framework net9.0 -- --urls http://localhost:3003 > /tmp/conformance-server.log 2>&1 & |
| 108 | +# Wait for the server to be ready (macOS lacks `timeout`, so use a loop) |
| 109 | +for i in $(seq 1 60); do |
| 110 | + curl -sf http://localhost:3003/health > /dev/null 2>&1 && break |
| 111 | + sleep 1 |
| 112 | +done |
| 113 | +curl -sf http://localhost:3003/health > /dev/null || { echo "Server failed to start — check /tmp/conformance-server.log"; exit 1; } |
| 114 | +echo "Conformance server ready" |
| 115 | +``` |
| 116 | + |
| 117 | +**Windows (PowerShell):** |
| 118 | + |
| 119 | +```powershell |
| 120 | +cd $env:TEMP\csharp-sdk |
| 121 | +Start-Process -NoNewWindow dotnet -ArgumentList "run","--project","tests/ModelContextProtocol.ConformanceServer","--framework","net9.0","--","--urls","http://localhost:3003" |
| 122 | +# Wait for the server to be ready |
| 123 | +$timeout = 60; $elapsed = 0 |
| 124 | +while ($elapsed -lt $timeout) { |
| 125 | + try { Invoke-WebRequest -Uri http://localhost:3003/health -UseBasicParsing -ErrorAction Stop | Out-Null; break } |
| 126 | + catch { Start-Sleep 1; $elapsed++ } |
| 127 | +} |
| 128 | +if ($elapsed -ge $timeout) { throw "Conformance server did not start within $timeout seconds" } |
| 129 | +``` |
| 130 | + |
| 131 | +## Step 3: Run the Audit |
| 132 | + |
| 133 | +Read the **"Any Other AI Coding Agent"** section from the conformance skill's README: |
| 134 | + |
| 135 | +- macOS/Linux: `/tmp/conformance/.claude/skills/mcp-sdk-tier-audit/README.md` |
| 136 | +- Windows: `$env:TEMP\conformance\.claude\skills\mcp-sdk-tier-audit\README.md` |
| 137 | + |
| 138 | +Follow those instructions exactly, using the reference files in the `references/` directory alongside it. |
| 139 | + |
| 140 | +The instructions describe a 5-step process: |
| 141 | + |
| 142 | +1. **Run the tier-check CLI** to get the deterministic scorecard |
| 143 | +2. **Evaluate documentation coverage** using the prompt in `references/docs-coverage-prompt.md` |
| 144 | +3. **Evaluate policies** using the prompt in `references/policy-evaluation-prompt.md` |
| 145 | +4. **Apply tier logic** using the thresholds in `references/tier-requirements.md` |
| 146 | +5. **Generate report** using the template in `references/report-template.md` |
| 147 | + |
| 148 | +### CLI parameters |
| 149 | + |
| 150 | +Derive the `owner/repo` from the C# SDK clone's git remote: |
| 151 | + |
| 152 | +```bash |
| 153 | +cd /tmp/csharp-sdk && git remote get-url origin | sed 's#.*github.com[:/]##; s#\.git$##' |
| 154 | +``` |
| 155 | + |
| 156 | +Derive the branch from the local checkout: |
| 157 | + |
| 158 | +```bash |
| 159 | +cd /tmp/csharp-sdk && git rev-parse --abbrev-ref HEAD |
| 160 | +``` |
| 161 | + |
| 162 | +**If scope is "Conformance + Repo Health"**, run with both server and client conformance: |
| 163 | + |
| 164 | +```bash |
| 165 | +cd /tmp/conformance |
| 166 | +node dist/index.js tier-check \ |
| 167 | + --repo <owner/repo> \ |
| 168 | + --branch <branch> \ |
| 169 | + --conformance-server-url http://localhost:3003 \ |
| 170 | + --client-cmd 'dotnet run --no-build --project /tmp/csharp-sdk/tests/ModelContextProtocol.ConformanceClient --framework net9.0 -- $MCP_CONFORMANCE_SCENARIO' \ |
| 171 | + --output json |
| 172 | +``` |
| 173 | + |
| 174 | +**If scope is "Repo Health"**, run without conformance: |
| 175 | + |
| 176 | +```bash |
| 177 | +cd /tmp/conformance |
| 178 | +node dist/index.js tier-check \ |
| 179 | + --repo <owner/repo> \ |
| 180 | + --branch <branch> \ |
| 181 | + --skip-conformance \ |
| 182 | + --output json |
| 183 | +``` |
| 184 | + |
| 185 | +### Documentation and policy evaluation |
| 186 | + |
| 187 | +After running the CLI, perform the documentation coverage and policy evaluations by reading and following the prompts in the reference files. The SDK checkout at `/tmp/csharp-sdk` (or `$env:TEMP\csharp-sdk` on Windows) is the local path for these evaluations. |
| 188 | + |
| 189 | +### Report generation |
| 190 | + |
| 191 | +Write the assessment and remediation reports to the conformance repo's `results/` directory following the template in `references/report-template.md`: |
| 192 | + |
| 193 | +- `results/<YYYY-MM-DD>-csharp-sdk-assessment.md` |
| 194 | +- `results/<YYYY-MM-DD>-csharp-sdk-remediation.md` |
| 195 | + |
| 196 | +## Step 4: Present Results |
| 197 | + |
| 198 | +After the audit completes, present the user with: |
| 199 | + |
| 200 | +1. **Executive summary** — The tier classification and primary reasons (3-5 sentences) |
| 201 | +2. **Report file locations** — Paths to the assessment and remediation files |
| 202 | +3. **Key gaps** — Top items needed for tier advancement |
| 203 | + |
| 204 | +If the audit failed at any step, explain what happened and which step failed. |
0 commit comments