mssql-server

mssql-server is a skill for Claude Code, Codex from RichardHan/mssql_mcp_server. It costs 70 tokens per session (598 once invoked), scanned A, original, MIT.

A tool connection for exploring and querying Microsoft SQL Server, Azure SQL Database, or LocalDB. SQL databases store organised data in tables, and this workflow can inspect their tables and columns or run T-SQL queries.

In plain words
What is it for?
Use it to list tables, inspect columns, read data, run read-only queries, or set up and troubleshoot the SQL Server connection.
Why use it?
It gives you a defined way to answer questions about database contents and structure without guessing the schema.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to list tables, inspect columns, read data, run read-only queries, or set up and troubleshoot the SQL Server connection.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/richardhan/mssql_mcp_server/mssql-server
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add RichardHan/mssql_mcp_server --skill mssql-server
Clone the repo
git clone --depth 1 https://github.com/RichardHan/mssql_mcp_server

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mssql-server

README.md
[![agentmods](https://agentmods.dev/badge/skills/richardhan/mssql_mcp_server/mssql-server/github.svg)](https://agentmods.dev/skills/richardhan/mssql_mcp_server/mssql-server)
Your own site
<a href="https://agentmods.dev/skills/richardhan/mssql_mcp_server/mssql-server"><img src="https://agentmods.dev/badge/skills/richardhan/mssql_mcp_server/mssql-server/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mssql-server

Your own site · 80×15
<a href="https://agentmods.dev/skills/richardhan/mssql_mcp_server/mssql-server"><img src="https://agentmods.dev/badge/skills/richardhan/mssql_mcp_server/mssql-server.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 598 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.00598
Opus 5.5 $0.00028 $0.00239
Sonnet 5.5 $0.00014 $0.00120
Haiku 4.5 $0.00007 $0.00060

Measured today against content hash d8c252ac1ae6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mssql-server scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill/mssql-server/SKILL.md · 34 lines

How it starts

The opening of the file, as written. The whole thing — 34 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Microsoft SQL Server via MCP

Pairs with the open-source MCP server microsoft_sql_server_mcp (github.com/RichardHan/mssql_mcp_server, MIT). Launch: uvx microsoft_sql_server_mcp.

When to use

  • User asks a question answered by data in SQL Server, Azure SQL, or LocalDB.
  • Schema exploration: "what tables are there", "what columns does X have".
  • Writing/running T-SQL, or setting up/troubleshooting this MCP server.

What the server exposes

  • Resources: one per table, mssql://<table>/data (reads first 100 rows as CSV).
  • Tool: query in read-only mode (default; SELECT/WITH only). When MSSQL_ALLOW_WRITES=true the tool is execute_sql and accepts any statement. MSSQL_COMMAND overrides the tool name.

If the server is not configured, follow references/setup.md. Env vars are in references/env-vars.md.

Safe workflow

  1. List tables (list resources, or SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES).
  2. Inspect schema before querying: SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'X'.
  3. Read with limits: always SELECT TOP (100) ... (or OFFSET/FETCH), name columns instead of * on wide tables, filter on indexed columns, avoid unbounded joins on large tables.
  4. Writes: never run INSERT/UPDATE/DELETE/DDL without showing the exact statement and getting explicit user confirmation. Prefer a SELECT COUNT(*) with the same WHERE first to show impact. Wrap in BEGIN TRAN ... when possible. Leave read-only mode on unless the user deliberately enables writes.
  5. Parameter safety: the tool takes raw SQL. Never paste untrusted user text directly into SQL; validate identifiers against INFORMATION_SCHEMA, quote with QUOTENAME, escape string literals (' -> ''), and reject stacked statements.

Credentials

  • Use a dedicated least-privilege login (e.g. db_datareader), never sa.
  • Keep passwords in env/config, never echo them back or put them in queries or files you commit.

Read the full file on GitHub · 34 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 34 lines · 70 tokens per session scan A d8c252ac1ae6

Subscribe to this mod's changes

mssql-server is a skill published in the GitHub repository RichardHan/mssql_mcp_server (402 stars, last pushed yesterday), licensed MIT. It adds 70 tokens to every session and 598 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-06.

Related

mssql-server compared with skills from other repositories

mssql-server next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mssql-serverRichardHan/mssql_mcp_serverSkill402yesterdayMITA70Claude Code, Codex
create-prprisma/ormSkill48kyesterdayApache-2.0A48Claude Code, Codex
schema-explorationlangchain-ai/deepagentsSkill31kyesterdayMITA57Claude Code, Codex
atlas-mssqlariga/atlasSkill8.8kyesterdayApache-2.0A163Claude Code
ha-data-storesshiwenwen/hope-agentSkill1.9kyesterdayMITA115Claude Code, Codex
nornicdb-cypher-queriesorneryd/NornicDBSkill923todayMITA79Claude Code, Codex
volcengine-rds-postgresqlbytedance/agentkit-samplesSkill484todayApache-2.0A63Claude Code, Codex