Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Mcp Server Mssql

    MCP Server for MS SQL Integration - Provides ModelContextProtocol support for Microsoft SQL Server

    1 stars
    TypeScript
    Updated May 16, 2025

    Table of Contents

    • How it works
    • Tools
    • Example interaction
    • Setup
    • Configuration (environment variables)
    • Use with Claude Desktop / Claude Code
    • Development
    • License

    Table of Contents

    • How it works
    • Tools
    • Example interaction
    • Setup
    • Configuration (environment variables)
    • Use with Claude Desktop / Claude Code
    • Development
    • License

    Documentation

    mcp-server-mssql

    License: MIT

    TypeScript

    MCP

    A Model Context Protocol server that gives LLM agents safe, structured access to Microsoft SQL Server: schema inspection plus row-level CRUD, every operation parameterized and logged.

    Built because agents working against real business databases need more than "run this SQL string" — they need typed tools with predictable failure modes.

    How it works

    mermaid
    flowchart LR
        A[MCP clientClaude Desktop / Claude Code] -- stdio --> B[mcp-server-mssql]
        B --> C[connection poolmssql driver]
        C --> D[(SQL Server)]
        B -. structured logs .-> E[logs/]

    The server connects to a single database configured via environment variables and exposes six tools. All queries are parameterized — table and column names are validated against the live schema before any statement runs, so an agent cannot inject through identifiers.

    Tools

    ToolWhat it does
    list_tablesList all user tables in the configured database
    get_table_schemaColumn names, types, nullability, and defaults for a table
    read_table_rowsRead rows with optional column selection, WHERE filters, ORDER BY, and LIMIT
    create_table_recordsInsert one or more rows (column/value validated against schema)
    update_table_recordsUpdate rows matching a filter; returns affected count
    delete_table_recordsDelete rows matching a filter; returns affected count

    Example interaction

    User: "Which customers signed up this month?"

    Agent calls list_tables → finds Customers → calls get_table_schema {"table_name": "Customers"} → sees CreatedAt datetime2 → calls read_table_rows {"table_name": "Customers", "filters": {"CreatedAt": {">=": "2026-07-01"}}, "limit": 50} → answers with the rows.

    Setup

    Requires Node.js 18+ and network access to a SQL Server instance.

    bash
    git clone https://github.com/TerraCo89/mcp-server-mssql.git
    cd mcp-server-mssql
    npm install
    cp .env.example .env   # fill in connection details
    npm run build

    Configuration (environment variables)

    VariableRequiredNotes
    MSSQL_HOST / MSSQL_PORTyes / noPort defaults to 1433
    MSSQL_USER / MSSQL_PASSWORDyesSQL auth credentials
    MSSQL_DATABASEyesSingle database per server instance
    MSSQL_ENCRYPT, MSSQL_TRUST_SERVER_CERTIFICATEnoTLS options
    LOG_LEVELnoinfo by default

    Use with Claude Desktop / Claude Code

    json
    {
      "mcpServers": {
        "mssql": {
          "command": "node",
          "args": ["/path/to/mcp-server-mssql/dist/server.js"],
          "env": {
            "MSSQL_HOST": "localhost",
            "MSSQL_USER": "agent_reader",
            "MSSQL_PASSWORD": "...",
            "MSSQL_DATABASE": "MyDb"
          }
        }
      }
    }

    Tip: point it at a least-privilege SQL login — the server can only do what the login can.

    Development

    bash
    npm run dev    # ts-node with live reload
    npm test       # jest test suite (src/*.test.ts, tests/)
    npm run build  # emit dist/

    Docker: docker build -t mcp-server-mssql . then run with the same environment variables.

    License

    MIT

    Similar MCP

    Based on tags & features

    • 4E

      4everland Hosting Mcp

      TypeScript·
      1
    • MC

      Mcp Wave

      TypeScript00
    • GL

      Glm Mcp Server

      TypeScript·
      3
    • OP

      Openai Gpt Image Mcp

      TypeScript·
      75

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • 4E

      4everland Hosting Mcp

      TypeScript·
      1
    • MC

      Mcp Wave

      TypeScript00
    • GL

      Glm Mcp Server

      TypeScript·
      3
    • OP

      Openai Gpt Image Mcp

      TypeScript·
      75

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k