The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Dbatools MCP Server listing page.
A Model Context Protocol (MCP) server for the dbatools PowerShell module.
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 levelget_dbatools_command_help — full normalized help (synopsis, parameters, examples) from Get-Help -Fullinvoke_dbatools_command — execute any dbatools command with safe parameter validation, risk gating, and structured JSON outputcheck_dbatools_environment — verify PowerShell + dbatools installation, index freshness, and version alignmentconfirm: true to executeSqlCredential: { username, password } for SQL auth instancespwsh)Then open the folder in VS Code — the .vscode/mcp.json file automatically registers the MCP server.
The included .vscode/mcp.json registers the server as a local STDIO MCP server.
Open this folder in VS Code and the server will appear in the GitHub Copilot MCP panel.
All settings are controlled via environment variables (set in .vscode/mcp.json or your shell):
| Variable | Default | Description |
|---|---|---|
PWSH_EXE | pwsh | Path to PowerShell executable |
DBATOOLS_SAFE_MODE | true | When true, non-readonly commands require confirm: true |
MAX_OUTPUT_ROWS | 100 | Maximum rows returned per command execution |
COMMAND_TIMEOUT_SECONDS | 60 | Seconds before PowerShell process is killed |
The help index (generated/dbatools-help.json) is generated from your locally installed dbatools module.
Re-run whenever dbatools is updated:
The server detects version mismatches at runtime and warns you when the index is stale.
Commands are automatically classified by verb:
| Risk Level | Verbs | Behavior |
|---|---|---|
readonly | Get, Test, Find, Compare, … | Always allowed |
change | Set, New, Add, Copy, Enable, … | Requires confirm: true in safe mode |
destructive | Remove, Drop, Disable, Reset, … | Requires confirm: true in safe mode |
For SQL-auth-only instances (e.g. Docker), pass credentials via the SqlCredential parameter:
Contributions are welcome! Please open an issue first for significant changes.
This project follows the same community spirit as dbatools.
MIT — © 2026 DataPlat contributors