Dbatools MCP Server

MCP server for dbatools — exposes SQL Server management commands as MCP tools

Local serverstdioTypeScript

What is the Dbatools MCP Server?

MCP server for dbatools — exposes SQL Server management commands as MCP tools

The short version

Exposes dbatools commands as MCP tools so AI assistants (GitHub Copilot, Claude, etc.) can discover, explain, and execute dbatools commands directly — with all metadata sourced from dbatools' own comment-based help.

  • list_dbatools_commands — — search commands by verb, noun, keyword, or risk level
  • get_dbatools_command_help — — full normalized help (synopsis, parameters, examples) from Get-Help -Full
  • invoke_dbatools_command — — execute any dbatools command with safe parameter validation, risk gating, and structured JSON output
  • check_dbatools_environment — — verify PowerShell + dbatools installation, index freshness, and version alignment
  • Version mismatch detection — — warns when installed dbatools version differs from the indexed version
  • Safe mode — — non-readonly commands require explicit confirm: true to execute

What it needs from you

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Configuration

VariableDescriptionRequired
DBATOOLS_SAFE_MODEConfiguration value read at startup.Optional
MAX_OUTPUT_ROWSConfiguration value read at startup.Optional
COMMAND_TIMEOUT_SECONDSConfiguration value read at startup.Optional

Frequently asked questions

MCP server for dbatools — exposes SQL Server management commands as MCP tools Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.