mssql

Installation
SKILL.md

Microsoft SQL Server

Interact with Microsoft SQL Server databases using the mssql CLI. All commands output JSON by default for reliable parsing.

IMPORTANT — Agent safety rules:

  1. Never run mssql sql-dangerous without explicit user approval. Always present the full SQL query to the user and explain what it does before executing. This command can modify or destroy data (INSERT, UPDATE, DELETE, DROP, etc.).
  2. Prefer mssql sql for reads. Use the read-only mssql sql command for SELECT queries. It blocks dangerous statements automatically.
  3. Prefer mssql schema over raw queries when you need table structure information.
  4. If you are unsure of the schema, use mssql schema to check first — do not guess column or table names.

Setup

Add a server connection

mssql server add --name mydb --server localhost --database MyDatabase --user sa --password "secret" --format json
mssql server add --name mydb --server db.example.com --database MyDatabase --windows-auth --trust-cert --format json
Related skills
Installs
22
First Seen
Feb 24, 2026