mssql-mcpSAFE
MCP server for Microsoft SQL Server — query, schema, and stored-procedure access for Claude Desktop, Cursor, Windsurf, and VS Code.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
🚀 Model Context Protocol (MCP) server for Microsoft SQL Server - compatible with Claude Desktop, Cursor, Windsurf and VS Code.
[](https://github.com/BYMCS/mssql-mcp/actions/workflows/ci.yml) [](https://www.npmjs.com/package/mssql-mcp) [](LICENSE)
Standards Alignment
- Protocol target: MCP draft/latest spec
- Transport spec: Transports
- Security: Security best practices
- SDK:
@modelcontextprotocol/server/@modelcontextprotocol/client/@modelcontextprotocol/nodev2 (2.0.0), targeting the 2026-07-28 MCP spec - Requires Node.js >= 20
🚀 Quick Start
1. Install
npm install -g mssql-mcp
2. Configure IDE
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"mssql": {
"command": "npx",
"args": ["-y", "mssql-mcp@latest"],
"env": {
"DB_SERVER": "your-server.com",
"DB_DATABASE": "your-database",
"DB_USER": "your-username",
"DB_PASSWORD": "your-password",
"DB_ENCRYPT": "true",
"DB_TRUST_SERVER_CERTIFICATE": "true"
}
}
}
}Cursor/Windsurf/VS Code (.vscode/mcp.json):
{
"servers": {
"mssql": {
"command": "npx",
"args": ["-y", "mssql-mcp@latest"],
"env": {
"DB_SERVER": "your-server.com",
"DB_DATABASE": "your-database",
"DB_USER": "your-username",
"DB_PASSWORD": "your-password",
"DB_ENCRYPT": "true",
"DB_TRUST_SERVER_CERTIFICATE": "true"
}
}
}
}HTTP transport (remote/
886e1715e845OBSERVED · 2026-10-14Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add mssql-mcp --env DB_PASSWORD=${DB_PASSWORD} -- npx -y [email protected]{
"mcpServers": {
"mssql-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"DB_PASSWORD": "${DB_PASSWORD}"
}
}
}
}Exposed tools (14)
10 read · 4 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
mssql_connect_database | read | |
mssql_connection_status | read | |
mssql_describe_table | read | |
mssql_describe_table_columns | read | |
mssql_disconnect_database | read | |
mssql_execute_procedure | write | |
mssql_execute_query | write | |
mssql_execute_stored_procedure | write | |
mssql_get_schema | read | |
mssql_get_table_data | read | |
mssql_list_databases | read | |
mssql_list_schema_objects | read | |
mssql_read_table_rows | read | |
mssql_run_sql_query | write |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (7)
import { createServer } from "../../src/server.js";import { disconnectPool } from "../../src/db/connection.js";import { ConfigSchema, loadHttpConfig, loadConfigFromEnv } from "../../src/config.js";import { McpToolError, toActionableError, toolError, formatFatalError } from "../../src/utils/errors.js";import { formatDisplayValue, normalizeOutput } from "../../src/utils/format.js";"url": "http://127.0.0.1:3001",
dotenv, mssql, zod, @types/mssql, @types/node, cross-env, rimraf, typescript
Gates applied: no_behavioural_pass.
886e1715e845full audit observations/trust-audit/mcp-server/bymcs__mssql-mcp.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-14 | 886e1715e845 | SAFE | B | 89 | first audit |
Questions
What is the mssql-mcp MCP server?
MCP server for Microsoft SQL Server — query, schema, and stored-procedure access for Claude Desktop, Cursor, Windsurf, and VS Code.
What tools does mssql-mcp expose?
14 in total: 10 read-only, 4 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is mssql-mcp safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does mssql-mcp need?
It reads DB_PASSWORD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does mssql-mcp run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as mssql-mcp at 3.0.0.
How current is this page?
The grade is for one exact copy of the source (886e1715e845), read on 2026-10-14. The repository is watched and re-audited when it changes.