
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
@vini-cius/mcp-mssql-server
Advanced tools
MCP server for executing MS SQL Server queries via MCP protocol
A secure and robust Model Context Protocol (MCP) service for executing SQL Server queries via MCP protocol. This service provides a safe way to interact with SQL Server databases while preventing destructive operations and SQL injection attacks.
execute_queryExecutes safe SQL queries with parameter support.
Parameters:
query (string, required): The SQL query to executeparameters (object, optional): Query parameters for prepared statementsExample:
{
"query": "SELECT * FROM Users WHERE Status = @status",
"parameters": {
"status": "active"
}
}
get_table_schemaRetrieves detailed column information for a specific table.
Parameters:
tableName (string, required): Name of the tableschemaName (string, optional): Schema name (default: "dbo")Example:
{
"tableName": "Users",
"schemaName": "dbo"
}
list_tablesLists all tables in the database with optional schema filtering.
Parameters:
schemaName (string, optional): Filter tables by specific schemaExample:
{
"schemaName": "dbo"
}
get_database_infoRetrieves general database information (name, version, edition, etc.).
Parameters: None
list_proceduresLists all stored procedures in the database, optionally filtered by schema.
Parameters:
schemaName (string, optional): Filter procedures by schemaExample:
{
"schemaName": "dbo"
}
list_functionsLists all functions (scalar and table-valued) in the database, optionally filtered by schema and function type.
Parameters:
schemaName (string, optional): Filter functions by schemafunctionType (string, optional): 'SCALAR' or 'TABLE'Example:
{
"schemaName": "dbo",
"functionType": "SCALAR"
}
get_procedure_schemaGets the schema and parameters of a specific stored procedure.
Parameters:
procedureName (string, required): Name of the procedureschemaName (string, optional): Schema name (default: "dbo")Example:
{
"procedureName": "MyProcedure",
"schemaName": "dbo"
}
get_function_schemaGets the schema and parameters of a specific function.
Parameters:
functionName (string, required): Name of the functionschemaName (string, optional): Schema name (default: "dbo")Example:
{
"functionName": "MyFunction",
"schemaName": "dbo"
}
execute_procedureExecutes a stored procedure with parameters.
Parameters:
procedureName (string, required): Name of the procedureparameters (object, optional): Procedure parametersschemaName (string, optional): Schema name (default: "dbo")Example:
{
"procedureName": "MyProcedure",
"parameters": {
"param1": 123,
"param2": "abc"
},
"schemaName": "dbo"
}
pnpm install
cp .env.example .env
| Variable | Description | Default |
|---|---|---|
HTTP_PORT | HTTP server port | 3333 |
NODE_ENV | Node environment (development/production) | development |
ORIGIN | Allowed CORS origins (comma-separated) | - |
SQL_SERVER | SQL Server hostname/IP | localhost |
SQL_DATABASE | Database name | master |
SQL_USER | Database username | - |
SQL_PASSWORD | Database password | - |
SQL_PORT | SQL Server port | 1433 |
SQL_ENCRYPT | Enable encryption | true |
SQL_TRUST_CERT | Trust server certificate | false |
Example .env:
HTTP_PORT=3333
NODE_ENV=development
ORIGIN=http://localhost:3000,http://example.com
SQL_SERVER=localhost
SQL_DATABASE=master
SQL_USER=sa
SQL_PASSWORD=YourSecurePassword123!
SQL_PORT=1433
SQL_ENCRYPT=true
SQL_TRUST_CERT=false
pnpm run dev:http
# or
pnpm run start:http
pnpm run build
pnpm run test
To integrate this server with a desktop app, add the following to your app's server configuration:
{
"mcpServers": {
"sqlserver": {
"command": "node",
"args": [
"{ABSOLUTE PATH TO FILE HERE}/dist/cli.js"
]
}
}
}
{
"mcpServers": {
"sqlserver": {
"command": "npx",
"args": [
"mcp-mssql-server"
]
}
}
}
Note: Replace {ABSOLUTE PATH TO FILE HERE} with the actual absolute path to your project's dist/cli.js file.
To use this MCP server with OpenAI's API, you can integrate it using the MCP protocol. Here's an example:
import OpenAI from "openai";
const client = new OpenAI();
const resp = await client.responses.create({
model: "gpt-5",
tools: [
{
type: "mcp",
server_label: "mssql",
server_description: "A SQL Server MCP server for executing safe database queries and schema discovery.",
server_url: "http://localhost:3333/mcp",
require_approval: "never",
},
],
input: "Show me all tables in the database",
});
console.log(resp.output_text);
Note: Make sure your HTTP server is running on the specified port before making requests to OpenAI.
The service automatically blocks potentially destructive operations:
DROP TABLEDELETE FROMTRUNCATE TABLEINSERT INTOUPDATECREATE TABLEALTER TABLEsp_, xp_)--, /* */)SELECT queriesWITH clauses (CTEs)SHOW commandsDESCRIBE commandsEXPLAIN commandsEXEC/EXECUTE for procedures/functionsAll query and procedure parameters are automatically sanitized to prevent injection attacks.
The project includes comprehensive tests for schema validation and core functionality:
# Run all tests
pnpm run test
# Run tests in watch mode
pnpm run test -- --watch
# Run tests with coverage
pnpm run test -- --coverage
This project is licensed under the MIT License - see the LICENSE file for details.
Vinicius de Souza Santos
⭐ If this project helps you, please give it a star!
FAQs
MCP server for executing MS SQL Server queries via MCP protocol
We found that @vini-cius/mcp-mssql-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.