MSSQL MCP Server
Mirror of
MCP-Mirror
README
MSSQL MCP Server
A Model Context Protocol (MCP) server for connecting to Microsoft SQL Server databases. This server provides tools for executing SQL queries and managing database connections.
Installation
npm install mssql-mcp-server
Usage
Add the server to your MCP settings configuration file:
{
"mcpServers": {
"mssql": {
"command": "mssql-mcp-server",
"env": {
"MSSQL_CONNECTION_STRING": "Server=localhost;Database=master;User Id=sa;Password=yourpassword;",
// Or individual connection parameters:
"MSSQL_HOST": "localhost",
"MSSQL_PORT": "1433",
"MSSQL_DATABASE": "master",
"MSSQL_USER": "sa",
"MSSQL_PASSWORD": "yourpassword",
"MSSQL_ENCRYPT": "false",
"MSSQL_TRUST_SERVER_CERTIFICATE": "true"
}
}
}
}
Tools
query
Execute a SQL query on a MSSQL database.
Parameters
connectionString
(string, optional): Full connection string (alternative to individual parameters)host
(string, optional): Database server hostnameport
(number, optional): Database server port (default: 1433)database
(string, optional): Database name (default: master)username
(string, optional): Database usernamepassword
(string, optional): Database passwordquery
(string, required): SQL query to executeencrypt
(boolean, optional): Enable encryption (default: false)trustServerCertificate
(boolean, optional): Trust server certificate (default: true)
Either connectionString
OR (host
+ username
+ password
) must be provided.
Example
const result = await use_mcp_tool({
server_name: 'mssql',
tool_name: 'query',
arguments: {
host: 'localhost',
username: 'sa',
password: 'yourpassword',
query: 'SELECT * FROM Users',
},
});
Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build
npm run build
# Run tests
npm test
# Run linter
npm run lint
# Format code
npm run format
License
MIT
Recommended Servers

Supabase MCP Server
A Model Context Protocol (MCP) server that provides programmatic access to the Supabase Management API. This server allows AI models and other clients to manage Supabase projects and organizations through a standardized interface.
MCP DuckDB Knowledge Graph Memory Server
A memory server for Claude that stores and retrieves knowledge graph data in DuckDB, enhancing performance and query capabilities for conversations with persistent user information.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
Metabase MCP Server
Enables AI assistants to interact with Metabase databases and dashboards, allowing users to list and execute queries, access data visualizations, and interact with database resources through natural language.

Airtable MCP Server
A Model Context Protocol server that provides tools for programmatically managing Airtable bases, tables, fields, and records through Claude Desktop or other MCP clients.
mcp-shodan
MCP server for querying the Shodan API and Shodan CVEDB. This server provides tools for IP lookups, device searches, DNS lookups, vulnerability queries, CPE lookups, and more.
Verodat MCP Server
An MCP server that integrates Verodat's data management capabilities with AI systems like Claude Desktop, enabling users to manage accounts, workspaces, and datasets, as well as perform AI-powered queries on their data.

Tembo MCP Server
An MCP server that enables Claude to interact with Tembo Cloud platform API, allowing users to manage Tembo Cloud resources through natural language.
MongoDB MCP Server
Provides read-only access to MongoDB databases for LLMs to inspect collection schemas and execute aggregation pipelines.
nile-mcp
MCP server for Nile Database - Manage and query databases, tenants, users, auth using LLMs