Skip to main content
Glama
Jorge-240

Universal Database MCP

by Jorge-240

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 서버 자체를 의미합니다.

로컬 DB의 경우 안전한 브리지 역할을 하는 로컬 커넥터를 실행해야 합니다. 이 첫 번째 버전은 원격 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. 보안

이 버전은 원격 엔드포인트를 보호하기 위해 정적 베어러 토큰을 사용합니다. 데이터베이스 URL은 프로세스 메모리에만 유지되며 응답에서는 마스킹되어 표시됩니다.

데이터베이스 자격 증명이 실제로 가능한 작업을 결정합니다. ejecutar_sql_admin은 해당 계정의 권한으로 임의의 SQL을 실행할 수 있으므로 confirmar=true를 요구합니다.

여러 사용자/에이전트가 있는 프로덕션 환경에서는 전역 토큰을 OAuth 2.1/JWT로 대체하고 사용자 ID별로 연결을 격리하는 것이 좋습니다.

Maintenance

ActivityMaintained
ResponsivenessSyncing

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

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables 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.
    5
    19
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
    83
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables MCP-compatible clients to interact with PostgreSQL databases with multi-database support and connection pooling.
    13
    1
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables remote database access (RDBMS and MongoDB) through MCP tools, supporting read/write queries, schema management, and more.

Latest Blog Posts

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