MCP server intelligence profile

MS SQL Server MCP Server

A secure, read-only MCP server for Microsoft SQL Server with built-in performance monitoring and lock detection

Local OnlyPiyapatRag
Awaiting current scanNpm · 2.0.3

The selected current version does not yet have completed public verification. Unknown does not mean clean or vulnerable.

1Distribution channel
19Independently observed tools
0Linked remote endpoints
AvailableVersion intelligence

Detailed security scan evidence is not public for this MCP yet. Public identity, registry metadata, and independently observed protocol inventory remain available.

Install and connect

Installation and connection instructions are shown only when supported by retained package, repository, or endpoint evidence.

Install @piyapat/mssql-mcp-server from npm

Install exact version 2.0.3. No verified executable entrypoint is available, so use the package documentation to launch it.

npm install --save-exact @piyapat/mssql-mcp-server@2.0.3

Identity

Canonical slugms-sql-server-mcp-server-889fe54fDeploymentLocal Only
Canonical packagenpm:@piyapat/mssql-mcp-serverRepositoryPiyapatRag/mssql-mcp-server
First publishedLatest release
Last security verificationClassification confidence90%
PublicationDraftOfficial distributionNot verified

Distributions

ChannelIdentifierCurrent versionVersionsSource
npm@piyapat/mssql-mcp-server2.0.32Repository

Current release

PackageVersionPublished / observedInventorySecurity scan
npm@piyapat/mssql-mcp-server2.0.3CurrentSep 5, 202619 toolsSucceeded · 0 resources · 0 promptsEvidence restricted
Enterprise protection

Continuously monitor this MCP for security risk

Independently scan the exact version your agents use, receive alerts when its risk changes, and investigate every finding with retained version evidence.

  • Independent exact-version security scans
  • Continuous release and vulnerability monitoring
  • Risk-change alerts with capability context
  • Historical evidence and API exports
Custom pricingContact salesTailored to your organization, integrations, data needs, and support requirements.

Current version evidence

No public current-version evidence is available yet.

Current protocol inventory

2025-06-18Negotiated protocol
mssql-mcp-serverServer-reported name
1Capability groups
Aug 23, 2026Observed

Tools 19

ToolCategoryAnnotationsRisk
mssql_analyze_indexesAnalyze index usage (seeks/scans/lookups/updates per index) and list potentially missing indexes suggested by the query optimizer. Optionally filter usage stats by table name.
Input schema
{
  "type": "object",
  "properties": {
    "tableName": {
      "type": "string",
      "description": "Optional: only show index usage for this table."
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": false
}
Read onlyNon-destructiveNon-idempotentClosed world
mssql_analyze_storageAnalyze storage: largest tables by size (row count, total/used MB) and database file sizes. Useful for capacity planning and finding space hogs.
Input schema
{
  "type": "object",
  "properties": {
    "topTables": {
      "type": "number",
      "description": "Number of largest tables to return (default: 20)",
      "default": 20
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": false
}
Read onlyNon-destructiveNon-idempotentClosed world
mssql_find_blockingFind current blocking chains: which sessions are blocked, by whom, on what resource, and for how long. Identifies lead blockers (including idle sessions holding open transactions) with their SQL text. Supported: SQL Server 2019 (15.x), 2022 (16.x), 2025 (17.x) — all editions including Express. Requires VIEW SERVER STATE.
Input schema
{
  "type": "object",
  "properties": {
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": false
}
Read onlyNon-destructiveNon-idempotentClosed world
mssql_get_deadlocksRetrieve recent deadlock events from the built-in system_health Extended Events session, including the full deadlock graph XML, victim sessions, and the queries involved. Source 'ring_buffer' (default, fast, recent events only) or 'file' (reads system_health .xel files, further back but slower). Supported: SQL Server 2019 (15.x), 2022 (16.x), 2025 (17.x) — all editions including Express. Requires VIEW SERVER STATE.
Input schema
{
  "type": "object",
  "properties": {
    "maxEvents": {
      "type": "number",
      "description": "Maximum number of deadlock events to return (default: 5, max: 25)",
      "default": 5
    },
    "source": {
      "type": "string",
      "enum": [
        "ring_buffer",
        "file"
      ],
      "description": "'ring_buffer' = in-memory recent events (fast). 'file' = system_health event files (older history, slower).",
      "default": "ring_buffer"
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": false
}
Read onlyNon-destructiveNon-idempotentClosed world
mssql_get_relationshipsGet foreign key relationships between tables: constraint name, from/to table and column, and delete/update actions. Optionally filter by table name (matches either side).
Input schema
{
  "type": "object",
  "properties": {
    "tableName": {
      "type": "string",
      "description": "Optional: only show relationships involving this table."
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Read onlyNon-destructiveIdempotentClosed world
mssql_get_schemaGet database schema information including tables, columns, data types, primary keys, and foreign keys. Optionally filter by table name.
Input schema
{
  "type": "object",
  "properties": {
    "tableName": {
      "type": "string",
      "description": "Optional: specific table name to get schema for. If not provided, returns all tables."
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format: 'json' for machine-readable, 'markdown' for human-readable (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Read onlyNon-destructiveIdempotentClosed world
mssql_get_stored_proceduresList stored procedures in the database with their definitions and parameters. Optionally filter by procedure name.
Input schema
{
  "type": "object",
  "properties": {
    "procedureName": {
      "type": "string",
      "description": "Optional: specific procedure name to get details for. If not provided, returns all procedures."
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format: 'json' for machine-readable, 'markdown' for human-readable (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Read onlyNon-destructiveIdempotentClosed world
mssql_get_viewsList views in the database with their full SQL definitions. Optionally filter by view name to get a single view's definition.
Input schema
{
  "type": "object",
  "properties": {
    "viewName": {
      "type": "string",
      "description": "Optional: specific view name to get the definition for."
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Read onlyNon-destructiveIdempotentClosed world
mssql_index_fragmentationAnalyze index fragmentation and recommend maintenance: REBUILD (fragmentation ≥ 30%), REORGANIZE (5–30%), or OK (< 5%). Generates ready-to-run ALTER INDEX statements (ONLINE=ON suggested automatically on editions that support it). Small indexes below minPageCount are excluded since fragmentation there is harmless.
Input schema
{
  "type": "object",
  "properties": {
    "tableName": {
      "type": "string",
      "description": "Optional: analyze only this table."
    },
    "minPageCount": {
      "type": "number",
      "description": "Ignore indexes smaller than this many pages (default: 100 ≈ 800 KB).",
      "default": 100
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": false
}
Read onlyNon-destructiveNon-idempotentClosed world
mssql_list_databasesList all databases on the SQL Server instance with state, recovery model, compatibility level, and creation date.
Input schema
{
  "type": "object",
  "properties": {
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Read onlyNon-destructiveIdempotentClosed world
mssql_list_tablesList tables in the current database with schema, row count, and size in MB. Optionally filter by schema name.
Input schema
{
  "type": "object",
  "properties": {
    "schemaName": {
      "type": "string",
      "description": "Optional: filter tables by schema (e.g. 'dbo'). Default: all schemas."
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Read onlyNon-destructiveIdempotentClosed world
mssql_monitor_locksMonitor database locks, blocking sessions, and potential deadlocks. Shows lock types, resources, and wait times.
Input schema
{
  "type": "object",
  "properties": {
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format: 'json' for machine-readable, 'markdown' for human-readable (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": false
}
Read onlyNon-destructiveNon-idempotentClosed world
mssql_monitor_usageGet database resource usage statistics including CPU, memory, active sessions, and top resource-consuming queries.
Input schema
{
  "type": "object",
  "properties": {
    "topQueries": {
      "type": "number",
      "description": "Number of top CPU-consuming queries to return (default: 10)",
      "default": 10
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format: 'json' for machine-readable, 'markdown' for human-readable (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": false
}
Read onlyNon-destructiveNon-idempotentClosed world
mssql_performance_healthOverall performance health check: top wait statistics (with benign waits filtered out), memory counters (Page Life Expectancy, memory grants pending, total vs target memory), workload counters (batch requests, compilations), and rule-based optimization recommendations (e.g. high CXPACKET → review MAXDOP, PAGEIOLATCH → check I/O and indexes, LCK_M → run mssql_find_blocking).
Input schema
{
  "type": "object",
  "properties": {
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": false
}
Read onlyNon-destructiveNon-idempotentClosed world
mssql_queryExecute a read-only SQL query against the MS SQL Server database. Accepts: a single SELECT / WITH...SELECT; a multi-statement batch led by DECLARE, INSERT, or CREATE TABLE # that writes ONLY to session-local #temp tables or @table variables (global ##temp is never allowed); or EXEC of a whitelisted stored procedure whose definition does not write to a persistent table. Writes to real tables, DDL on persistent objects, dynamic SQL, EXEC inside batches, and DBCC are blocked (server runs with MSSQL_READ_ONLY=true). Returns results as JSON or Markdown.
Input schema
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "The SQL to execute. Must be read-only: a SELECT/WITH query, a DECLARE batch using only #temp/@table targets, or EXEC of an allowed read-only stored procedure."
    },
    "maxRows": {
      "type": "number",
      "description": "Maximum number of rows to return per page (default: 100, max: 1000)",
      "default": 100
    },
    "offset": {
      "type": "number",
      "description": "Row offset for pagination (default: 0)",
      "default": 0
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format: 'json' for machine-readable, 'markdown' for human-readable (default: json)",
      "default": "json"
    }
  },
  "required": [
    "query"
  ]
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Read onlyNon-destructiveIdempotentClosed world
mssql_sample_dataRetrieve sample rows from a table (default 10, max 100). Safe way to preview data without writing SQL. Accepts 'table' or 'schema.table'.
Input schema
{
  "type": "object",
  "properties": {
    "tableName": {
      "type": "string",
      "description": "Table name, optionally schema-qualified (e.g. 'Orders' or 'dbo.Orders')."
    },
    "rows": {
      "type": "number",
      "description": "Number of rows to sample (default: 10, max: 100)",
      "default": 10
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  },
  "required": [
    "tableName"
  ]
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Read onlyNon-destructiveIdempotentClosed world
mssql_search_definitionsSearch the SQL source code of all stored procedures, views, functions, and triggers for a text fragment (e.g. a table name or business term). Useful for impact analysis and legacy code exploration.
Input schema
{
  "type": "object",
  "properties": {
    "searchText": {
      "type": "string",
      "description": "Text to search for inside object definitions (literal substring, case-insensitive)."
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  },
  "required": [
    "searchText"
  ]
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Read onlyNon-destructiveIdempotentClosed world
mssql_test_connectionTest database connectivity and return server information: version, edition, current database, login, and server mode (read-only or write).
Input schema
{
  "type": "object",
  "properties": {
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Read onlyNon-destructiveIdempotentClosed world
mssql_top_queriesFind the most expensive queries from the plan cache, ranked by a chosen metric: cpu, duration, reads (logical I/O), writes, memory (grant size), or executions. Returns per-query totals and averages with the SQL text — the starting point for performance tuning.
Input schema
{
  "type": "object",
  "properties": {
    "metric": {
      "type": "string",
      "enum": [
        "cpu",
        "duration",
        "reads",
        "writes",
        "memory",
        "executions"
      ],
      "description": "Ranking metric (default: cpu)",
      "default": "cpu"
    },
    "top": {
      "type": "number",
      "description": "Number of queries to return (default: 10, max: 50)",
      "default": 10
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json",
        "markdown"
      ],
      "description": "Response format (default: markdown)",
      "default": "markdown"
    }
  }
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": false
}
Read onlyNon-destructiveNon-idempotentClosed world

Resources 0

  • None observed.

Resource templates 0

  • None observed.

Prompts 0

  • None observed.

Remote endpoints

EndpointTransportAuthenticationHealthObserved
No verified remote endpoint is linked.

MS SQL Server MCP Server questions

How do I install MS SQL Server MCP Server?

Install the selected package version with: npm install --save-exact @piyapat/mssql-mcp-server@2.0.3

What tools does MS SQL Server MCP Server provide?

MS SQL Server MCP Server exposed 19 tools during independent protocol observation, including mssql_analyze_indexes, mssql_analyze_storage, mssql_find_blocking, mssql_get_deadlocks, mssql_get_relationships, mssql_get_schema, mssql_get_stored_procedures, mssql_get_views, and others.

Is MS SQL Server MCP Server secure?

The selected current version does not yet have completed public verification. Unknown does not mean clean or vulnerable.

Company and product intelligence

These internal links are derived from strong identity fields such as the implementation name, package, repository, vendor, and listing name—not generic description prose.

Associated company landscape

Microsoft & Azure intelligence →

Association is based on retained identity fields; it does not by itself prove first-party publication.

Explore related MCP server guides

Curated product and capability guides containing this catalog record.

Official vs Community MCP Servers

Let’s talk about MCP security.

Share your details and our security team will contact you.