MSSQL MCP Server
Enables execution of SQL queries and management of Microsoft SQL Server database connections through the Model Context Protocol.
c0h1b4
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

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
AIO-MCP Server
🚀 All-in-one MCP server with AI search, RAG, and multi-service integrations (GitLab/Jira/Confluence/YouTube) for AI-enhanced development workflows. Folk from
Persistent Knowledge Graph
An implementation of persistent memory for Claude using a local knowledge graph, allowing the AI to remember information about users across conversations with customizable storage location.
Hyperbrowser MCP Server
Welcome to Hyperbrowser, the Internet for AI. Hyperbrowser is the next-generation platform empowering AI agents and enabling effortless, scalable browser automation. Built specifically for AI developers, it eliminates the headaches of local infrastructure and performance bottlenecks, allowing you to

Any OpenAI Compatible API Integrations
Integrate Claude with Any OpenAI SDK Compatible Chat Completion API - OpenAI, Perplexity, Groq, xAI, PyroPrompts and more.
Exa MCP
A Model Context Protocol server that enables AI assistants like Claude to perform real-time web searches using the Exa AI Search API in a safe and controlled manner.
BigQuery
This is a server that lets your LLMs (like Claude) talk directly to your BigQuery data! Think of it as a friendly translator that sits between your AI assistant and your database, making sure they can chat securely and efficiently.
Web Research Server
A Model Context Protocol server that enables Claude to perform web research by integrating Google search, extracting webpage content, and capturing screenshots.