Back to Home
jpcanter icon

sql-server-mcp

Verified Safe

by jpcanter

Overview

Manages and interacts with Microsoft SQL Server databases through a Model Context Protocol (MCP) server, offering tools for database object discovery, schema inspection, safe write operations, and a full stored procedure lifecycle management with versioning.

Installation

Run Command
npm start

Environment Variables

  • DB_SERVER
  • DB_DATABASE
  • DB_USER
  • DB_PASSWORD
  • DB_TRUST_SERVER_CERTIFICATE
  • ENABLE_WRITE_OPERATIONS
  • ENABLE_SP_MODIFICATIONS
  • DRAFT_SCHEMA

Security Notes

The server implements robust security measures including: comprehensive SQL validation to block dangerous keywords (e.g., DROP DATABASE, xp_cmdshell) and suspicious patterns (e.g., SQL injection attempts); enforcement of parameterized queries; configurable maximum rows affected limits for write operations; explicit transaction management with timeouts and auto-rollback; separate read-only and read-write connection pools; and comprehensive audit logging for all operations. While string manipulation is used for stored procedure (SP) schema/name rewriting during draft management, it's applied after validation and is highly specific, mitigating broader injection risks. The test environment uses a hardcoded SA password, but the production server correctly relies on environment variables.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassLow
Avg Tokens1000
Stars0
Forks1
Last Update2025-11-20

Tags

database-managementsql-servermcp-serverdeveloper-toolssecurity