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

@gishubperu/mcp-mssqls

v1.0.6

Published

Presentation layer — MCP server with stdio and HTTP transports.

Readme

@gishubperu/mcp-mssql

NPM Version License: MIT Docker

Enterprise-grade SQL Server (MSSQL) MCP Server for AI Agents. Provides a secure, robust, and highly configurable bridge between Large Language Models (like Claude, GPT-4, etc.) and your SQL Server databases.

🚀 Features

  • Read-Only by Default: Ensures AI agents can't modify data unless explicitly permitted.
  • Semantic Security: Uses AST parsing to block access to system tables (sys.*, INFORMATION_SCHEMA).
  • Deep Protection: Multi-layered blocklist for xp_cmdshell, timing attacks, and distributed queries.
  • Dynamic Permissions: Enable DML/DDL/DCL at runtime via specialized tools.
  • Multi-Profile Support: Switch between multiple environments (Dev, Test, Prod) without restarting.
  • Zero-Config Flow: Start instantly with a simple .ghp/mssql.json file.
  • Dual Transport: Supports standard stdio and local HTTP sessions.

🛠 Installation

# Direct run via npx
npx @gishubperu/mcp-mssql

# Or install globally
npm install -g @gishubperu/mcp-mssql

💻 Usage with Claude Desktop

Add this entry to your claude_desktop_config.json:

{
  "mcpServers": {
    "mssql": {
      "command": "npx",
      "args": ["-y", "@gishubperu/mcp-mssql"]
    }
  }
}

The server will automatically look for .ghp/mssql.json in your current workspace root.


⚙️ Configuration

Option 1: Configuration File (Recommended)

Create a file named .ghp/mssql.json in your project root or ~/.ghp/mssql.json for global access.

Simple Format:

{
  "url": "mssql://user:password@localhost:1433/MyDatabase",
  "permissions": { "dml": true, "ddl": false }
}

Multi-Profile Format:

{
  "profiles": {
    "dev": { "url": "mssql://dev:pass@localhost:1433/app_dev", "permissions": { "dml": true } },
    "prod": { "url": "mssql://reader:pass@prod-server:1433/app_prod", "permissions": { "dml": false } }
  },
  "default": "dev"
}

Option 2: Environment Variables

| Variable | Default | Description | | --- | --- | --- | | DATABASE_URL | — | SQL Server connection string (e.g., mssql://user:pass@host:1433/db) | | MCP_TRANSPORT | stdio | stdio (for AI clients) or http | | MCP_HTTP_PORT | 3000 | Port for HTTP transport | | PROFILE | — | Initial profile name to load | | DEBUG | false | Log all SQL statements to stderr |


🛠 Tools Provided

| Tool | Parameters | Description | | --- | --- | --- | | query | sql, params | Runs a read-only SELECT query. Blocked if write is detected. | | list_tables | schema | Lists all tables, types and estimated row counts (default: dbo). | | describe_table | table, schema | Shows columns, data types, indexes and constraints. | | execute_dml | sql, params | Runs INSERT/UPDATE/DELETE. Requires dml permission. | | execute_ddl | sql | Runs CREATE/ALTER/DROP. Requires ddl permission. | | execute_dcl | sql | Runs GRANT/REVOKE. Requires dcl permission. | | configure_permissions | dml, ddl, dcl | Toggle permissions for the current session. | | set_profile | name | Switch to a different database profile on-the-fly. | | get_current_profile | — | Returns host, database and active permissions. | | list_profiles | — | Lists all available profile names defined in config. |


🔒 Security Policy

1. Semantic Validation

Unlike simple regex servers, this server parses the SQL into an Abstract Syntax Tree (AST). It identifies the target tables and schemas before execution.

  • Forbidden: Any access to sys.*, msdb.*, master.*, model.* or INFORMATION_SCHEMA.

2. Injection Blocklist

Protects against advanced T-SQL injection vectors:

  • Stored Procedures: Blocks xp_cmdshell, xp_regread, sp_configure.
  • Distributed Queries: Blocks OPENROWSET, OPENDATASOURCE, OPENQUERY.
  • Timing Attacks: Blocks WAITFOR DELAY and pg_sleep (parity).
  • Parity: Also blocks Oracle and PostgreSQL specific dangerous patterns to prevent cross-dialect attacks.

⚠️ Troubleshooting

  1. Connection Timeout: Ensure TCP/IP is enabled in SQL Server Configuration Manager. By default, SQL Server Express only enables Shared Memory.
  2. Authentication: If using Windows Authentication, ensure the connection string is correctly formatted or use SQL Login for easier setup in MCP.
  3. Port 1433: Ensure the port is open in your firewall and the SQL Browser service is running if using named instances.

© 2026 GisHub Perú SAC. MIT License. Made with ❤️ in Perú.