A Go-based MCP server providing unified AI access to multiple SQL databases with query, transaction, schema, and performance tools.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Db MCP Server.
The DB MCP Server provides a standardized way for AI models to interact with multiple databases simultaneously. Built on the FreePeak/cortex framework, it enables AI assistants to execute SQL queries, manage transactions, explore schemas, and analyze performance across different database systems through a unified interface.
Unlike traditional database connectors, DB MCP Server can connect to and interact with multiple databases concurrently:
For each connected database, the server automatically generates specialized tools:
The server follows Clean Architecture principles with these layers:
--lazy-loading flag)read_only enforcement (blocks writes through both query_* and execute_* tools), max_rows result truncation with explicit notices, and per-query timeoutsProtect agent sessions against runaway queries and accidental writes:
| Setting | Scope | Effect |
|---|---|---|
"read_only": true | per database | Blocks write statements (INSERT, UPDATE, DELETE, DDL, data-modifying CTEs, stacked writes) through both query and execute tools, and enforces rejection at the database engine itself on PostgreSQL/TimescaleDB (default_transaction_read_only=on) and MySQL (transaction_read_only=1); SQLite opens mode=ro. Classification strips comments and string literals and defaults to deny for unrecognized statements. |
"max_rows": 1000 | per database | Truncates result sets at N rows and appends an explicit [Truncated] notice so the model knows to refine its query instead of losing context. 0 (default) means unlimited. |
"masking_rules": [...] | per database | Masks values of result columns whose name matches a rule's regex before they leave the server β applies to every query shape including SELECT *. Strategies: "fixed_string" (replace with value), "null", and "partial" (keep_last trailing characters visible; shorter values fully masked). First matching rule wins; invalid patterns or unknown strategies abort config load (fail closed); masked-cell counts are reported in the result footer. Renaming a column with an alias bypasses name matching by design. See docs/design/column-masking-scoping.md. |
"query_timeout": 30 | per database | Cancels statements that exceed the timeout in seconds; enforced at the repository layer for every tool (queries, statements, transactions, explain, schema inspection). Unset defaults to 30s; -1 disables. Env-only deployments can set QUERY_TIMEOUT_SECONDS to fill connections without an explicit value (JSON keeps precedence). |
| DB_MCP_AUDIT_LOG=/path/audit.jsonl | process | Appends one JSONL record per executed statement β timestamp, op (query/execute/tx_*), database, statement (capped at 10k chars), duration, error. Includes rejected attempts against read-only databases. Best-effort writes never fail a query; file is created with 0600. |
Defense in depth: read-only is enforced in three layers β application classifier, engine session defaults, and (recommended) least-privilege database users. Oracle currently relies on the classifier plus user privileges.
| Database | Status | Features |
|---|---|---|
| MySQL | β Full Support | Queries, Transactions, Schema Analysis, Performance Insights |
| PostgreSQL | β Full Support (v9.6-17) | Queries, Transactions, Schema Analysis, Performance Insights |
| SQLite | β Full Support | File-based & In-memory databases, SQLCipher encryption support |
| Oracle | β Full Support (10g-23c) | Queries, Transactions, Schema Analysis, RAC, Cloud Wallet, TNS |
| TimescaleDB | β Full Support | Time-Series Queries, Hypertable Discovery (write policies via SQL) |
The DB MCP Server can be deployed in multiple ways to suit different environments and integration needs:
Note: Mount to
/app/my-config.jsonas the container has a default file at/app/config.json.
The SSE and streamable-HTTP transports accept an Authorization: Bearer <key>
header. Set DB_MCP_API_KEY (or pass -api-key) when launching the Docker
container; clients must then send the matching bearer token on every request:
When no API key is configured the transport remains open (single-user /
development use). The middleware lives in internal/delivery/mcp.APIKeyAuth
and is exported so you can compose it with your own reverse proxy if you
front the container with nginx, Caddy, or Traefik.
For Cursor IDE integration, add to .cursor/mcp.json:
Client connection endpoint: http://localhost:9092/sse
Create a config.json file with your database connections:
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/freepeak-db-mcp-server)<a href="https://allmcps.com/mcp/freepeak-db-mcp-server"><img src="https://allmcps.com/api/badge/freepeak-db-mcp-server?style=directory" alt="Db MCP Server on AllMCPs" /></a>