NestDaddy

Dbatools Mcp Server

io.github.dataplat/dbatools-mcp-server · v0.5.0

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

Connect Runs on your machine

Terminal
claude mcp add dbatools-mcp-server -e DBATOOLS_SAFE_MODE=<DBATOOLS_SAFE_MODE> -e MAX_OUTPUT_ROWS=<MAX_OUTPUT_ROWS> -e COMMAND_TIMEOUT_SECONDS=<COMMAND_TIMEOUT_SECONDS> -e PWSH_EXE=<PWSH_EXE> -- npx -y [email protected]
claude_desktop_config.json
{
  "mcpServers": {
    "dbatools-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "DBATOOLS_SAFE_MODE": "<DBATOOLS_SAFE_MODE>",
        "MAX_OUTPUT_ROWS": "<MAX_OUTPUT_ROWS>",
        "COMMAND_TIMEOUT_SECONDS": "<COMMAND_TIMEOUT_SECONDS>",
        "PWSH_EXE": "<PWSH_EXE>"
      }
    }
  }
}
~/.cursor/mcp.json
{
  "mcpServers": {
    "dbatools-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "DBATOOLS_SAFE_MODE": "<DBATOOLS_SAFE_MODE>",
        "MAX_OUTPUT_ROWS": "<MAX_OUTPUT_ROWS>",
        "COMMAND_TIMEOUT_SECONDS": "<COMMAND_TIMEOUT_SECONDS>",
        "PWSH_EXE": "<PWSH_EXE>"
      }
    }
  }
}
.vscode/mcp.json
{
  "servers": {
    "dbatools-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "DBATOOLS_SAFE_MODE": "<DBATOOLS_SAFE_MODE>",
        "MAX_OUTPUT_ROWS": "<MAX_OUTPUT_ROWS>",
        "COMMAND_TIMEOUT_SECONDS": "<COMMAND_TIMEOUT_SECONDS>",
        "PWSH_EXE": "<PWSH_EXE>"
      }
    }
  }
}

Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.

Tools

This server runs locally, so its tools are listed by your MCP client once it starts.

Environment variables

NameDescription
DBATOOLS_SAFE_MODE
Optional
Set to 'false' to allow write/destructive dbatools operations. Defaults to true (read-only safe mode).
MAX_OUTPUT_ROWS
Optional
Maximum number of rows returned per command. Defaults to 100. Allowed range: 1–10000.
COMMAND_TIMEOUT_SECONDS
Optional
Timeout in seconds for each dbatools command. Defaults to 60. Allowed range: 5–3600.
PWSH_EXE
Optional
Path to the PowerShell executable. Defaults to 'pwsh'.

Details

Package[email protected] (NPM, stdio)
First published18 Apr 2026
Last updated18 Apr 2026
Registry nameio.github.dataplat/dbatools-mcp-server

More databases servers See all

Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.