Skip to content
MCP server

Sql Server Analyst MCP

Read-only SQL Server Analyst MCP — safe schema, stored procedure, and performance…

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
0.1.1
Listing updated
4 days ago

About Sql Server Analyst MCP

Sql Server Analyst MCP is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

Read-only SQL Server Analyst MCP — safe schema, stored procedure, and performance analysis.

Install

Run in a terminal

claude mcp add sql-server-analyst-mcp --env MSSQL_SERVER='<MSSQL_SERVER>' --env MSSQL_USER='<MSSQL_USER>' --env MSSQL_PASSWORD='<MSSQL_PASSWORD>' -- npx -y sql-server-analyst-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "sql-server-analyst-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sql-server-analyst-mcp"
      ],
      "env": {
        "MSSQL_SERVER": "<MSSQL_SERVER>",
        "MSSQL_USER": "<MSSQL_USER>",
        "MSSQL_PASSWORD": "<MSSQL_PASSWORD>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "sql-server-analyst-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sql-server-analyst-mcp"
      ],
      "env": {
        "MSSQL_SERVER": "<MSSQL_SERVER>",
        "MSSQL_USER": "<MSSQL_USER>",
        "MSSQL_PASSWORD": "<MSSQL_PASSWORD>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "sql-server-analyst-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "sql-server-analyst-mcp"
      ],
      "env": {
        "MSSQL_SERVER": "<MSSQL_SERVER>",
        "MSSQL_USER": "<MSSQL_USER>",
        "MSSQL_PASSWORD": "<MSSQL_PASSWORD>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "sql-server-analyst-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sql-server-analyst-mcp"
      ],
      "env": {
        "MSSQL_SERVER": "<MSSQL_SERVER>",
        "MSSQL_USER": "<MSSQL_USER>",
        "MSSQL_PASSWORD": "<MSSQL_PASSWORD>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "sql-server-analyst-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sql-server-analyst-mcp"
      ],
      "env": {
        "MSSQL_SERVER": "<MSSQL_SERVER>",
        "MSSQL_USER": "<MSSQL_USER>",
        "MSSQL_PASSWORD": "<MSSQL_PASSWORD>"
      }
    }
  }
}

Configuration

  • MSSQL_SERVERSQL Server hostname or FQDN (e.g. <name>.database.windows.net for Azure SQL).Required
  • MSSQL_PORTTCP port (default 1433; set 0 for named instance with dynamic port).
  • MSSQL_DATABASEDefault database to connect to. Most tools also accept an override argument.
  • MSSQL_USERSQL authentication login name.Required
  • MSSQL_PASSWORDSQL authentication password. Quote values containing '#' in .env files.Required
  • MSSQL_ENCRYPTEncrypt the connection (true|false). Required true for Azure SQL.
  • MSSQL_TRUST_SERVER_CERTTrust self-signed certificates (true|false). Use true only for local dev.
  • ALLOWED_DATABASESComma-separated allowlist of databases the server may access. Empty = unrestricted.
  • ALLOWED_SCHEMASComma-separated allowlist of schemas for schema tools. Empty = unrestricted.
  • MAX_ROWSDefault row limit per safe query (default 100).
  • MAX_ROWS_LIMITHard cap on query rows (default 1000).
  • QUERY_TIMEOUT_MSQuery execution timeout in milliseconds (default 30000).
  • LOG_LEVELerror | warn | info | debug (default info).

Pricing

Open source

Sql Server Analyst MCP FAQ

Is Sql Server Analyst MCP free?

Yes. Sql Server Analyst MCP is open source, so you can use and self-host it for free.

How do I add Sql Server Analyst MCP to Claude Code?

Run this command in your terminal: claude mcp add sql-server-analyst-mcp --env MSSQL_SERVER='<MSSQL_SERVER>' --env MSSQL_USER='<MSSQL_USER>' --env MSSQL_PASSWORD='<MSSQL_PASSWORD>' -- npx -y sql-server-analyst-mcp

What are the best alternatives to Sql Server Analyst MCP?

The closest alternatives to Sql Server Analyst MCP are Midplane, PlatypusDB, Lorebase, Sovaria and model2data studio.

Alternatives to Sql Server Analyst MCP

  1. Midplane

    MCP server

    Postgres gateway for AI agents with table grants, column masking and approval for writes

    Runs locally
    • Open source
    • 5 GitHub stars
    • Databases
  2. PlatypusDB

    MCP server

    Gives MCP clients access to your PlatypusDB database connections, scoped per agent

    Runs locally
    • Open source
    • Databases
  3. Lorebase

    MCP server

    Lets agents read and change a governed, versioned Postgres knowledge graph

    Runs locally
    • Open source
    • Knowledge and memory
  4. Sovaria

    MCP server

    Manage a Sovaria backend (Postgres, auth, storage, functions) from an AI assistant

    Not checked yet
    • 4 tools
    • Remote
    • Freemium
    • Databases
  5. Generate realistic connected test data, dbt projects and dashboards from a schema

    • Remote
    • Freemium
    • Databases
  6. semlayer

    MCP server

    Infers a semantic layer from your data warehouse and serves it to agents

    Runs locally
    • Free
    • Databases