Skip to content
Back to skills

Setup

ASecurity

Set up, check, change and roll back the sql-server MCP server: Node.js, config, server copy, one registration, environments, grants and pending audit records.

  • 34 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 8, 2026
ai-agentsgoshellbashsqlnodeazuregitdatabase

Works with

  • cli
  • mcp

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add melodic-software/claude-code-plugins --skill setup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Setup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Setup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/melodic-software-setup-831b0cd5/badge)](https://www.skillsdirectory.com/skills/melodic-software-setup-831b0cd5)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: "Set up, check, change and roll back the sql-server MCP server: Node.js, config, server copy, one registration, environments, grants and pending audit records."
argument-hint: "[check|status|diff|apply|init|rollback|…] --config <path> [--environment <name>]"
user-invocable: true
disable-model-invocation: true
---

# Setup

## What this sets up

One registration (named `sql-server` unless the user picks another) is one stdio server that
serves, from one config file, the allow-list of environments its repeated `--environment`
arguments name (design:
[ADR 0086](https://github.com/melodic-software/claude-code-plugins/blob/main/docs/adr/0086-bound-the-sql-server-read-tier-by-a-read-only-principal-and-fixed-registrations.md)).
The plugin ships no server in its own `.mcp.json`; `init` installs a copy of the server into
`${CLAUDE_PLUGIN_DATA}/server` (why that directory: "Upstream record" below), and offers the
registration command.

The read-only database principal you create is the guarantee. A registration on a login that can
write is not read-only, whatever the reject list does. This skill creates no principal. Config
shape and examples: `${CLAUDE_PLUGIN_ROOT}/README.md` "Config"; Azure SQL Database:
`${CLAUDE_PLUGIN_ROOT}/reference/azure-sql-database.md`.

Every action runs one script from the project directory:

```bash
node "${CLAUDE_SKILL_DIR}/scripts/check-setup.mjs" <action> --config <path> --data-dir "${CLAUDE_PLUGIN_DATA}" [options]
```

`--help` lists the ten actions and their options. Exit 0 is done, 1 is a FAIL row or a refused
action (report its message), 2 is a usage error to fix and rerun. Ask once for `--config` when the
user gave none. When the user asks for project scope, refuse it in your first reply: a
registration lives only where the agent cannot edit it, and the repository is not such a place.

## Confirmation

Every action that changes something prints the change and writes nothing until rerun with `--yes`.
Show the person the printed change and rerun with `--yes` only after they confirm it in this
conversation. Two rules hold whatever `--yes` says:

- When any stored registration, under any name, names the config, setup never writes it. It
  prints the arguments for the `apply_config` tool for a narrowing change; call that tool with
  them, which asks the person to approve. A change that widens access is never applied that way:
  setup says so, and the person edits the config file by hand and restarts the server (`/mcp`
  reconnect). When that config file is missing, setup refuses the change.
- Setup never runs a registration that reaches further than the stored one (a first registration,
  an added environment, `--write`, `--no-approval` or a new variable). It prints the command per
  shell; the person runs it. Never run that command yourself.

## Actions

- **`check`** (changes nothing): report every row in a PASS/FAIL/WARN/INFO table with one
  remediation line per FAIL. `--connect` also signs in to each environment as each principal and
  reads its grants and reachable databases (read statements only); offer it after the offline
  rows pass. `--strict` also fails on a WARN. Report the `edit-deny rule to keep` row as advice,
  not as checked. `--effective` adds, after the rows, one `EFFECTIVE  <env>: <json>` line per
  environment holding its settings after `defaults` are merged (the same fields `describe_environments`
  reports, plus write ceilings, accepted clients and audit text flags); use it to compare a config
  with what is expected without merging by hand. It names no secret.
- **`status`** (changes nothing): JSON lines with the server copy, the registration, pending
  widening, and audit and stats counts. Summarize them.
- **`diff --proposed <file>`** (writes nothing): the change classified as widening or narrowing.
  Show it and stop for the person; edit no config file yourself.
- **`apply`** `--proposed <file>` (writes nothing): prints the `apply_config` arguments, or that a
  widening change is a hand edit.
- **`init`**: with no config yet, writes the first one from `--proposed <file>` after
  confirmation; installs the server copy with `--yes`; then offers the registration. After an
  install, tell the person to reconnect running registrations (`/mcp`), since a running server
  loads some files from the new copy.
- **`add-environment <name> --entry <json>`**, **`edit-environment <name> --entry <json>`**,
  **`remove-environment <name>`**: the config change (direct write with `--yes`, or the
  `apply_config` arguments), then the registration for the new allow-list.
- **`rollback`**: returns the server to its one retained previous copy, after a probe shows that
  copy can load the current config under the registration's own arguments; `--target config`
  restores `<config>.previous` the same way a config change goes in.
- **`resolve-pending <pendingId> --outcome committed|not-committed`**: closes an unresolved
  pending audit record once the person has found out what happened to that write; `check` fails
  until each one is closed.

Pass `--no-approval` only when the person asks for writes without a prompt; setup adds it only
when every write-enabled environment declares `local: true`, and never to `apply_config`.

## Output

What was already in place, what changed (server copy version, config written or `apply_config`
arguments, registration made or printed), what was refused, and each FAIL with its remediation.

## What this skill does not do

- Never print a credential value; the scripts name variables and helper commands only.
- Never create or alter a database principal or grant: those stay with the database owner.
- Writes only `${CLAUDE_PLUGIN_DATA}/server` (built in `server.next` and swapped in, one previous
  copy kept), the config and `<config>.previous` after confirmation when no registration names the
  config, one audit line per `resolve-pending`, and, after confirmation, a registration no wider
  than the stored one.
- A plain `claude plugin uninstall` removes `${CLAUDE_PLUGIN_DATA}`, and with it the server copy
  every registration names; `--keep-data` keeps it. `check` fails a registration whose server is
  missing.

## Upstream record

- MCP scopes and environment variable expansion in registrations:
  <https://code.claude.com/docs/en/mcp#environment-variable-expansion-in-mcp-json>.
- When an added MCP server becomes available to a session:
  <https://code.claude.com/docs/en/mcp#managing-your-servers>.
- Persistence of `${CLAUDE_PLUGIN_DATA}` across plugin updates and its removal on uninstall:
  <https://code.claude.com/docs/en/plugins/components#path-variables-and-persistent-data>.
- Edit deny rules and their path anchors: <https://code.claude.com/docs/en/permissions#read-and-edit>.

## Related

- `${CLAUDE_PLUGIN_ROOT}/README.md` "Setup" and "Reload".

Files in this skill

  • SKILL.md7 KB
  • scripts/check-setup.mjs6.7 KB
  • scripts/install-server.mjs3.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.