mssql-mcp-reader
Read-only Model Context Protocol server for Microsoft SQL Server. Enables safe schema discovery, profiling, and querying with zero risk of data modification.
README
MSSQL MCP Reader
Attribution: Fork of ConnorBritain/mssql-mcp-server (MIT). Patched to use
DefaultAzureCredential(withtenantId) instead ofInteractiveBrowserCredential. Patched core (@connorbritain/mssql-mcp-core) is bundled into this package — no upstream registry dependency at install time.
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.
Package Tiers
| Package | npm | Tools | Use Case |
|---|---|---|---|
| mssql-mcp-reader (this) | @connorbritain/mssql-mcp-reader |
14 read-only | Analysts, auditors, safe exploration |
| mssql-mcp-writer | @connorbritain/mssql-mcp-writer |
17 (reader + data ops) | Data engineers, ETL developers |
| mssql-mcp-server | @connorbritain/mssql-mcp-server |
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 | search_schema, describe_table, list_table, list_databases, list_environments |
| Profiling | profile_table, inspect_relationships, inspect_dependencies, explain_query |
| Querying | read_data (SELECT only) |
| Scripts | list_scripts, run_script (readonly scripts only) |
| Operations | test_connection, validate_environment_config |
Not included: insert_data, update_data, delete_data, create_table, create_index, drop_table
Quick Start
Install
npm install -g @connorbritain/mssql-mcp-reader@latest
MCP 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 |
|---|---|---|
SERVER_NAME |
Yes | SQL Server hostname/IP |
DATABASE_NAME |
Yes | Target database |
SQL_AUTH_MODE |
sql, windows, or aad (default: aad) |
|
SQL_USERNAME / SQL_PASSWORD |
Required for sql/windows modes |
|
ENVIRONMENTS_CONFIG_PATH |
Path to multi-environment JSON config | |
SCRIPTS_PATH |
Path to named SQL scripts directory | |
AUDIT_LOG_PATH |
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,requireApproval - Audit logging - JSON Lines logs with session IDs and auto-redaction
- Secret management -
${secret:NAME}placeholders for secure credential handling - Named 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。