npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iforge.it/mssql-mcp

v1.1.0

Published

Minimal unrestricted MCP server for Microsoft SQL Server. One tool — execute_sql — runs any SQL query without limitations.

Readme

@iforge.it/mssql-mcp

Minimal, unrestricted MCP server for Microsoft SQL Server.

One tool. No restrictions. Full control over your database.

Why?

Most MSSQL MCP servers block system views (sys.sql_modules, sys.dm_*), DDL statements (ALTER, CREATE PROCEDURE), and admin operations (sp_add_jobstep, sp_start_job). This one doesn't.

execute_sql runs any SQL query — SELECT, ALTER, CREATE, DROP, EXEC, system views, everything. Security is handled by Claude Code's built-in tool approval — you see every query before it runs and approve or deny it.

Install

Option 1: npx (no install needed)

Configure .mcp.json in your project root:

{
  "mcpServers": {
    "mssql": {
      "command": "npx",
      "args": ["-y", "@iforge.it/mssql-mcp"],
      "env": {
        "MSSQL_HOST": "localhost",
        "MSSQL_DATABASE": "mydb",
        "MSSQL_USER": "sa",
        "MSSQL_PASSWORD": "yourpassword",
        "MSSQL_PORT": "1433"
      }
    }
  }
}

Windows — use cmd /c wrapper:

{
  "mcpServers": {
    "mssql": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@iforge.it/mssql-mcp"],
      "env": {
        "MSSQL_HOST": "localhost",
        "MSSQL_DATABASE": "mydb",
        "MSSQL_USER": "sa",
        "MSSQL_PASSWORD": "yourpassword",
        "MSSQL_PORT": "1433"
      }
    }
  }
}

Option 2: Global install

npm install -g @iforge.it/mssql-mcp

Then in .mcp.json:

{
  "mcpServers": {
    "mssql": {
      "command": "mssql-mcp",
      "env": {
        "MSSQL_HOST": "localhost",
        "MSSQL_DATABASE": "mydb",
        "MSSQL_USER": "sa",
        "MSSQL_PASSWORD": "yourpassword",
        "MSSQL_PORT": "1433"
      }
    }
  }
}

Option 3: From source

git clone https://github.com/iforgeit/mssql-mcp.git
cd mssql-mcp
npm install

Then in .mcp.json:

{
  "mcpServers": {
    "mssql": {
      "command": "node",
      "args": ["/path/to/mssql-mcp/index.js"],
      "env": {
        "MSSQL_HOST": "localhost",
        "MSSQL_DATABASE": "mydb",
        "MSSQL_USER": "sa",
        "MSSQL_PASSWORD": "yourpassword",
        "MSSQL_PORT": "1433"
      }
    }
  }
}

Environment variables

| Variable | Required | Default | Description | |---|---|---|---| | MSSQL_HOST | Yes | — | SQL Server hostname or IP | | MSSQL_DATABASE | Yes | — | Database name | | MSSQL_USER | Yes | — | SQL auth username | | MSSQL_PASSWORD | Yes | — | SQL auth password | | MSSQL_PORT | No | 1433 | SQL Server port | | MSSQL_ENCRYPT | No | true | Enable TLS encryption (true/false). Set to false only for local/trusted networks | | MSSQL_TRUST_SERVER_CERTIFICATE | No | false | Trust self-signed certificates (true/false). Enable for dev/local servers |

You can use system environment variables with ${VAR_NAME} syntax in .mcp.json:

"MSSQL_PASSWORD": "${MY_SQL_PASSWORD}"

Tool

execute_sql

Executes any SQL query against the connected database.

Input: query (string) — any valid T-SQL statement.

Examples:

-- Read data
SELECT TOP 10 * FROM users

-- DDL
ALTER TABLE users ADD email NVARCHAR(256)

-- Stored procedures
EXEC sp_help 'users'

-- View procedure source code
SELECT definition FROM sys.sql_modules WHERE object_id = OBJECT_ID('dbo.my_proc')

-- SQL Agent jobs
SELECT name, enabled FROM msdb.dbo.sysjobs

-- System views
SELECT * FROM sys.dm_exec_sessions WHERE is_user_process = 1

Returns: JSON with rowCount, columns, rows for SELECT queries, or rowsAffected for write operations.

Security

This MCP server has no built-in query restrictions. Security is handled at two levels:

  1. Claude Code approval — every tool call requires user confirmation (unless you explicitly allow it). You see the full SQL before execution.
  2. SQL Server permissions — the connected user's database permissions apply as usual.

Recommendations:

  • Don't click "Allow always" for execute_sql — review each query
  • Use a database user with appropriate permissions, not sa
  • Add .mcp.json to .gitignore if it contains credentials
  • Use environment variables for passwords instead of hardcoding them

License

MIT