Universal Database MCP
Allows dynamic connection to MariaDB databases via a URL and provides tools for managing databases, tables, and records, including arbitrary SQL execution with confirmation.
Allows dynamic connection to MySQL databases via a URL and provides tools for managing databases, tables, and records, including arbitrary SQL execution with confirmation.
Allows dynamic connection to PostgreSQL databases via a URL and provides tools for managing databases, tables, and records, including arbitrary SQL execution with confirmation.
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., "@Universal Database MCPCreate a connection to my PostgreSQL database and show the tables."
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.
Universal Database MCP
Remote MCP for Google ADK and other MCP clients. Allows you to dynamically connect MySQL, MariaDB, and PostgreSQL via a URL and manage databases, tables, and records.
1. Requirements
Python 3.13 recommended.
A MySQL/MariaDB/PostgreSQL database accessible from the machine where the MCP runs.
For Render: the database must accept connections from the Internet or from the authorized network.
Related MCP server: database-remote-mcp
2. Run Locally
Windows PowerShell:
py -3.13 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy-Item .env.example .envEdit .env and change MCP_API_KEY to a long secret.
Run:
uvicorn server:app --host 0.0.0.0 --port 8000 --reloadHealth:
http://127.0.0.1:8000/health
MCP:
http://127.0.0.1:8000/mcp
3. Test with MCP Inspector
In another terminal:
npx -y @modelcontextprotocol/inspectorConnect to:
http://127.0.0.1:8000/mcp
In the client, add the header:
Authorization: Bearer TU_MCP_API_KEY
4. First Connection
With the crear_conexion tool, send for example:
mysql+pymysql://usuario:password@host:3306/Tareas_sena
The server returns a connection_id. Use that ID in all the other tools.
5. Important Notes About Local MySQL
An MCP deployed on Render cannot use 127.0.0.1 or localhost to reach the MySQL on your PC. From Render, localhost means Render's own server.
For a local DB, you need to run a local connector that acts as a secure bridge. This first version sets up the remote API; the Local Connector is a second piece of the project.
6. Google ADK
Configure:
$env:MCP_URL="https://TU-SERVICIO.onrender.com/mcp"
$env:MCP_API_KEY="TU_TOKEN"And use examples/adk_agent.py as a base.
7. Render
You can connect this repo to Render as a Web Service.
Build:
pip install -r requirements.txtStart:
uvicorn server:app --host 0.0.0.0 --port $PORTVariables:
MCP_API_KEY=<tu-secreto>
MCP_REQUIRE_AUTH=true
PYTHON_VERSION=3.13.5The endpoint will be:
https://TU-SERVICIO.onrender.com/mcp
8. Security
This version uses a static bearer token to protect the remote endpoint. Database URLs are kept only in process memory and are shown redacted in responses.
The DB credentials actually determine which actions are possible. ejecutar_sql_admin can execute arbitrary SQL with that account's permissions and therefore requires confirmar=true.
For production with multiple users/agents, it is recommended to replace the global token with OAuth 2.1/JWT and isolate connections by user identity.
This server cannot be deployed
Maintenance
Related MCP Connectors
- dataOAuthco.thinair
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
- GentkeyOAuthcom.gentkey
One MCP URL for all your connectors — scoped writes, enforced constraints, and a full audit trail.
Build multi-tenant apps over MCP. Schemas, CRUD, deploys — access control enforced server-side.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables connecting to and querying multiple database types (PostgreSQL, MySQL, SQLite) through a unified interface. Supports managing multiple concurrent database connections with connection pooling and SQL query execution through MCP tools.523 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables remote database access (RDBMS and MongoDB) through MCP tools, supporting read/write queries, schema management, and more.-
- AlicenseNot gradedqualityDmaintenanceEnables database interaction (MySQL, PostgreSQL, SQL Server) via MCP, supporting SQL queries and command execution.11 npmMIT
- FlicenseNot gradedqualityCmaintenanceDynamic MCP service for MySQL and PostgreSQL, allowing runtime database connections and SQL queries via tools.-