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

An MCP server that lets LLMs execute SQL queries and stored procedures, inspect schemas, and access database metadata as resources.
SQL Server MCP server for querying and inspecting databases is cataloged as an MCP server attributed to popplywop. An MCP server that lets LLMs execute SQL queries and stored procedures, inspect schemas, and access database metadata as resources. 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.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for SQL Server MCP server for querying and inspecting databases 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.
Yes, running with the read-only option blocks INSERT, UPDATE, DELETE and similar operations.
View and procedure definitions are excluded by default to reduce token usage, and are only returned through the definition endpoints.
Yes, the env-var option specifies the name of an environment variable containing the connection string.
README.md · a1a72a83b549 · 采集于 2026-11-13 12:40:27 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A Model Context Protocol (MCP) server that provides tools for interacting with SQL Server databases. This server allows Large Language Models (LLMs) to query and inspect SQL Server databases through a standardized protocol.
Run the server using Docker without installing .NET:
# Build the image
docker build -t tsql-mcp-server .
# Run with connection string
docker run -i tsql-mcp-server --dsn "Server=host.docker.internal;Database=mydb;User Id=sa;Password=mypassword;TrustServerCertificate=True;"
# Run in read-only mode
docker run -i tsql-mcp-server --dsn "..." --read-only
# Run with environment variable
docker run -i -e SQL_CONNECTION="Server=..." tsql-mcp-server --env-var SQL_CONNECTION
Notes:
-i flag is required for stdio transporthost.docker.internal to connect to SQL Server on your host machinehost.docker.internal doesn't resolve, use --network host and localhost insteadInstall globally as a .NET tool:
dotnet tool install --global tsql-mcp-server
To update to the latest version:
dotnet tool update --global tsql-mcp-server
# Clone the repository
git clone https://github.com/Popplywop/tsql-mcp-server
cd tsql-mcp-server
# Build the project
dotnet build
If installed as a .NET global tool:
# Using a direct connection string
tsql-mcp-server --dsn "Server=your-server;Database=your-database;User Id=your-username;Password=your-password;TrustServerCertificate=True;"
# Using an environment variable
tsql-mcp-server --env-var "SQL_CONNECTION_STRING"
If building from source:
# Using a direct connection string
dotnet run --dsn "Server=your-server;Database=your-database;User Id=your-username;Password=your-password;TrustServerCertificate=True;"
# Using an environment variable
dotnet run --env-var "SQL_CONNECTION_STRING"
To use this server with Claude or other LLMs that support the Model Context Protocol, you'll need to configure it in your MCP configuration file.
{
"servers": [
{
"name": "SqlServerMcp",
"command": "tsql-mcp-server",
"args": [
"--dsn",
"Server=your-server;Database=your-database;User Id=your-username;Password=your-password;TrustServerCertificate=True;"
]
}
]
}
{
"servers": [
{
"name": "SqlServerMcp",
"command": "path/to/tsql-mcp-server.exe",
"args": [
"--dsn",
"Server=your-server;Database=your-database;User Id=your-username;Password=your-password;TrustServerCertificate=True;"
]
}
]
}
Replace the connection string with your actual values. This configuration can be used with Claude's MCP integration or other LLM platforms that support the Model Context Protocol.
{
"mcpServers": {
"sqlserver": {
"command": "docker",
"args": [
"run", "-i", "--rm", "tsql-mcp-server",
"--dsn", "Server=host.docker.internal;Database=your-database;User Id=your-username;Password=your-password;TrustServerCertificate=True;"
]
}
}
}
For read-only mode, add "--read-only" to the args array.
For better security, you can use environment variables for your connection string:
{
"servers": [
{
"name": "SqlServerMcp",
"command": "tsql-mcp-server",
"args": [
"--env-var",
"SQL_CONNECTION_STRING"
]
}
]
}
| Option | Short | Description |
|---|---|---|
--dsn | -d | SQL Server connection string |
--env-var | -e | Environment variable name containing the connection string |
--read-only | -r | Run in read-only mode (blocks INSERT, UPDATE, DELETE, etc.) |
ExecuteQuery: Executes a SQL query against the database and returns the results
query: The SQL query to executecommandTimeout: Optional command timeout in secondsmaxRows: Optional maximum number of rows to returnExecuteStoredProcedure: Executes a stored procedure with optional parameters
schema: The schema name (e.g., 'dbo')procedureName: The stored procedure nameparametersJson: Optional JSON object of parameters (e.g., {"@param1": "value"})commandTimeout: Optional command timeout in secondsmaxRows: Optional maximum number of rows to returnLightweight tools for exploring database structure without fetching data:
The server provides database schema information through a resource-based approach. Resources are accessed via URIs and are lazy-loaded with caching for improved performance.
| Resource URI | Description | Loading Behavior |
|---|---|---|
sqlserver://schemas/{schema_name} | Information about a specific schema | Loaded on first request, cached for 10 minutes |
sqlserver://schemas/{schema_name}/tables | List of tables in a schema | Loaded on first request, cached for 10 minutes |
sqlserver://schemas/{schema_name}/views | List of views in a schema | Loaded on first request, cached for 10 minutes |
sqlserver://schemas/{schema_name}/procedures | List of stored procedures in a schema | Loaded on first request, cached for 10 minutes |
sqlserver://schemas/{schema_name}/tables/{table_name} | Detailed information about a specific table | Loaded on first request, cached for 10 minutes |
sqlserver://schemas/{schema_name}/views/{view_name} | View columns (definition excluded) | Loaded on first request, cached for 10 minutes |
sqlserver://schemas/{schema_name}/views/{view_name}/definition | View SQL definition | Loaded on request |
sqlserver://schemas/{schema_name}/procedures/{procedure_name} | Procedure parameters (definition excluded) | Loaded on first request, cached for 10 minutes |
sqlserver://schemas/{schema_name}/procedures/{procedure_name}/definition | Procedure SQL definition | Loaded on request |
Note: View and procedure definitions are excluded by default to reduce token usage. Use the /definition endpoint when you need the SQL source code.
Resources are automatically discovered by the MCP client and can be accessed directly without requiring specific tool calls.
ExecuteQuery:
query: "SELECT TOP 10 * FROM MyTable"
maxRows: 100
Resources can be accessed directly via their URIs:
# List all schemas
GET sqlserver://schemas
# Get information about a specific schema
GET sqlserver://schemas/dbo
# List all tables in a schema
GET sqlserver://schemas/dbo/tables
# Get detailed information about a specific table
GET sqlserver://schemas/dbo/tables/Customers
The resource-based approach provides a RESTful way to explore and interact with the database schema.
This project is licensed under the MIT License - see the LICENSE.md file for details.
The MIT License is a permissive license that allows for reuse with minimal restrictions. It permits anyone to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software, subject to the condition that the original copyright notice and permission notice appear in all copies.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for SQL Server MCP server for querying and inspecting databases from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mssql-mcp-server-popplywop)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

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

A Model Context Protocol server that lets AI assistants run SQL queries against AWS Athena databases and retrieve results.

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