AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Sqlserver Mcp

mcp-chrismannina-sqlserver-mcp · by chrismannina

MCP server for Microsoft SQL Server — schema discovery, queries, and stored procedures via pyodbc

No reviews yet
0 installs
21 views
0.0% view→install

Install

$ agentstack add mcp-chrismannina-sqlserver-mcp

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-chrismannina-sqlserver-mcp)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Sqlserver Mcp? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

sqlserver-mcp

MCP (Model Context Protocol) server for Microsoft SQL Server using pyodbc.

Features

  • 12 tools for database exploration and querying
  • Windows and SQL Server authentication
  • Connection pooling with health checks
  • Query timeout and row limits
  • Structured error handling

Installation

From GitHub

uv pip install git+https://github.com/chrismannina/sqlserver-mcp.git --system

From source (for development)

git clone git@github.com:chrismannina/sqlserver-mcp.git
cd sqlserver-mcp
uv pip install -e ".[dev]" --system

Configuration

Environment Variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | MSSQL_SERVER | Yes | - | SQL Server hostname or IP address | | MSSQL_DATABASE | Yes | - | Database name | | MSSQL_WINDOWS_AUTH | No | false | Set to true for Windows authentication | | MSSQL_USER | Conditional | - | Username (required if not using Windows auth) | | MSSQL_PASSWORD | Conditional | - | Password (required if not using Windows auth) | | MSSQL_DRIVER | No | auto | ODBC driver name (auto-detected if not set) | | MSSQL_QUERY_TIMEOUT | No | 30 | Query timeout in seconds | | MSSQL_MAX_ROWS | No | 1000 | Default max rows returned by queries | | MSSQL_DEBUG | No | false | Enable debug logging to stderr |

Connection Security

All connections use:

  • Encrypt=yes - Encrypted connections
  • TrustServerCertificate=yes - Trust the server certificate

Usage

With Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "mssql": {
      "command": "sqlserver-mcp",
      "env": {
        "MSSQL_SERVER": "your-server",
        "MSSQL_DATABASE": "your-database",
        "MSSQL_USER": "your-user",
        "MSSQL_PASSWORD": "your-password"
      }
    }
  }
}

With Claude Code

Add to ~/.claude/settings.json or project .claude/settings.json:

{
  "mcpServers": {
    "mssql": {
      "command": "sqlserver-mcp",
      "env": {
        "MSSQL_SERVER": "your-server",
        "MSSQL_DATABASE": "your-database",
        "MSSQL_USER": "your-user",
        "MSSQL_PASSWORD": "your-password"
      }
    }
  }
}

With OpenCode

Add an mcp section to opencode.json or ~/.config/opencode/config.json:

{
  "mcp": {
    "mydb": {
      "type": "local",
      "command": ["sqlserver-mcp"],
      "enabled": true,
      "environment": {
        "MSSQL_SERVER": "your-server",
        "MSSQL_DATABASE": "your-database",
        "MSSQL_USER": "{env:MSSQL_USER}",
        "MSSQL_PASSWORD": "{env:MSSQL_PASSWORD}"
      }
    }
  }
}

Running Directly

MSSQL_SERVER=your-server MSSQL_DATABASE=your-db MSSQL_USER=user MSSQL_PASSWORD=pass sqlserver-mcp

Tools

Discovery

  • list_schemas - List all schemas
  • list_tables - List tables (optionally by schema, with row counts)
  • list_views - List views (optionally by schema)
  • list_procedures - List stored procedures

Description

  • describe_table - Table structure (columns, PKs, FKs, indexes)
  • describe_procedure - Procedure details (parameters, definition)

Search

  • search_tables - Find tables/views by pattern (% wildcards)
  • search_columns - Find columns across tables by pattern

Data

  • gettablesample - Sample rows (max 100)
  • gettablestats - Row count, space usage, dates
  • query - Execute SQL with parameterized queries and row limits
  • execute_procedure - Run stored procedures with parameters

Development

uv run --extra dev pytest -v

Requirements

  • Python 3.10+
  • ODBC Driver for SQL Server (17 or 18 recommended)

Installing ODBC Driver

Linux (Ubuntu/Debian):

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18

macOS:

brew install microsoft/mssql-release/msodbcsql18

Windows: Download from Microsoft

License

MIT

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.