mssql-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mssql-mcp-serverselect all records from the Users table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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-serverRelated MCP server: sql-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 formatLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables connection to Microsoft SQL Server databases, providing tools for schema inspection and querying through standardized interfaces.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for SQL Server database interactions, providing tools to list databases, get schema, and execute parameterized SELECT queries.12 npm1MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for SQL Server database inspection and querying, with connection pooling, security features, and a web manager UI.4MIT
- FlicenseAqualityDmaintenanceMCP server for connecting to SQL Server in readonly mode. Allows any MCP client to explore the schema and run SELECT queries against a SQL Server database.6-