mcpField
M
MCP MSSQL Server

MCP MSSQL Server

Local
github.com/blueshiftlabs-aiDatabases1Updated 73w ago

About MCP MSSQL Server

MCP MSSQL Server is a NestJS server for connecting SQL Server databases to Claude Code and other MCP clients. It exposes query, schema, table, and stored-procedure operations, with Windows and SQL Server authentication options.

Key features

  1. 01Execute parameterized SQL queries
  2. 02Inspect schemas and table structures
  3. 03List tables and retrieve filtered data
  4. 04Run stored procedures with parameters
  5. 05Support Windows and SQL Server authentication
  6. 06Monitor connectivity and pool connections

Use cases

  1. 01Query a SQL Server database from an MCP client
  2. 02Review tables, schemas, and constraints
  3. 03Retrieve filtered, paginated table data
  4. 04Run database stored procedures

MCP support

Exposes SQL Server operations as MCP tools, including query execution, schema inspection, table access, and stored-procedure execution. Provides MCP and SSE endpoints for clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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 support
  • get-schema: Retrieve database schema information
  • list-tables: List all tables in the database
  • describe-table: Get detailed table structure with constraints
  • get-table-data: Retrieve paginated table data with filtering
  • execute-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

  1. Start the MCP server: npm run start:dev
  2. Configure Claude Code to connect to: http://localhost:3000/mssql/mcp
  3. Use the exposed SQL tools through Claude Code's MCP interface

Architecture

  • MCPModule: Handles MCP protocol implementation with /mssql namespace
  • DatabaseModule: Manages SQL Server connectivity and authentication
  • HealthModule: Provides database health monitoring
  • No REST endpoints: All functionality exposed through MCP tools only

License

ISC

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.