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

@warnyin/mssql-mcp

v0.1.1

Published

MCP server for managing Microsoft SQL Server — list/describe schemas, run queries, execute T-SQL.

Readme

@warnyin/mssql-mcp

npm

A Model Context Protocol (MCP) server for managing Microsoft SQL Server. Exposes read-only and administrative tools over stdio, so it can be launched directly by any MCP-compatible client (Claude Desktop, Claude Code, MCP Inspector, etc.) via npx.

Features

  • List & describe — databases, schemas, tables, views, stored procedures, functions, indexes, foreign keys.
  • Get definitions — source T-SQL for views, procedures, and functions.
  • Query — safe SELECT / WITH execution with row caps and pagination guidance.
  • Execute — full T-SQL (INSERT, UPDATE, DELETE, DDL) when needed; opt-in disabled via MSSQL_READONLY=true.
  • Server info — version, edition, current login, collation.

Quickstart

Run via npx

MSSQL_SERVER=localhost \
MSSQL_USER=sa \
MSSQL_PASSWORD='Your_Strong_Password' \
MSSQL_DATABASE=master \
npx -y @warnyin/mssql-mcp

Run from source

npm install
npm run build
MSSQL_SERVER=localhost MSSQL_USER=sa MSSQL_PASSWORD='Your_Strong_Password' node dist/index.js

Test with MCP Inspector

npx -y @modelcontextprotocol/inspector \
  --env MSSQL_SERVER=localhost \
  --env MSSQL_USER=sa \
  --env MSSQL_PASSWORD='Your_Strong_Password' \
  node dist/index.js

Configuration

All configuration is via environment variables.

| Variable | Required | Default | Description | | --- | --- | --- | --- | | MSSQL_SERVER | ✅ | — | Server hostname or IP. | | MSSQL_USER | ✅ | — | SQL login. | | MSSQL_PASSWORD | ✅ | — | SQL login password. | | MSSQL_DATABASE | | (login default) | Default database for queries. | | MSSQL_PORT | | 1433 | TCP port. | | MSSQL_INSTANCE | | — | Named instance (e.g. SQLEXPRESS). | | MSSQL_ENCRYPT | | true | Enable TLS. | | MSSQL_TRUST_SERVER_CERTIFICATE | | false | Accept self-signed certs (dev only). | | MSSQL_CONNECTION_TIMEOUT_MS | | 15000 | Connect timeout. | | MSSQL_REQUEST_TIMEOUT_MS | | 30000 | Per-request timeout. | | MSSQL_READONLY | | false | When true, disables mssql_execute. |

Claude Desktop / Claude Code config

Add this entry to your MCP servers config (claude_desktop_config.json or your Claude Code MCP config):

{
  "mcpServers": {
    "mssql": {
      "command": "npx",
      "args": ["-y", "@warnyin/mssql-mcp"],
      "env": {
        "MSSQL_SERVER": "localhost",
        "MSSQL_USER": "sa",
        "MSSQL_PASSWORD": "Your_Strong_Password",
        "MSSQL_DATABASE": "master"
      }
    }
  }
}

Tools

| Tool | Read-only | Description | | --- | --- | --- | | mssql_list_databases | ✅ | List databases on the instance. | | mssql_list_schemas | ✅ | List user schemas in a database. | | mssql_list_tables | ✅ | List tables, optionally filtered by schema, with row counts. | | mssql_describe_table | ✅ | Columns, PK, FKs, and indexes for a table or view. | | mssql_list_views | ✅ | List views. | | mssql_list_procedures | ✅ | List stored procedures and user-defined functions. | | mssql_get_object_definition | ✅ | T-SQL source of a view / procedure / function. | | mssql_query | ✅ | Run a SELECT / WITH query. Capped at 100 rows by default (max 10000). | | mssql_execute | ❌ | Run any T-SQL — disabled when MSSQL_READONLY=true. | | mssql_server_info | ✅ | Version, edition, hostname, current login, collation. |

Every tool supports response_format: 'markdown' | 'json' (defaults to markdown).

Safety notes

  • mssql_query rejects statements that don't begin with SELECT or WITH (after leading comments/whitespace).
  • mssql_execute is marked destructiveHint: true and is fully disabled when MSSQL_READONLY=true.
  • Responses are capped at 25 000 characters; results beyond that are truncated and truncated: true is reported in the structured response.
  • The server logs to stderr only (per stdio MCP convention).

License

MIT