DB Access MCP logo

DB Access MCP

by Rheopyrin

Query four database engines through verified SSH or AWS SSM tunnels with read-only controls and confined CSV/JSONL exports.

Install DB Access MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "rheopyrin-db-access-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@rheopyrin/db-access-mcp"
      ],
      "env": {
        "DB_ACCESS_MCP_WORKDIR": "YOUR_VALUE_HERE",
        "DB_ACCESS_MCP_EXPORTDIR": "YOUR_VALUE_HERE",
        "DB_ACCESS_MCP_CONFIG": "YOUR_VALUE_HERE",
        "DB_ACCESS_MCP_LOG_LEVEL": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @rheopyrin/db-access-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Rheopyrin/db-access-mcp exposes PostgreSQL, MySQL, Amazon Redshift, and Microsoft SQL Server through MCP over stdio. It discovers configured connections, tests connectivity, runs queries, produces execution plans, and exports large result sets outside the model context. SSH and AWS SSM tunnels, secret providers, read-only sessions, and isolated per-process pools suit agents that need controlled access to databases behind network boundaries.

Use cases

  • Query production databases through controlled network tunnels
  • Inspect execution plans before running SQL
  • Export large query results as CSV or JSONL files
  • Test configured connections and diagnose tunnel or database failures
  • Reload database and tunnel definitions without restarting the server

Key features

  • PostgreSQL, MySQL, Redshift, and SQL Server access
  • Verified SSH and AWS SSM tunneling
  • Read-only connection enforcement
  • Vault, AWS, environment, and IAM-based secret providers
  • Confined CSV and JSONL query exports
  • Per-instance connection and tunnel isolation

Tools11

What DB Access MCP lets your agent do. Expand a tool for its parameters.

Verified live~2.1k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

17/18 checks healthy over the last 111d

What it can do

From the 11 tools this server returned when we ran it.

Runs commands · 2Handles credentials · 3Read-only tools · 9
Network at startup3 connections
Files written at startup3
Install scriptsNone
npm provenanceSigned build
Package age124 days
Maintainers1

Observed 2026-11-14 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · @rheopyrin/db-access-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads603Package downloads in the last 30 days.
Last commit6d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed11Callable tools this server registers over MCP.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How DB Access MCP works

What Rheopyrin/db-access-mcp does

Rheopyrin/db-access-mcp gives MCP clients access to configured PostgreSQL, MySQL, Amazon Redshift, and Microsoft SQL Server databases. It provides tools for discovering connections, checking database health, executing SQL, inspecting query plans, managing tunnels, and reloading configuration.

The server is designed for database access where credentials and network paths need explicit controls. Connections can use SSH or AWS SSM tunnels, while secrets can come from environment variables, HashiCorp Vault, AWS Secrets Manager, RDS IAM authentication, or temporary Redshift credentials. Connection listings return sanitized metadata rather than credentials.

How it works

The server communicates over stdio, so an MCP client starts it as a child process. Each process maintains its own connection pools, tunnels, and idle timers. SSH tunnels run in process, while AWS SSM sessions use a watchdog. Tunnels close when explicitly released, after an idle timeout, or when the MCP process exits.

query returns rows up to the configured limit, which defaults to a value typically set to 1,000, and marks truncated responses. query_to_file writes CSV or JSONL results under the export directory or another configured permitted root, keeping large result sets out of the model context. PostgreSQL and MySQL exports stream rows; Redshift and SQL Server exports buffer results and cap them at 100,000 rows.

Read-only connections reject writes at the database session level. SSH connections verify bastion host keys using a configured SHA-256 pin or known_hosts. Logs are emitted as JSON lines on stderr, with sensitive values redacted; stdout remains available for MCP protocol traffic.

Setup and configuration

The package requires Node.js 20.19 or newer. Run it with npx -y @rheopyrin/db-access-mcp, or point an MCP client at a locally built dist/cli.js. On first startup, it creates the ~/.db_acess_mcp work directory, including config.json, conf.d/, and an example configuration. Edit the configuration before using database tools.

The command accepts --workdir, --exportdir, --config, repeatable --env-file, and --log-level options. Their environment equivalents include DB_ACCESS_MCP_WORKDIR, DB_ACCESS_MCP_EXPORTDIR, DB_ACCESS_MCP_CONFIG, and DB_ACCESS_MCP_LOG_LEVEL. The default export location is /tmp/db-access-mcp/exports, created when the first export is requested.

AWS SSM tunnels require the AWS CLI and Session Manager plugin on the host. AWS SSO bootstrap may open a browser for login. SSH tunnels use the in-process SSH client and require no additional tunnel executable.

Tools and capabilities

  • dialect_list reports supported dialect names, default ports, and execution-plan formats.
  • connection_list and connection_find locate configured connections without returning credentials.
  • connection_test resolves secrets, opens any configured tunnel, connects, and runs a one-row server-information query.
  • query executes SQL with row-count and timeout controls. Multi-statement behavior follows the database driver and connection options.
  • query_plan runs EXPLAIN without executing the query. PostgreSQL and MySQL return JSON plans; Redshift returns text.
  • query_to_file writes complete or capped results as CSV or JSONL while enforcing export-path restrictions and overwrite rules.
  • up_tunnel, down_tunnel, and tunnel_list open, release, inspect, and health-check tunnels. Forced shutdown can drain pools holding a tunnel.
  • config_reload applies valid connection and tunnel changes without restarting, while leaving already-open pools and tunnels on their previous definitions.

Limitations and notes

Redshift plans are text format, and their cost figures are relative rather than directly comparable with PostgreSQL costs. Redshift does not support JSON-format plans or EXPLAIN ANALYZE through this tool.

Relative export paths resolve below the export directory. Absolute and ~-prefixed paths must remain below that directory or a configured allow_export_paths root. Existing files require overwrite: true.

A configured read-only connection prevents writes at the session level. MySQL multi-statement scripts require multipleStatements to be enabled in the connection options. Configuration reload keeps active pools and tunnels unchanged until they close or are recreated.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about DB Access MCP

Rheopyrin/db-access-mcp is an MCP server that connects AI clients to configured PostgreSQL, MySQL, Amazon Redshift, and Microsoft SQL Server databases. Its main tools list and test connections, execute SQL, generate execution plans, export query results to CSV or JSONL, and manage SSH or AWS SSM tunnels over stdio.

Install it by configuring an MCP client to run `npx -y @rheopyrin/db-access-mcp`. The server requires Node.js 20.19 or newer, creates its work directory on first startup, and reads database definitions from `config.json` and `conf.d/`.

Yes, Rheopyrin/db-access-mcp works with Cursor through its stdio MCP configuration. Add a server entry using command `npx` and arguments `-y` and `@rheopyrin/db-access-mcp` in Cursor's `~/.cursor/mcp.json` file.

Use `query_to_file` with a CSV or JSONL destination. The result is written outside the model context under the export directory or a configured allowed root, and existing files require `overwrite: true`. PostgreSQL and MySQL stream rows, while Redshift and SQL Server cap buffered exports at 100,000 rows.

Call `config_reload` to reread `config.json` and `conf.d/*.json`, or the file selected with `--config`. Valid changes become available without a restart, while active pools and tunnels retain their earlier definitions until they close or are recreated.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDB Access MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/rheopyrin-db-access-mcp?style=directory)](https://allmcps.com/mcp/rheopyrin-db-access-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/rheopyrin-db-access-mcp"><img src="https://allmcps.com/api/badge/rheopyrin-db-access-mcp?style=directory" alt="DB Access MCP on AllMCPs" /></a>