Universal Database MCP
Universal Database MCP
Google ADK およびその他の MCP クライアント向けのリモート MCP。URL を使用して MySQL、MariaDB、PostgreSQL に動的に接続し、データベース、テーブル、レコードを管理できます。
1. 要件
Python 3.13 推奨。
MCP が実行されているマシンからアクセスできる MySQL/MariaDB/PostgreSQL データベース。
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 に関する重要事項
Render にデプロイされた MCP は、PC の MySQL に到達するために 127.0.0.1 または localhost を使用できません。Render から見ると、localhost は Render サーバー自身を指します。
ローカル データベースの場合は、安全なブリッジとして機能するローカル コネクタを実行する必要があります。この最初のバージョンではリモート API が準備されており、Local Connector はプロジェクトの 2 つ目のコンポーネントです。
6. Google ADK
設定:
$env:MCP_URL="https://TU-SERVICIO.onrender.com/mcp"
$env:MCP_API_KEY="TU_TOKEN"そして、examples/adk_agent.py をベースとして使用します。
7. Render
このリポジトリを Web Service として Render に接続できます。
ビルド:
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. セキュリティ
このバージョンでは、リモート エンドポイントを保護するために静的ベアラー トークンを使用します。データベース URL はプロセスのメモリ内にのみ保持され、レスポンスではマスクされて表示されます。
データベースの資格情報が、実際に可能なアクションを決定します。ejecutar_sql_admin はそのアカウントの権限で任意の SQL を実行できるため、confirmar=true が必要です。
複数のユーザー/エージェントによる本番運用では、グローバル トークンを OAuth 2.1/JWT に置き換え、ユーザー ID ごとに接続を分離することを推奨します。
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