mcp-server-mssql
Click on "Install 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., "@mcp-server-mssqllist all tables in the database"
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.
MCP Server for Microsoft SQL Server (Node.js/TypeScript)
This project provides a Model Context Protocol (MCP) server that allows AI agents to interact with Microsoft SQL Server databases. This version is implemented in Node.js and TypeScript.
Features
Connects directly to a single MSSQL database instance configured via environment variables.
Provides tools for:
Listing tables (
list_tables).Retrieving table schemas (
get_table_schema).Performing CRUD operations (
read_table_rows,create_table_records,update_table_records,delete_table_records).
Prerequisites
Node.js (v18 or later recommended)
npm (usually comes with Node.js)
Access to a Microsoft SQL Server instance.
Necessary MSSQL ODBC drivers installed on the machine running the server.
Installation
Clone the repository:
git clone <repository-url> cd mcp-server-mssqlInstall dependencies:
npm install
Configuration
Environment Variables: Configuration is handled entirely through environment variables.
Copy
.env.exampleto.env.Fill in the required MSSQL connection details:
MSSQL_HOSTMSSQL_PORT(defaults to 1433 if not set)MSSQL_USERMSSQL_PASSWORDMSSQL_DATABASE
Optionally configure other MSSQL options (
MSSQL_DRIVER,MSSQL_ENCRYPT,MSSQL_TRUST_SERVER_CERTIFICATE) and logging (LOG_LEVEL) as described in.env.example.
Usage
Build the TypeScript code:
npm run buildRun the server:
npm startAlternatively, for development:
npm run devConnect via MCP Client: Configure your MCP client (e.g., Roo) to connect to this server using stdio.
Tools
(Detailed descriptions of the tools can be found in the server's ListTools response)
list_tablesget_table_schemaread_table_rowscreate_table_recordsupdate_table_recordsdelete_table_records
Development
(Add details about running tests, linting, etc. later)
License
[MIT] - (Or your chosen license)
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/TerraCo89/mcp-server-mssql'
If you have feedback or need assistance with the MCP directory API, please join our Discord server