mcp-mssql-server
Enables Claude Code and other MCP clients to interact with Microsoft SQL Server databases through standardized tools for query execution, schema exploration, table management, and stored procedure execution.
README
MCP MSSQL Server
An MCP (Model Context Protocol) server for Microsoft SQL Server integration built with NestJS. This server enables Claude Code and other MCP clients to interact with SQL Server databases through standardized tools.
Features
- MCP Protocol Support: Full implementation of Model Context Protocol for SQL Server operations
- Windows Authentication: Supports both Windows (NTLM) and SQL Server authentication
- Comprehensive SQL Tools: Execute queries, explore schema, manage tables, and run stored procedures
- Health Monitoring: Built-in health checks for database connectivity
- Connection Pooling: Efficient database connection management
MCP Tools
The server exposes these SQL operations as MCP tools:
execute-query: Execute SQL queries with parameter supportget-schema: Retrieve database schema informationlist-tables: List all tables in the databasedescribe-table: Get detailed table structure with constraintsget-table-data: Retrieve paginated table data with filteringexecute-procedure: Execute stored procedures with parameters
Installation
npm install
Configuration
Create a .env file with your database configuration:
# SQL Server Connection
MSSQL_HOST=localhost
MSSQL_PORT=1433
MSSQL_DATABASE=your_database
# Authentication Mode (choose one)
# For SQL Server Authentication:
MSSQL_USERNAME=your_username
MSSQL_PASSWORD=your_password
# For Windows Authentication:
MSSQL_WIN_AUTH=true
MSSQL_DOMAIN=your_domain
MSSQL_USERNAME=domain\username
MSSQL_PASSWORD=your_password
# Connection Options
MSSQL_ENCRYPT=true
MSSQL_TRUST_CERT=true
# Server Port
PORT=3000
Development
# Start in development mode
npm run start:dev
# Start with debugging
npm run start:debug
# Build the application
npm run build
# Start production build
npm run start:prod
Testing
# Unit tests
npm run test
# Watch mode
npm run test:watch
# End-to-end tests
npm run test:e2e
# Test coverage
npm run test:cov
Code Quality
# Run ESLint with auto-fix
npm run lint
# Format code with Prettier
npm run format
MCP Endpoints
When the server is running (default port 3000):
- MCP Protocol:
http://localhost:3000/mssql/mcp - SSE (Claude Code):
http://localhost:3000/mssql/sse - Health Check:
http://localhost:3000/mssql/health
Usage with Claude Code
- Start the MCP server:
npm run start:dev - Configure Claude Code to connect to:
http://localhost:3000/mssql/mcp - Use the exposed SQL tools through Claude Code's MCP interface
Architecture
- MCPModule: Handles MCP protocol implementation with
/mssqlnamespace - DatabaseModule: Manages SQL Server connectivity and authentication
- HealthModule: Provides database health monitoring
- No REST endpoints: All functionality exposed through MCP tools only
License
ISC
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.