📊
Mssql Read Only MCP
A lightweight, read-only MSSQL MCP server
0 installs
Trust: 34 — Low
Data
Ask AI about Mssql Read Only MCP
Powered by Claude · Grounded in docs
I know everything about Mssql Read Only MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
MSSQL Read-Only MCP Server
A lightweight, read-only MSSQL MCP server.
Features
- Read-Only by Design - Safe database querying with no write operations
- Single File Implementation - All code in one easy-to-understand file (~240 lines)
- Three Essential Tools - List tables, describe structure, query data
Installation
Option 1: Using npx (Recommended)
No installation required! Use npx to run the server directly:
With Claude Code CLI
claude mcp add-json mssql-read-only-mcp '{"type":"stdio","command":"npx","args":["-y","mssql-read-only-mcp"],"env":{"SERVER_NAME":"your-server.database.windows.net","DATABASE_NAME":"YourDatabase","SQL_USER":"username","SQL_PASSWORD":"password","SQL_PORT":"1433","TRUST_SERVER_CERTIFICATE":"false"}}'
With Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mssql-read-only": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mssql-read-only-mcp"],
"env": {
"SERVER_NAME": "your-server.database.windows.net",
"DATABASE_NAME": "YourDatabase",
"SQL_USER": "username",
"SQL_PASSWORD": "password",
"SQL_PORT": "1433",
"TRUST_SERVER_CERTIFICATE": "false"
}
}
}
}
Windows users: On native Windows (not WSL), use:
{
"mcpServers": {
"mssql-read-only": {
"type": "stdio",
"command": "cmd",
"args": ["/c", "npx", "-y", "mssql-read-only-mcp"],
"env": {
"SERVER_NAME": "your-server.database.windows.net",
"DATABASE_NAME": "YourDatabase",
"SQL_USER": "username",
"SQL_PASSWORD": "password"
}
}
}
}
Option 2: Local Development
For local development or modifications:
git clone <repository-url>
cd mssql-read-only-mcp
npm install
npm run build
Then configure with the local path:
claude mcp add-json mssql-read-only-mcp '{"type":"stdio","command":"node","args":["/path/to/mssql-read-only-mcp/dist/index.js"],"env":{"SERVER_NAME":"your-server.database.windows.net","DATABASE_NAME":"YourDatabase","SQL_USER":"username","SQL_PASSWORD":"password","SQL_PORT":"1433","TRUST_SERVER_CERTIFICATE":"false"}}'
Configuration
Required environment variables:
SERVER_NAME- MSSQL server hostnameDATABASE_NAME- Database nameSQL_USER- SQL authentication usernameSQL_PASSWORD- SQL authentication password
Optional environment variables:
SQL_PORT- Port number (default: 1433)TRUST_SERVER_CERTIFICATE- Set to "true" to trust self-signed certs (default: false)CONNECTION_TIMEOUT- Connection timeout in seconds (default: 30)
Available Tools
list_table- List all tables in the database (with optional schema filter)describe_table- Show table structure (columns and types)read_data- Execute SELECT queries
License
MIT
