This MCP server exposes dbatools commands for AI assistants to discover, explain, and execute commands directly, utilizing metadata from dbatools' comment-based help.
From the registry: MCP server for dbatools — exposes SQL Server management commands as MCP tools
$ Install-Module dbatools -Scope CurrentUserhttps://dbatools.io/downloadPlease install the `dbatools-mcp-server` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Node.js 20+** — Install Node.js 20 or later. (https://nodejs.org)
- **PowerShell 7+** — Install PowerShell 7 (`pwsh`). (https://github.com/PowerShell/PowerShell/releases)
- **Install dbatools PowerShell module** — Install the dbatools module from PSGallery. Run: `Install-Module dbatools -Scope CurrentUser` (https://dbatools.io/download)
Canonical MCP server config (stdio transport):
- command: `npx`
- args: ["-y","dbatools-mcp-server@latest"]
- optional environment variables:
- `PWSH_EXE`: Path to PowerShell executable (example: `pwsh`)
- `DBATOOLS_SAFE_MODE`: Require confirm:true on non-readonly commands (example: `true`)
- `MAX_OUTPUT_ROWS`: Max rows returned per command (example: `100`)
- `COMMAND_TIMEOUT_SECONDS`: Seconds before PowerShell process is killed (example: `60`)
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.DBATOOLS_SAFE_MODErequiredWhen true, non-readonly commands require confirm: true.MAX_OUTPUT_ROWSrequiredMaximum rows returned per command execution.COMMAND_TIMEOUT_SECONDSrequiredSeconds before PowerShell process is killed.MCP server for interacting with the Supabase platform