DB Gateway MCP Server
Provides tools for interacting with Elasticsearch, enabling search, indexing, and data exploration.
Provides tools for interacting with MongoDB, enabling operations on documents and collections, including schema discovery and data retrieval.
Provides tools for interacting with MySQL databases, including schema inspection, relationship discovery, and executing SQL queries.
Provides tools for interacting with PostgreSQL databases, including schema inspection, relationship discovery, and executing SQL queries.
Provides tools for interacting with Redis, enabling operations on data structures, keys, and cache management.
Click on "Install 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., "@DB Gateway MCP ServerFind users who signed up last month and never placed an order"
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.
DB Gateway MCP Server
English | 한국어
An MCP server that gives AI agents direct access to your databases — 145+ tools across 8 engines.
The point is that the agent reads your schema itself instead of you pasting DDL into a prompt:
You: "Find users who signed up last month and never placed an order"
1. mysql_get_all_schemas → reads every table definition
2. mysql_get_table_relationships → finds the users ↔ orders foreign key
3. mysql_execute_query → runs the LEFT JOINEngine | Tools | Engine | Tools |
MySQL | 16 | Redis | 21 |
PostgreSQL | 16 | DynamoDB | 13 |
Redshift | 27 | Elasticsearch | 19 |
MongoDB | 14 | Kafka | 19 |
Quick Start
Requires Node.js 18+. Register it with your MCP client — no install step:
{
"mcpServers": {
"db-gateway": {
"command": "npx",
"args": ["-y", "db-gateway"],
"env": {
"DBS": "mysql,redis",
"MYSQL": "mysql://<user>:<password>@<host>:3306/<database>?alias=dev&default=true",
"REDIS": "redis://:@<host>:6379/0?alias=dev&default=true"
}
}
}
}DBS decides which engines are enabled — only those tools get registered.
Connection strings
One string per engine. Semicolons separate multiple instances.
Variable | Format |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
aliasis required. It is how tools address a specific instance — omit it and that engine fails to connect.
Several instances of the same engine — separate their connection strings with a semicolon. The agent picks one by passing an alias argument to any tool; default=true marks the one used when no alias is given:
MYSQL="mysql://<user>:<password>@<dev-host>:3306/<db>?alias=dev&default=true;mysql://<user>:<password>@<prod-host>:3306/<db>?alias=prod"DynamoDB is the exception — it takes DYNAMODB_REGION, DYNAMODB_ACCESS_KEY_ID, and DYNAMODB_SECRET_ACCESS_KEY instead. See .env.example for every option.
Related MCP server: MCP Database Manager
Read-Only Mode
READ_ONLY=true hides write tools from the tool list entirely and restricts *_execute_query to SELECT-style statements.
Register production as a second MCP server with this flag on. The agent then cannot modify production data — the write tools do not exist as far as it can see.
"db-gateway-prod": {
"command": "npx",
"args": ["-y", "db-gateway"],
"env": { "READ_ONLY": "true", "DBS": "mysql", "MYSQL": "..." }
}Documentation
Tool Reference — all 145+ tools, by engine
Connection Management — pooling, health checks, and why
connectionLimitmultiplies per sessionDeployment — SSE mode, Nginx, PM2, sharing one gateway across a team
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceConnect AI agents to SQL databases (SQLite, PostgreSQL, MySQL) with a unified interface for querying data, exploring schemas, inserting rows, and exporting results to CSV. Includes safety features like dangerous query blocking and write guards.Last updated11MIT
- Alicense-qualityDmaintenanceEnables AI assistants to interact with and manage multiple database types (PostgreSQL, MySQL, SQLite, SQL Server, MongoDB, Redis) through natural language, supporting query analysis, schema management, data analysis, backup/restore, and security analysis.Last updated82MIT
- Alicense-qualityAmaintenanceEnables AI assistants to query databases using natural language, with automatic schema discovery and SQL compilation.Last updated5883,132Apache 2.0
- Alicense-qualityDmaintenanceEnables AI assistants to connect to and interact with PostgreSQL, MySQL, SQLite, and MongoDB databases through natural language, supporting schema exploration, query execution, data export, and more.Last updatedMIT
Related MCP Connectors
The agent-native cloud: database, functions, AI, storage, computers. 55 tools, one API key.
SaaS intelligence for AI agents. 5 unified tools cover 1,000+ services with 91-96% token savings.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sijunkim/db-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server