dbatools MCP Server
An MCP server that exposes dbatools PowerShell module commands as tools for AI assistants. It allows agents to list commands, retrieve help documentation, and execute SQL Server management tasks with safe parameter validation, risk gating, and structured JSON output. It supports persistent PowerShell sessions and SQL authentication.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Search and list dbatools commands by verb, noun, or keyword
- Retrieve full normalized help documentation for specific commands
- Execute dbatools commands with safe parameter validation and risk gating
- Check PowerShell and dbatools installation environment and version alignment
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
dbatools-mcp-server 0.5.0
{
"version": "0.5.0",
"transport": "stdio",
"identifier": "dbatools-mcp-server",
"registryType": "npm",
"environmentVariables": [
{
"name": "DBATOOLS_SAFE_MODE",
"format": "string",
"description": "Set to 'false' to allow write/destructive dbatools operations. Defaults to true (read-only safe mode)."
},
{
"name": "MAX_OUTPUT_ROWS",
"format": "number",
"description": "Maximum number of rows returned per command. Defaults to 100. Allowed range: 1–10000."
},
{
"name": "COMMAND_TIMEOUT_SECONDS",
"format": "number",
"description": "Timeout in seconds for each dbatools command. Defaults to 60. Allowed range: 5–3600."
},
{
"name": "PWSH_EXE",
"format": "string",
"description": "Path to the PowerShell executable. Defaults to 'pwsh'."
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"dbatools-mcp-server": {
"command": "npx",
"args": [
"-y",
"dbatools-mcp-server@0.5.0"
],
"env": {
"DBATOOLS_SAFE_MODE": "<YOUR_DBATOOLS_SAFE_MODE>",
"MAX_OUTPUT_ROWS": "<YOUR_MAX_OUTPUT_ROWS>",
"COMMAND_TIMEOUT_SECONDS": "<YOUR_COMMAND_TIMEOUT_SECONDS>",
"PWSH_EXE": "<YOUR_PWSH_EXE>"
}
}
}
}Cline
{
"mcpServers": {
"dbatools-mcp-server": {
"command": "npx",
"args": [
"-y",
"dbatools-mcp-server@0.5.0"
],
"env": {
"DBATOOLS_SAFE_MODE": "<YOUR_DBATOOLS_SAFE_MODE>",
"MAX_OUTPUT_ROWS": "<YOUR_MAX_OUTPUT_ROWS>",
"COMMAND_TIMEOUT_SECONDS": "<YOUR_COMMAND_TIMEOUT_SECONDS>",
"PWSH_EXE": "<YOUR_PWSH_EXE>"
}
}
}
}VS Code
{
"servers": {
"dbatools-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"dbatools-mcp-server@0.5.0"
],
"env": {
"DBATOOLS_SAFE_MODE": "<YOUR_DBATOOLS_SAFE_MODE>",
"MAX_OUTPUT_ROWS": "<YOUR_MAX_OUTPUT_ROWS>",
"COMMAND_TIMEOUT_SECONDS": "<YOUR_COMMAND_TIMEOUT_SECONDS>",
"PWSH_EXE": "<YOUR_PWSH_EXE>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"dbatools-mcp-server": {
"command": "npx",
"args": [
"-y",
"dbatools-mcp-server@0.5.0"
],
"env": {
"DBATOOLS_SAFE_MODE": "<YOUR_DBATOOLS_SAFE_MODE>",
"MAX_OUTPUT_ROWS": "<YOUR_MAX_OUTPUT_ROWS>",
"COMMAND_TIMEOUT_SECONDS": "<YOUR_COMMAND_TIMEOUT_SECONDS>",
"PWSH_EXE": "<YOUR_PWSH_EXE>"
}
}
}
}Let your agent find its tools
Find servers like dbatools MCP Server from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.