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

mssql-read-only-mcp

v1.0.2

Published

Read-Only MSSQL MCP Server with SQL Authentication

Readme

MSSQL Read-Only MCP Server

A lightweight, read-only MSSQL MCP server.

Features

  • Read-Only by Design - Safe database querying with no write operations
  • Single File Implementation - All code in one easy-to-understand file (~240 lines)
  • Three Essential Tools - List tables, describe structure, query data

Installation

Option 1: Using npx (Recommended)

No installation required! Use npx to run the server directly:

With Claude Code CLI

claude mcp add --transport stdio mssql-read-only \
  --env SERVER_NAME=your-server.database.windows.net \
  --env DATABASE_NAME=YourDatabase \
  --env SQL_USER=username \
  --env SQL_PASSWORD=password \
  --env SQL_PORT=1433 \
  --env TRUST_SERVER_CERTIFICATE=false \
  -- npx -y mssql-read-only-mcp

Windows users: On native Windows (not WSL), use:

claude mcp add --transport stdio mssql-read-only --env SERVER_NAME=... -- cmd /c npx -y mssql-read-only-mcp

With Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "mssql-read-only": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "mssql-read-only-mcp"],
      "env": {
        "SERVER_NAME": "your-server.database.windows.net",
        "DATABASE_NAME": "YourDatabase",
        "SQL_USER": "username",
        "SQL_PASSWORD": "password",
        "SQL_PORT": "1433",
        "TRUST_SERVER_CERTIFICATE": "false"
      }
    }
  }
}

Windows users: On native Windows (not WSL), use:

{
  "mcpServers": {
    "mssql-read-only": {
      "type": "stdio",
      "command": "cmd",
      "args": ["/c", "npx", "-y", "mssql-read-only-mcp"],
      "env": {
        "SERVER_NAME": "your-server.database.windows.net",
        "DATABASE_NAME": "YourDatabase",
        "SQL_USER": "username",
        "SQL_PASSWORD": "password"
      }
    }
  }
}

Option 2: Local Development

For local development or modifications:

git clone <repository-url>
cd mssql-read-only-mcp
npm install
npm run build

Then configure with the local path:

claude mcp add --transport stdio mssql-read-only \
  --env SERVER_NAME=your-server.database.windows.net \
  --env DATABASE_NAME=YourDatabase \
  --env SQL_USER=username \
  --env SQL_PASSWORD=password \
  -- node /path/to/mssql-read-only-mcp/dist/index.js

Configuration

Required environment variables:

  • SERVER_NAME - MSSQL server hostname
  • DATABASE_NAME - Database name
  • SQL_USER - SQL authentication username
  • SQL_PASSWORD - SQL authentication password

Optional environment variables:

  • SQL_PORT - Port number (default: 1433)
  • TRUST_SERVER_CERTIFICATE - Set to "true" to trust self-signed certs (default: false)
  • CONNECTION_TIMEOUT - Connection timeout in seconds (default: 30)

Available Tools

  • list_table - List all tables in the database (with optional schema filter)
  • describe_table - Show table structure (columns and types)
  • read_data - Execute SELECT queries

License

MIT