MCP Marketplace
BrowseHow It WorksFor CreatorsDocs
Sign inSign up
MCP Marketplace

The curated, security-first marketplace for AI tools.

Product

Browse ToolsSubmit a ToolDocumentationHow It WorksBlogFAQChangelog

Legal

Terms of ServicePrivacy PolicyCommunity Guidelines

Connect

support@mcp-marketplace.ioTwitter / XDiscord

MCP Marketplace ยฉ 2026. All rights reserved.

Back to Browse

SQL MCP Mac Windows MCP Server

by TharanaBope
Developer ToolsUse Caution4.2MCP RegistryLocal
Free

Server data from the Official MCP Registry

SQL Server MCP with RAG capabilities for Windows (native ODBC support)

About

SQL Server MCP with RAG capabilities for Windows (native ODBC support)

Security Report

4.2
Use Caution4.2High Risk

This SQL Server MCP server has solid security fundamentals with read-only query enforcement, input validation via Zod, and a default-deny database access pattern. However, there are several concerns: plaintext password handling in environment variables without explicit warnings, missing HTTPS/TLS enforcement for connections, incomplete query sanitization despite claims, and insufficient documentation on securing credentials in production. The permissions (network_http, env_vars, database) are appropriate for the stated purpose. Supply chain analysis found 2 known vulnerabilities in dependencies (0 critical, 2 high severity). Package verification found 1 issue (1 critical, 0 high severity).

6 files analyzed ยท 11 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

env_vars

Check that this permission is expected for this type of plugin.

HTTP Network Access

Connects to external APIs or services over the internet.

database

Check that this permission is expected for this type of plugin.

process_spawn

Check that this permission is expected for this type of plugin.

Unverified package source

We couldn't verify that the installable package matches the reviewed source code. Proceed with caution.

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-tharanabope-sql-server-mcp": {
      "args": [
        "-y",
        "@tharanabopearachchi/sql-server-mcp-macos"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

SQL Server MCP - Cross-Platform Database Integration for AI

License: MIT TypeScript MCP npm version npm downloads

A Model Context Protocol (MCP) server implementation for SQL Server that enables AI assistants to explore and query SQL Server databases through natural language. Built as a RAG (Retrieval-Augmented Generation) system optimized for database knowledge exploration.

๐ŸŒŸ Features

  • ๐Ÿ” Schema Exploration - List databases, tables, views, stored procedures
  • ๐Ÿ”— Relationship Mapping - Discover foreign key relationships and table dependencies
  • ๐Ÿ”Ž Search & Discovery - Global schema search across tables, columns, procedures
  • โšก Safe Query Execution - Read-only SELECT queries with automatic timeouts and row limits
  • ๐Ÿ—„๏ธ Schema Caching - Fast retrieval with configurable TTL (default: 60 minutes)
  • ๐Ÿ” Security First - Read-only by default, SQL injection prevention, query validation
  • ๐Ÿ–ฅ๏ธ Cross-Platform - Native Windows Authentication & macOS Docker support

๐ŸŽฅ Demo

See SQL Server MCP in action with AI assistant integration:

SQL Server MCP Demo

Note: Watch how natural language queries instantly explore database schemas, find relationships, and retrieve data - all without leaving your AI assistant!

๐Ÿš€ Quick Start

This repository contains two platform-specific implementations:

Windows Version โ†’ sql-server-mcp/

  • โœ… Windows Authentication (ODBC Driver 17)
  • โœ… SQL Server Authentication
  • โœ… Native msnodesqlv8 driver for optimal performance
  • ๐Ÿ“– Windows Setup Guide

macOS Version โ†’ sql-server-mcp-mac/

  • โœ… SQL Server Authentication (Docker required)
  • โœ… Pure JavaScript mssql driver (no native dependencies)
  • ๐Ÿ“– macOS Setup Guide

๐Ÿ“ฆ Installation

๐ŸŽ‰ Now Available on MCP Registry!

This server is officially published in the Model Context Protocol Registry:

  • Windows: io.github.TharanaBope/sql-server-mcp
  • macOS: io.github.TharanaBope/sql-server-mcp-macos

๐Ÿš€ Quick Start (Recommended)

No installation needed! Just add to your AI assistant's configuration:

Claude Desktop (Windows)

Config Location: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "sql-server": {
      "command": "npx",
      "args": ["-y", "@tharanabopearachchi/sql-server-mcp@latest"],
      "env": {
        "SQL_SERVER": "localhost",
        "SQL_DATABASE": "master",
        "SQL_USE_WINDOWS_AUTH": "true"
      }
    }
  }
}
Claude Desktop (macOS)

Config Location: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "sql-server": {
      "command": "npx",
      "args": ["-y", "@tharanabopearachchi/sql-server-mcp-macos@latest"],
      "env": {
        "SQL_SERVER": "localhost",
        "SQL_DATABASE": "master",
        "SQL_USE_WINDOWS_AUTH": "false",
        "SQL_USERNAME": "sa",
        "SQL_PASSWORD": "your_password"
      }
    }
  }
}

Config Location: Varies by platform

  • Windows: %USERPROFILE%\.lmstudio\config.json
  • macOS: ~/.lmstudio/config.json
{
  "mcpServers": {
    "sql-server": {
      "command": "npx",
      "args": ["-y", "@tharanabopearachchi/sql-server-mcp@latest"],
      "env": {
        "SQL_SERVER": "localhost",
        "SQL_DATABASE": "master",
        "SQL_USE_WINDOWS_AUTH": "true",
        "SQL_USERNAME": "",
        "SQL_PASSWORD": ""
      }
    }
  }
}

Config Location: ~/.continue/config.json

{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "@tharanabopearachchi/sql-server-mcp@latest"]
        },
        "env": {
          "SQL_SERVER": "localhost",
          "SQL_DATABASE": "master",
          "SQL_USE_WINDOWS_AUTH": "true"
        }
      }
    ]
  }
}

Config Location: Cursor Settings โ†’ Features โ†’ Model Context Protocol

{
  "mcpServers": {
    "sql-server": {
      "command": "npx",
      "args": ["-y", "@tharanabopearachchi/sql-server-mcp@latest"],
      "env": {
        "SQL_SERVER": "localhost",
        "SQL_DATABASE": "master",
        "SQL_USE_WINDOWS_AUTH": "true"
      }
    }
  }
}

Config Location: VS Code Settings โ†’ Cline โ†’ MCP Settings

{
  "mcpServers": {
    "sql-server": {
      "command": "npx",
      "args": ["-y", "@tharanabopearachchi/sql-server-mcp@latest"],
      "env": {
        "SQL_SERVER": "localhost",
        "SQL_DATABASE": "master",
        "SQL_USE_WINDOWS_AUTH": "true"
      }
    }
  }
}

Restart your AI assistant and you're ready to go!

๐Ÿ› ๏ธ Development Setup

For development or local modifications:

Windows
cd sql-server-mcp
npm install
npm run build

๐Ÿ‘‰ Complete Windows Setup Instructions

macOS
cd sql-server-mcp-mac
npm install
npm run build

๐Ÿ‘‰ Complete macOS Setup Instructions

๐Ÿ› ๏ธ Available MCP Tools

The server provides 12 powerful tools for database exploration:

Schema Exploration

  • list_databases - Discover all available databases
  • list_tables - View tables with row counts
  • describe_table - Get detailed schema (columns, types, constraints, indexes)
  • list_views - List all views
  • list_stored_procedures - List stored procedures with metadata
  • get_procedure_definition - Get full SQL definition
  • get_database_overview - High-level statistics

Relationship Mapping

  • get_table_relationships - Get foreign key relationships (incoming & outgoing)
  • get_related_tables - Find directly connected tables

Search & Discovery

  • search_schema - Search across tables, columns, views, procedures
  • find_column_usage - Find all tables containing a specific column

Query Execution

  • execute_query - Execute read-only SELECT queries safely

๐Ÿ’ฌ Example Usage

Once configured, you can ask your AI assistant:

"What databases are available on this server?"

"Show me all tables in the Sales database"

"What's the schema of the Orders table?"

"Find all tables that reference the Customers table"

"Search for any columns related to 'email'"

"Execute: SELECT TOP 10 * FROM Products ORDER BY Price DESC"

โš™๏ธ Configuration

Both versions use environment variables for configuration:

SQL_SERVER=localhost
SQL_DATABASE=master
SQL_PORT=1433
SQL_USE_WINDOWS_AUTH=true          # Windows only
SQL_USERNAME=                       # For SQL Auth
SQL_PASSWORD=                       # For SQL Auth
QUERY_TIMEOUT=30
MAX_RESULT_ROWS=1000
ENABLE_SCHEMA_CACHE=true
CACHE_TTL_MINUTES=60

See platform-specific READMEs for detailed configuration instructions.

๐Ÿ” Security Features

  • โœ… Read-only by default - Write operations disabled unless explicitly enabled
  • โœ… Query validation - Only SELECT statements allowed by default
  • โœ… Automatic timeouts - Prevents long-running queries
  • โœ… Row limits - Prevents memory exhaustion
  • โœ… SQL injection prevention - Query sanitization and validation
  • โœ… Database whitelisting - Optional restriction to specific databases

๐Ÿ—๏ธ Architecture

MCP/
โ”œโ”€โ”€ sql-server-mcp/              # Windows implementation
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ index.ts             # MCP server entry point
โ”‚   โ”‚   โ”œโ”€โ”€ database/            # Connection, caching, queries
โ”‚   โ”‚   โ”œโ”€โ”€ tools/               # 12 MCP tools
โ”‚   โ”‚   โ””โ”€โ”€ types/               # TypeScript interfaces
โ”‚   โ”œโ”€โ”€ dist/                    # Compiled output
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ README.md                # Windows documentation
โ”‚
โ”œโ”€โ”€ sql-server-mcp-mac/          # macOS implementation
โ”‚   โ”œโ”€โ”€ src/                     # Same structure as Windows
โ”‚   โ””โ”€โ”€ README.md                # macOS documentation
โ”‚
โ”œโ”€โ”€ LICENSE                      # MIT License
โ””โ”€โ”€ README.md                    # This file

๐ŸŽฏ Use Cases

Database Exploration

  • "What tables exist in this database?"
  • "Show me the structure of the Users table"
  • "List all stored procedures"

Schema Research

  • "Find all tables with an 'email' column"
  • "Search for anything related to 'invoice'"
  • "What views are available?"

Relationship Analysis

  • "How are Orders and Customers related?"
  • "Show me all tables that reference Products"
  • "What are the foreign key relationships for this table?"

Data Queries

  • "Get the top 10 most expensive products"
  • "Show me recent orders"
  • "What's the total count of records in each table?"

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Built on Model Context Protocol SDK
  • Uses mssql and msnodesqlv8 drivers
  • Inspired by the need for better AI-database integration

๐Ÿ“š Resources

  • Windows Setup Guide: sql-server-mcp/README.md
  • macOS Setup Guide: sql-server-mcp-mac/README.md
  • Troubleshooting: Check platform-specific TROUBLESHOOTING.md files
  • MCP Documentation: https://github.com/modelcontextprotocol
  • Report Issues: https://github.com/TharanaBope/SQL-MCP-Mac-Windows/issues

๐ŸŒ Platform-Specific Documentation

PlatformDirectoryKey Features
Windowssql-server-mcp/Windows Auth, ODBC Driver, Native performance
macOSsql-server-mcp-mac/Docker SQL Server, Pure JS, No native deps

Made with โค๏ธ for the MCP community

โญ Star this repo if you find it useful! ๐Ÿ› Report bugs via Issues ๐Ÿ’ฌ Questions? Check the Discussions

Reviews

No reviews yet

Be the first to review this server!

0

installs

New

no ratings yet

Is this your server?

Claim ownership to manage your listing, respond to reviews, and track installs from your dashboard.

Claim with GitHub

Sign up with the GitHub account that owns this repo

Links

Source Codenpm Package

Details

Published February 24, 2026
Version 1.0.4
0 installs
Local Plugin

More Developer Tools MCP Servers

Git

Free

by Modelcontextprotocol ยท Developer Tools

Read, search, and manipulate Git repositories programmatically

80.0K
Stars
3
Installs
6.5
Security
No ratings yet
Local

Toleno

Free

by Toleno ยท Developer Tools

Toleno Network MCP Server โ€” Manage your Toleno mining account with Claude AI using natural language.

114
Stars
404
Installs
8.0
Security
4.8
Local

mcp-creator-python

Free

by mcp-marketplace ยท Developer Tools

Create, build, and publish Python MCP servers to PyPI โ€” conversationally.

-
Stars
55
Installs
10.0
Security
5.0
Local

MarkItDown

Free

by Microsoft ยท Content & Media

Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption

89.9K
Stars
15
Installs
6.0
Security
5.0
Local

mcp-creator-typescript

Free

by mcp-marketplace ยท Developer Tools

Scaffold, build, and publish TypeScript MCP servers to npm โ€” conversationally

-
Stars
14
Installs
10.0
Security
5.0
Local

FinAgent

Free

by mcp-marketplace ยท Finance

Free stock data and market news for any MCP-compatible AI assistant.

-
Stars
13
Installs
10.0
Security
No ratings yet
Local