execute_sql_queryLABSCO SUMMARY
Typed parameters, in a place they are usually missing.
Handing a model a free-text SQL tool means every value it looked up gets concatenated into a string, which is exactly the pattern parameterisation exists to prevent. Supporting a typed parameter list gives the model somewhere correct to put those values. Pair it with schema discovery — list the tables, describe the one you need — and the SQL it writes is grounded in your actual columns rather than a guess.
What it is
A SQL Server client for assistants with one feature most minimal database servers skip: parameterised queries. You pass the SQL with placeholders and a typed parameter list, rather than having the model splice values into a string. It runs over stdio or HTTP and logs to files in either mode.
What you get
execute_sql_queryruns a query, optionally with a typedparametersarray of name, type and valuelist_tableslists every table in the connected databasedescribe_tablereturns the schema for a named table- Stdio and HTTP transport modes from the same server
- Logging split into
error.logandcombined.log, with console output in HTTP mode
Requirements
Node.js with ES module support and a reachable MS SQL Server instance. npm install locally or npm install -g mcp-mssql-server (package mcp-mssql-server, version 1.0.1), then a .env with DB_SERVER, DB_USER, DB_PASSWORD and DB_DATABASE_NAME. npm start gives stdio; npm run start:http gives HTTP. Queries execute as the configured user, so a read-only login is what keeps execute_sql_query a lookup rather than a write path.
Setup effort
One command plus credentials — npm install -g mcp-mssql-server, then supply credentials
USE CASES
Answering a question about your data in plain language
Let the model list tables, read a schema and compose the query.
Looking up a record by an ID you supply
Run a query with the value passed as a typed parameter rather than pasted in.
Checking a table's shape while you write code against it
Describe the table and get columns and types back in place.
Exposing the database to a remote client
Run it in HTTP mode instead of stdio and watch the console log.
3 tools
Listed in project docs. Your client may show a different list.
list_tablesdescribe_tableBEFORE YOU INSTALL
What to know first
Tools you get
3 tools named in the project's documentation.
Requires
- npm on PATH
- DB_SERVER in your environment
- DB_USER in your environment
- DB_PASSWORD in your environment
- DB_DATABASE_NAME in your environment
INSTALLATION
Connect your client
This project publishes no client configuration, so the entry for your client is yours to write.
Server setup
npm install -g mcp-mssql-serverThe global install puts a mcp-mssql-server command on your PATH (the package's bin), which starts the server over stdio by default. It needs DB_SERVER, DB_USER, DB_PASSWORD and DB_DATABASE_NAME: the project's instructions put them in a .env file, and in your client's entry you can set them in its "env" section instead.