dbngin-mcp
Provides live status inspection via TCP port probe for DBngin-managed Elasticsearch services; start/stop and log access are not supported.
Provides live status inspection via TCP port probe for DBngin-managed MariaDB services; start/stop and log access are not supported.
Provides live status inspection via TCP port probe for DBngin-managed MongoDB services; start/stop and log access are not supported.
Provides live status inspection via TCP port probe for DBngin-managed MySQL services; start/stop and log access are not supported.
Controls DBngin-managed PostgreSQL services on Windows: start, stop, restart, check live status including PID/uptime and TCP port probe, and read PostgreSQL logs.
Controls DBngin-managed Redis services on Windows: start, stop, restart, check live status with TCP port probe and PING, and read Redis logs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dbngin-mcp is my postgres service running? if not, start it"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dbngin-mcp
An MCP server (stdio, zero runtime dependencies) that controls local database services managed by DBngin (TablePlus) on Windows: start / stop / restart, live status and logs for PostgreSQL and Redis — driven by your AI agent through the Model Context Protocol.
The MCP protocol is implemented directly as newline-delimited JSON-RPC 2.0 over stdio — no SDK, no npm install, one file.
Why
DBngin is a great GUI for managing local database engines, but agents (ZCode, Claude Desktop, Cursor, …) can't click its UI. This server exposes DBngin services as MCP tools, so an agent can:
discover which services exist and whether they are actually running (live TCP port probe, not the GUI's possibly stale status field);
start a service before running migrations/tests and stop it afterwards;
inspect a service (PID, uptime, process name, Redis PING) and read its log tail when something fails.
Related MCP server: local-devops-mcp
Requirements
Windows (uses
netstat,tasklist,taskkill,pg_ctland PowerShell for process/port details)Node.js 18+
DBngin installed, with at least one service created
PostgreSQL / Redis engines downloaded through the DBngin app (start/stop is implemented for these two types)
Setup
Clone this repo anywhere and register it in your MCP client's config:
{
"mcpServers": {
"dbngin": {
"type": "stdio",
"command": "node",
"args": ["C:\\path\\to\\dbngin-mcp\\index.js"],
"timeoutMs": 60000
}
}
}There is nothing to install — the server has zero runtime dependencies.
Tools
Tool | Description |
| List every service from |
| Start a service. PostgreSQL: |
| Stop a service. PostgreSQL: |
|
|
| Live detail for one service: running state, PID, process name, port answering, Redis PING, uptime / started-at, data / binaries / log paths. Works for every engine type (port-probe based outside postgresql/redis). |
| Last N lines (default 50, max 1000) of a service log. PostgreSQL: |
Targeting a service
Every service tool accepts name (case-insensitive) plus optional type, or an id from list_services:
{"name": "myapp", "type": "redis"}
{"id": "fc0f85c5-a573-4c7c-8b6b-211d842d4ef0"}Service names are not unique in DBngin (two services can share a name with different engine types). Without type/id, an ambiguous name fails with the candidate list.
Engine support
Engine | Start/stop | Status | Logs |
PostgreSQL | ✅ | ✅ ( | ✅ ( |
Redis | ✅ | ✅ (port probe + | ✅ ( |
MySQL, MariaDB, MongoDB, Elasticsearch | ❌ (clear error; start from the DBngin app) | ✅ (port probe) | ❌ |
PostgreSQL details:
The start command replicates what DBngin itself runs (
postgres.exe -D <DBPath> -p <port>), launched detached via PowerShellStart-Process -WindowStyle Hiddenso workers inherit a single hidden console and the server survives the MCP process exiting.pg_ctl start -lis intentionally avoided: it opens the log with exclusive sharing and can deadlock startup after an unclean shutdown.Stop and status use the
pg_ctl.exefrom that engine version's ownBinPath.
Redis details:
Started with the same flags the DBngin app uses (
--save "" --appendonly no --maxmemory 256mb --maxmemory-policy allkeys-lru), plus--bind 127.0.0.1so the dev server never leaves loopback.Dumps and logs live under
%LOCALAPPDATA%\com.tinyapp.DBngin\Engines\redis; one log file per port.Detached — survives the MCP server exiting.
Safety notes
The server never writes
DBEngines.jsonor any DBngin configuration. The only files it creates are the Redis dumps dir and Redis log underEngines\redis.Running state comes from a real TCP probe on
127.0.0.1(withpg_ctl status/ RedisPINGas reinforcement), not from the GUI status field.Before sending
SHUTDOWN, the server verifies the port owner's process image; it refuses to stop an unrelated process.All processes are started hidden — no console windows flash.
Engines other than PostgreSQL/Redis are inspect-only; start/stop returns a clear error instead of guessing.
Troubleshooting
"Cannot read the DBngin config" — DBngin isn't installed (or never ran). Config lives at
%LOCALAPPDATA%\com.tinyapp.DBngin\Data\DBEngines.json.Postgres "port did not answer" — startup after an unclean shutdown can take longer than the 15 s wait; check
pg_log.log(get_logs) and retry.Redis PIDs don't show in netstat — the RedisWindows build keeps its socket in the
Bindstate, which netstat doesn't list asLISTENING. The server falls back to PowerShellGet-NetTCPConnectionand uses aPINGas secondary proof.
Development
Everything lives in a single index.js. Run it directly and speak MCP to it:
node index.jsor smoke-test the handshake:
echo {"jsonrpc":"2.0","id":1,"method":"initialize","params":{}} | node index.jsBuilt and tested on Windows 11 (Windows Terminal as default terminal). macOS/Linux are not supported — DBngin's Windows data layout and the process helpers used here are Windows-specific.
License
Available Tools
6 toolsget_logsA
Return the last N lines (default 50, max 1000) of a DBngin service log. PostgreSQL reads '/pg_log.log'; Redis reads the DBngin Engines/redis log file written when started through this server. Pass 'name' plus optional 'type' (or 'id') and 'lines'.
Inputs: id, name, type, lines.
list_servicesA
List all DBngin-managed local database services (PostgreSQL, Redis, MySQL, ...) with live running state detected by TCP port probing. Use this first to discover service names, types, ports and IDs before calling start_service / stop_service.
Inputs: no named parameters.
restart_serviceA
Restart a DBngin local database service (stop_service followed by start_service). Supported engines: postgresql and redis. Use only when a restart is actually needed; for a stopped service, prefer start_service.
Inputs: id, name, type.
service_statusA
Detailed live status of one DBngin service: running state, PID, process name, port answering, Redis PING, uptime/started-at, and data/bin/log paths. Works for every engine type (detection is port-probe based for engines other than postgresql/redis).
Inputs: id, name, type.
start_serviceA
Start a DBngin local database service. Supported engines: postgresql (postgres.exe spawned detached with the same command line as the DBngin app) and redis (hidden detached redis-server). Waits until the service port answers (up to 15s). Returns 'already_running' without failing if the service is up. Resolve the service by 'name' plus optional 'type' (names can repeat across engine types) or by 'id'.
Inputs: id, name, type.
stop_serviceA
Stop a DBngin local database service. PostgreSQL is stopped with 'pg_ctl stop -m fast'; Redis receives 'SHUTDOWN NOSAVE' via redis-cli (fallback: taskkill only if the port listener is redis-server.exe). Waits until the port stops answering (up to 15s). Returns 'already_stopped' without failing if the service is down.
Inputs: id, name, type.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct role: lifecycle actions (start/stop/restart), discovery (list_services), diagnostics (service_status), and log retrieval. The only mild overlap is list_services vs service_status since both surface running state, but descriptions clarify the former is for discovery and the latter for detailed per-service inspection.
All names are snake_case and mostly follow a verb_noun pattern (list_services, start_service, stop_service, restart_service, get_logs). Minor deviations: service_status puts the noun first instead of a verb, and get_logs uses a different verb style than list_services for a read operation.
Six tools is well-scoped for a local database service manager, covering exactly the discovery, lifecycle, and diagnostics operations an agent needs. No tool feels redundant or superfluous.
The surface covers the full service lifecycle (list, start, stop, restart, status, logs) with no dead ends for managing existing services. Minor gaps exist — no tool to create/register a new service or edit configuration/data paths, but core operational workflows are fully supported.
Maintenance
Related MCP Connectors
Deploy local apps, add managed Postgres, and inspect logs from your AI coding agent.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Related MCP Servers
- AlicenseAqualityDmaintenanceA comprehensive Model Context Protocol server that enables AI assistants to interact with and manage Windows systems, providing capabilities for file system operations, process management, system information retrieval, registry operations, service management, network diagnostics, and performance monitoring.725 npm6Apache 2.0
- AlicenseDqualityDmaintenanceEnables AI assistants to interact with local Docker containers, Kubernetes clusters, and system logs using the Model Context Protocol.9ISC
- AlicenseBqualityBmaintenanceEnables AI agents to run PowerShell commands and manage Windows services without intrusive console windows, while also supporting remote execution via SSH and WinRM.20444 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables an AI agent to manage local development environments over MCP by starting, stopping, and restarting applications and processes, reading logs with cursors, and inspecting or freeing listening ports. Exposes a fixed set of id- and port-based tools, so the agent can operate registered processes without running arbitrary commands.4 npmMIT