MCP SQL Server

MCP SQL Server

mcp-server-sql-mkhan997733•bymkhan997733

A Model Context Protocol server that lets AI assistants like Claude securely interact with SQL Server databases through local connections for exploration and query execution.

License: Not specified•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Connects to SQL Server using SQL Authentication and only accepts connections to localhost.
  • •Explores database schema, discovering tables, columns, and relationships.
  • •Executes SQL queries with error handling and protections against harmful operations.
  • •Exposes tools including discover_tables, table_details, execute_query, get_stored_procedures, get_table_indexes, and get_table_constraints.

BEST FOR

  • •Asking questions about which tables exist in a database.
  • •Viewing the schema of a specific table such as Users or Products.
  • •Querying data, such as finding the top customers by total purchase amount.

ABOUT MCP-SERVER-SQL-MKHAN997733

MCP SQL Server is cataloged as an MCP server attributed to mkhan997733. A Model Context Protocol server that lets AI assistants like Claude securely interact with SQL Server databases through local connections for exploration and query execution. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP SQL Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the server protect against harmful database operations?

It includes built-in safety controls, and the execute_query tool runs SELECT queries read-only by default.

What connection security restrictions does the server enforce?

The server only accepts connections to localhost and connects using SQL Authentication.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 2589b0a2d815 · 采集于 2026-11-13 13:10:04 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MCP SQL Server

A Model Context Protocol (MCP) server that enables AI assistants like Claude to securely interact with SQL Server databases through local connections. This server provides tools for database exploration, query execution, and data analysis through a controlled interface.

Features

  • 🔒 Secure Local Database Access: Connect to SQL Server using SQL Authentication
  • 🔍 Schema Exploration: Discover tables, columns, and relationships
  • 📊 Query Execution: Run SQL queries with proper error handling
  • 🛡️ Safety Controls: Built-in protections against harmful operations

Prerequisites

  • Node.js 18.0 or higher
  • npm (Node package manager)
  • SQL Server
  • Claude Desktop application

Installation

1. Clone the Repository

git clone https://github.com/MKhan997733/mcp-server-sql.git
cd mcp-server-sql

2. Install Dependencies

npm install

3. Configure Environment Variables

Create a .env file in the project root:

DB_SERVER=
DB_NAME=
DB_USER=
DB_PASSWORD=
DB_PORT=

Claude Desktop Configuration

1. Locate Claude Desktop Config File

The configuration file is located at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add MCP Server Configuration

Edit the claude_desktop_config.json file and add your MCP server:

For SQL Authentication:

{
  "mcpServers": {
    "sql-server": {
      "command": "node",
      "args": [
        "/absolute/path/to/mcp-server-sql/index.js"
      ],
      "env": {
        "DB_SERVER": "localhost",
        "DB_NAME": "your_database",
        "DB_USER": "your_username",
        "DB_PASSWORD": "your_password",
        "DB_PORT": "port"
      }
    }
  }
}

Important: Replace /absolute/path/to/mcp-server-sql/ with the actual path to your cloned repository.

3. Restart Claude Desktop

After saving the configuration file, restart Claude Desktop for the changes to take effect.

Usage

Once configured, you can interact with your SQL Server database through Claude by asking questions like:

  • "What tables are in my database?"
  • "Show me the schema of the Users table"
  • "Query the Orders table and show me orders from the last week"
  • "Find the top 10 customers by total purchase amount"
  • "Show me all stored procedures in the database"

Example Interactions

Discovering Tables:

You: Can you show me what tables exist in my database?
Claude: I'll help you discover the tables in your SQL Server database...

Querying Data:

You: Show me all customers who made purchases over $1000 in the last month
Claude: I'll query your database to find customers with purchases over $1000...

Schema Exploration:

You: What columns does the Products table have?
Claude: Let me examine the structure of the Products table...

Available Tools

The MCP server provides these tools to Claude:

  1. discover_tables: List all tables in the SQL Server database
  2. table_details: Get detailed schema information for a specific table
  3. execute_query: Run SELECT queries (read-only by default)
  4. get_stored_procedures: List all stored procedures
  5. get_table_indexes: View indexes on tables
  6. get_table_constraints: View constraints (PK, FK, etc.)

Security Best Practices

  1. Use Dedicated SQL Server Login: Create a specific login for the MCP server with minimal required permissions
  2. Read-Only Access: Configure the database user with read-only access
  3. Local Connections Only: Server only accepts connections to localhost
  4. Audit Logging: Enable SQL Server audit logging to track all queries

Running the Server

# Run directly

npm build

node <absolute-path>/build/index.js

(AI GENERATED, REVIEWED BY MKHAN997733)

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP SQL Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-server-sql-mkhan997733)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage