Universal Database MCP
Universal Database MCP
MCP remoto para Google ADK y otros clientes MCP. Permite conectar dinámicamente MySQL, MariaDB y PostgreSQL mediante una URL y administrar bases de datos, tablas y registros.
1. Requisitos
Python 3.13 recomendado.
Una base de datos MySQL/MariaDB/PostgreSQL accesible desde el equipo donde corre el MCP.
Para Render: la base de datos debe aceptar conexiones desde Internet o desde la red autorizada.
Related MCP server: Read-only Database MCP
2. Ejecutar localmente
Windows PowerShell:
py -3.13 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy-Item .env.example .envEdita .env y cambia MCP_API_KEY por un secreto largo.
Ejecuta:
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. Probar con MCP Inspector
En otra terminal:
npx -y @modelcontextprotocol/inspectorConecta a:
http://127.0.0.1:8000/mcp
En el cliente, agrega el header:
Authorization: Bearer TU_MCP_API_KEY
4. Primera conexión
Con la tool crear_conexion, envía por ejemplo:
mysql+pymysql://usuario:password@host:3306/Tareas_sena
El servidor devuelve un connection_id. Usa ese ID en todas las demás tools.
5. Importante sobre MySQL local
Un MCP desplegado en Render NO puede usar 127.0.0.1 o localhost para llegar al MySQL de tu PC. Desde Render, localhost significa el propio servidor de Render.
Para una BD local necesitas ejecutar un conector local que haga de puente seguro. Esta primera versión deja preparada la API remota; el Local Connector es una segunda pieza del proyecto.
6. Google ADK
Configura:
$env:MCP_URL="https://TU-SERVICIO.onrender.com/mcp"
$env:MCP_API_KEY="TU_TOKEN"Y usa examples/adk_agent.py como base.
7. Render
Puedes conectar este repo a Render como 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.5El endpoint será:
https://TU-SERVICIO.onrender.com/mcp
8. Seguridad
Esta versión usa un bearer token estático para proteger el endpoint remoto. Las URL de bases de datos se mantienen únicamente en memoria del proceso y se muestran redactadas en respuestas.
Las credenciales de la BD determinan realmente qué acciones son posibles. ejecutar_sql_admin puede ejecutar SQL arbitrario con los permisos de esa cuenta y por eso exige confirmar=true.
Para producción con múltiples usuarios/agentes se recomienda sustituir el token global por OAuth 2.1/JWT y aislar las conexiones por identidad del usuario.
This server cannot be installed
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 Connectors
Read-only PostgreSQL, MySQL, SQL Server access via MCP — 24 dialect-aware hosted tools.
One MCP URL for all your connectors — scoped writes, enforced constraints, and a full audit trail.
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
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.519MIT
- AlicenseNot gradedqualityDmaintenanceEnables read-only access to PostgreSQL and MySQL/MariaDB databases through MCP tools for listing tables, previewing data, and running SELECT queries with a built-in UI for managing database configurations.83MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible clients to interact with PostgreSQL databases with multi-database support and connection pooling.131MIT
- FlicenseNot gradedqualityCmaintenanceEnables remote database access (RDBMS and MongoDB) through MCP tools, supporting read/write queries, schema management, and more.
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/Jorge-240/universal-database-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server