Universal Database MCP
Universal Database MCP
Удалённый MCP для Google ADK и других MCP-клиентов. Позволяет динамически подключаться к MySQL, MariaDB и PostgreSQL через URL и управлять базами данных, таблицами и записями.
1. Требования
Рекомендуется Python 3.13.
База данных MySQL/MariaDB/PostgreSQL, доступная с компьютера, где запущен MCP.
Для Render: база данных должна принимать подключения из Интернета или авторизованной сети.
Related MCP server: Read-only Database MCP
2. Локальный запуск
Windows PowerShell:
py -3.13 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy-Item .env.example .envОтредактируйте .env и замените MCP_API_KEY на длинный секрет.
Выполните:
uvicorn server:app --host 0.0.0.0 --port 8000 --reloadПроверка:
http://127.0.0.1:8000/health
MCP:
http://127.0.0.1:8000/mcp
3. Тестирование с MCP Inspector
В другом терминале:
npx -y @modelcontextprotocol/inspectorПодключитесь к:
http://127.0.0.1:8000/mcp
В клиенте добавьте заголовок:
Authorization: Bearer TU_MCP_API_KEY
4. Первое подключение
С помощью инструмента crear_conexion отправьте, например:
mysql+pymysql://usuario:password@host:3306/Tareas_sena
Сервер возвращает connection_id. Используйте этот ID во всех остальных инструментах.
5. Важно о локальном MySQL
MCP, развернутый в Render, НЕ может использовать 127.0.0.1 или localhost для доступа к MySQL на вашем ПК. В Render localhost означает сам сервер Render.
Для локальной БД нужно запустить локальный коннектор, который будет выполнять роль безопасного моста. Эта первая версия подготавливает удаленный API; Local Connector — вторая часть проекта.
6. Google ADK
Настройте:
$env:MCP_URL="https://TU-SERVICIO.onrender.com/mcp"
$env:MCP_API_KEY="TU_TOKEN"И используйте examples/adk_agent.py как основу.
7. Render
Вы можете подключить этот репозиторий к Render как Web Service.
Сборка:
pip install -r requirements.txtЗапуск:
uvicorn server:app --host 0.0.0.0 --port $PORTПеременные:
MCP_API_KEY=<tu-secreto>
MCP_REQUIRE_AUTH=true
PYTHON_VERSION=3.13.5Эндпоинт будет:
https://TU-SERVICIO.onrender.com/mcp
8. Безопасность
Эта версия использует статический bearer-токен для защиты удаленного эндпоинта. URL баз данных хранятся только в памяти процесса и показываются в ответах в замаскированном виде.
Учетные данные БД фактически определяют, какие действия возможны. ejecutar_sql_admin может выполнять произвольный SQL с правами этой учетной записи, поэтому требует confirmar=true.
Для продакшена с несколькими пользователями/агентами рекомендуется заменить глобальный токен на OAuth 2.1/JWT и изолировать подключения по идентичности пользователя.
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