MSSQL MCP Reader
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MSSQL MCP Reader list all tables in dbo schema"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MSSQL MCP Reader
Read-only Model Context Protocol server for Microsoft SQL Server.
Safe schema discovery, profiling, and querying with zero risk of data modification. Ideal for analysts, auditors, and anyone who needs database exploration without write access.
Architecture
This package is a thin wrapper around @connorbritain/mssql-mcp-core, which contains all shared logic, tools, and governance features. The wrapper selects the "reader" tier and delegates to the core's startMcpServer() function. This design enables:
Hard separation at the package level — regulated enterprises can guarantee that certain builds physically cannot perform destructive operations
Independent versioning — each tier can be published separately with its own release cycle
Clear audit trail —
"we only allow mssql-mcp-reader in prod"is a compile-time guarantee
The core library handles all SQL Server connections, tool dispatch, audit logging, and governance enforcement.
Related MCP server: mcp-sqlserver-readonly
Package Tiers
Package | npm | Tools | Use Case |
mssql-mcp-reader (this) |
| 14 read-only | Analysts, auditors, safe exploration |
| 17 (reader + data ops) | Data engineers, ETL developers | |
| 20 (all tools) | DBAs, full admin access |
Config Builder — Visual wizard to generate your mcp_config.json and environments.json files.
Tools Included
Category | Tools |
Discovery |
|
Profiling |
|
Querying |
|
Scripts |
|
Operations |
|
Not included: insert_data, update_data, delete_data, create_table, create_index, drop_table
Quick Start
Install
npm install -g @connorbritain/mssql-mcp-reader@latestMCP Client Configuration
{
"mcpServers": {
"mssql": {
"command": "npx",
"args": ["@connorbritain/mssql-mcp-reader@latest"],
"env": {
"SERVER_NAME": "127.0.0.1",
"DATABASE_NAME": "mydb",
"SQL_AUTH_MODE": "sql",
"SQL_USERNAME": "readonly_user",
"SQL_PASSWORD": "YourPassword123"
}
}
}
}Configuration
Variable | Required | Notes |
| Yes | SQL Server hostname/IP |
| Yes | Target database |
|
| |
| Required for | |
| Path to multi-environment JSON config | |
| Path to named SQL scripts directory | |
| Custom audit log path |
Features
All packages in the MSSQL MCP family share:
Multi-environment support - Named database environments (prod, staging, dev) with per-environment policies
Governance controls -
allowedTools,deniedTools,allowedSchemas,deniedSchemas,requireApprovalAudit logging - JSON Lines logs with session IDs and auto-redaction
Secret management -
${secret:NAME}placeholders for secure credential handlingNamed SQL scripts - Pre-approved parameterized queries with governance controls
Documentation
Full documentation, configuration examples, and governance details are available in the main repository:
MSSQL MCP Server Documentation
License
MIT License. See LICENSE for details.
Repository: https://github.com/ConnorBritain/mssql-mcp-reader Issues: https://github.com/ConnorBritain/mssql-mcp-reader/issues npm: https://www.npmjs.com/package/@connorbritain/mssql-mcp-reader
Available Tools
14 toolsdescribe_tableB
Describes the schema (columns and types) of a specified MSSQL Database table. For server-level access environments, you can specify a database to target.
Inputs: tableName (required), database, environment.
explain_queryA
Generates an estimated execution plan (SHOWPLAN_XML) for a SQL query without executing it.
Inputs: query (required), environment, includePlanXml.
inspect_dependenciesA
Shows what database objects depend on a table, view, or other object. Use for impact analysis before schema changes.
Inputs: objectName (required), includeColumns, environment.
inspect_relationshipsA
Describes inbound and outbound foreign-key relationships for a given table, including column mappings and referential actions.
Inputs: tableName (required), schemaName, includeOutbound, includeInbound, +1 more.
list_databasesA
Lists databases on the SQL Server instance. Requires server-level access. Filtered by environment policies.
Inputs: environment, includeSystemDbs, stateFilter.
list_environmentsA
Lists all configured database environments available for connection. Shows environment names, descriptions, access levels, and policy restrictions. Use this to discover which environments are available before running queries.
Inputs: includeDetails.
list_scriptsB
Lists available named SQL scripts. Scripts are pre-approved SQL templates that can be executed with parameters.
Inputs: environment, tier.
list_tablesA
Lists tables in an MSSQL Database, optionally filtered by schema. For server-level access environments, you can specify a database to list tables from.
Inputs: database, schemas, environment.
profile_tableA
Profiles a table by analyzing column statistics, data distributions, and sample records. Returns metadata, cardinality info, null counts, and representative samples for each column.
Inputs: tableName (required), schemaName, sampleSize, includeSamples, +4 more.
read_dataA
Executes a read-only SELECT query. Auto-limits results if no TOP clause present. Blocks destructive operations.
Inputs: query (required), database, maxRows, environment.
run_scriptA
Executes a named SQL script with parameters. Scripts are pre-approved SQL templates. Use list_scripts to see available scripts.
Inputs: scriptName (required), parameters, preview, confirm, +1 more.
search_schemaC
Searches tables and columns using wildcard patterns to discover schema names.
Inputs: tablePattern, columnPattern, limit, tableLimit, +4 more.
test_connectionC
Tests connectivity to a database environment and returns status, latency, and basic server info.
Inputs: environment, verbose.
validate_environment_configA
Validates the environments.json configuration file for correctness and security best practices.
Checks include:
Required fields (name, server, database for database-level; name, server for server-level)
Valid authentication mode configuration
Policy consistency (e.g., readonly + allowedTools including write tools)
Secret placeholder syntax
Access level configuration validity
Tier designation consistency
Returns validation results for each environment with errors and warnings.
Inputs: environment.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool targets a distinct database operation or analysis aspect. Even closely related tools like profile_table and describe_table serve different purposes (schema vs. statistics). There is no ambiguity between tools.
All tool names follow a consistent verb_noun pattern with lowercase underscores. Verbs are clear and descriptive (list, describe, explain, inspect, profile, etc.), making it easy to predict functionality.
With 14 tools, the server covers a broad but focused range of database read and analysis operations without being overwhelming or sparse. This count is well-suited for a specialized database reader server.
The tool set covers schema discovery, data querying, dependency analysis, and configuration management. However, it lacks tools for listing other database objects like views, stored procedures, or indexes, which may be needed for thorough analysis.
Maintenance
Related MCP Connectors
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that exposes SQL Server metadata and read-only query execution as a structured HTTP API, with safety validation and allowlist policy enforcement.1-
- AlicenseNot gradedqualityDmaintenanceRead-only SQL Server MCP server enabling safe database queries, table listing, and schema inspection with built-in security protections.MIT
- AlicenseNot gradedqualityDmaintenanceRead-only Model Context Protocol server for Microsoft SQL Server. Enables safe schema discovery, profiling, and querying with zero risk of data modification.4 npmMIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server for Microsoft SQL Server and Azure SQL Database with permission-based access modes (read-only, DML, full) and security features like SQL classification and connection locking.716 npmMIT