Skip to content

docs(adr): decide the read-only tier design of the SQL Server MCP plugin - #10615

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-9805-40634539707-1
Oct 28, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-9805-40634539707-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #9805

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Adds ADR 0086, which decides the five open design questions of #5940 for the read path only, following the owner's Q96 go-ahead. The guarantee is a consumer-created read-only database principal. Each server-side control is labeled guarantee or heuristic. Each registration gets a fixed three-tool set bound to one environment. A setup skill registers user- or local-scope servers under consumer-chosen names. The server is JavaScript on node with tedious, one stdio process per registration per session (slice 4 to confirm), and a versioned JSON Schema config that holds connections by reference. The plugin directory is plugins/sql-server.

Not verified

  • scripts/check-adr-numbers.sh --check was not run here: check-affected lists it as CI-only and the lane's Bash allows only the named wrappers. I checked uniqueness by inspection instead (0086 is unused). CI runs it on the PR.
  • ci-status green on the PR head is left to the PR's CI.
  • Tidy pass 4 (ai-slop:audit fix) could not run detect.sh, the sha256 concurrent-edit guard or emit-fix-record.sh, because Bash is limited to the lane wrappers. The rubric was applied by reading only, so no findings file was written. Tidy passes 1 and 2 had nothing to do (no code files).
  • typos was skipped by check-affected because typos is not installed in this lane.
  • Untracked files .bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile and .zshrc appear at the checkout root. This run did not create them; they look like sandbox mount points. They were left untouched and are not part of this change.
  • The ADR records the owner's Q96 go-ahead as acceptance. #5940 states no leaning on language, driver, naming or topology, so those choices (node with tedious, user- or local-scope registrations from a setup skill, per-registration stdio processes) are this run's recommendations, made under that go-ah
  • This run made no commit, as the lane's instructions direct. The change stays in the working tree for the runner's patch.

Fix

  • docs/adr/0086-bound-the-sql-server-read-tier-by-a-read-only-principal-and-fixed-registrations.md: new ADR with one ### heading per question 1 to 5, a guarantee/heuristic table for every read control, the alternatives considered (the .NET/SqlClient/ScriptDom stack, plugin-shipped servers, layered con

Verification

The runner ran each check from the base copy against 2c1abe7:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • check-changelog-fragments: all 9 fragments valid (no plugin changed, so no fragment needed)
  • check-affected: 10 passed, 5 skipped; an MD018 markdownlint failure from a line starting '#5940' was fixed and the check re-run clean
  • grep '^### ' on the new ADR: 5 matches; grep -i 'heuristic': matches present; no em dashes
  • Number uniqueness: Glob docs/adr/0086-* returns only the new file; the highest existing number was 0085
  • Fresh-context review subagent: 9 findings, all fixed. They covered a post-call TRANCOUNT check with connection discard, a SELECT-only accept rule with the full lock-holding hint list, a correct account of autocommit shared locks, project scope refused, no secret in the registration command, a reso
  • read https: //github.com/melodic-software/claude-code-plugins/issues /5940 (via api.github.com): S1-S7, F1-F10, Evidence items 1-23, open questions with no stated leaning, Q96 decision comment
  • read https: //api.github.com/repos/melodic-software/claude-code-plugins/issues /9849, /9892, /9898: sibling slices use a <plugin> placeholder; slice 4 measures LOCK_TIMEOUT, isolation, row cap, timeout and per-session topology
  • read https: //modelcontextprotocol.io/specification/2026-07-28/server/tools: tools/list MUST NOT vary per-connection or as a side effect of other requests, MAY vary by authorization; clients MUST treat annotations as untrusted unless from trusted servers
  • read https: //code.claude.com/docs/en/permissions: MCP rules use mcp__<server> / mcp__<server><tool>; a settings-file mcp rule with parentheses is skipped; argument matching only via a --disallowedTools deny rule
  • read https: //code.claude.com/docs/en/mcp: plugin tool names are mcp__plugin_<plugin>_<server>__<tool>; local and user scopes live in ~/.claude.json, project scope in .mcp.json; claude mcp add --scope syntax
  • read https: //code.claude.com/docs/en/plugins/components: CLAUDE_PLUGIN_ROOT changes per version; CLAUDE_PLUGIN_DATA survives updates at ~/.claude/plugins/data/<id>/; variables are substituted in plugin MCP configs
  • read https: //learn.microsoft.com/en-us/sql/t-sql/statements/set-transaction-isolation-level-transact-sql: RCSI off by default on SQL Server, on by default in Azure SQL Database; table hints override the session isolation level; shared locks are released by the statement's end
  • read https: //learn.microsoft.com/en-us/sql/t-sql/statements/set-lock-timeout-transact-sql: default -1 waits forever; the setting stays for the connection
  • read https: //learn.microsoft.com/en-us/sql/t-sql/statements/set-xact-abort-transact-sql: ON rolls back the whole transaction on a run-time error; OFF is the default
  • read https: //tediousjs.github.io/tedious/api-connection.html: auth types include token-credential, which asks the credential for a new token on each connect; NTLM is the only Windows option, with no integrated or Kerberos mode; requestTimeout defaults to 15000 ms
  • read https: //learn.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles: db_datareader grants SELECT on the database; the page does not cover the guest user, so the ADR states no guest specifics
  • Tidy (code-tidying:tidy-diff, 1 row, 204 lines, markdown only): pass 3 resolved docs/standards/concise-prose.md as the house standard and made 6 wording edits; pass 4 was a manual rubric read with no findings
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40634539707

Left out: the items under Not verified.

Related

#9805

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 2c1abe747275db9571e735a625ed35bb2f90cc81: 0 finding(s), 0 as inline comments.

No security findings.

critical-findings: 0

Scope: the pull request adds one file, docs/adr/0086-bound-the-sql-server-read-tier-by-a-read-only-principal-and-fixed-registrations.md. It is an architecture decision record with no code, workflow, manifest, hook, or configuration change. It matches none of the trusted paths. It touches no plugin.json or marketplace.json, so no manifest <field> lines apply. It deletes or softens no standing instruction. The PR description contains no embedded directives aimed at the review.

I read the ADR for design-level security claims and found none that is wrong or unsafe as written:

  • It says the read guarantee rests on a least-privilege database principal that the consumer creates. It labels the plugin-side controls as guarantee or heuristic. It says plainly that the reject list is not the boundary.
  • It binds each registration to a fixed server and database allow-list and gives the agent no tool to widen it. It names the cross-database three-part-name gap and puts it on the principal.
  • It refuses project-scope registrations because the agent can write the repository .mcp.json. It also refuses a --config path inside the project directory and defers layered config discovery for the same reason.
  • It keeps secrets out of the registration command and the config. Credentials come from environment variables or an Entra default credential.

Nothing in this PR can be exploited. The later slices that implement the server, the reject list, and the setup skill are where the ADR's claims need checking against code. That is outside this PR.

Spend: none. The PR changes no billing setting, plan, or billed resource, so there is no hold.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 2c1abe747275db9571e735a625ed35bb2f90cc81: 0 finding(s), 0 as inline comments.

No findings. This PR adds one file, docs/adr/0086-…md, a docs-only ADR with no code, manifest or trusted-path changes. I read the diff and the PR context. I ran no commands, so nothing below was run by me.

Closing issue #9805, criteria checked by reading the file:

  • check-adr-numbers.sh --check exits 0. I did not run it, and CI runs it. By inspection, 0086 is unused, 0084 and 0085 sit just below it, and the header format (- Status, - Date) matches 0085.
  • One ### heading per question 1 to 5. Section "Decision" has ### 1. to ### 5., so the count is 5, which meets "5 or more".
  • heuristic appears at least once. It appears in the control table and the surrounding prose.
  • ci-status green. Left to CI. I could not check it.
  • Scope. The ADR decides all five open questions for the read path only. It names the plugin directory (plugins/sql-server) and leaves the write tier out.

Internal consistency: The guarantee and heuristic labels are applied consistently. Each "guarantee" row rests on plugin code or the engine, and each "heuristic" row says what overrides it. The reject-list rules and the "no wrapper transaction" reasoning do not contradict each other. The pool arithmetic (two connections per registration, six for three) is correct. Section 3 and the alternatives agree on why layered config discovery is deferred.

Author-claimed and unverified by me:

  • The external documentation facts the ADR cites: RCSI defaults, the tedious auth types, the MCP tools/list rule, ${CLAUDE_PLUGIN_*} substitution, and permission-rule matching.
  • The "Fresh-context review subagent" result.
  • The check-affected result.

Note for the human merging: the ADR records Status "accepted". The PR body says the language, driver, naming and topology choices are the lane's own recommendations made under the owner's Q96 go-ahead, because #5940 states no leaning on them. Merging therefore ratifies those picks.

Spend: None. There is no workflow or schedule change, and no billed resource.

Embedded instructions: The PR context contains no directives aimed at the reviewer.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 2c1abe747275db9571e735a625ed35bb2f90cc81.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit a33623c Oct 28, 2026
43 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-9805-40634539707-1 branch October 28, 2026 05:58
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.

docs(adr): decide the read-only tier design of the SQL Server MCP plugin

0 participants