Connector guide2-minute read5 MCP toolsEN · DE · IT

Come collegare MySQL / MariaDB a Gemini — via MCP

Query a MySQL or MariaDB database directly: list tables, describe columns and run read-only SQL. Installs read-only; credentials are held encrypted rather than in the connection string.

HCBy HelpCode teamAggiornato 2 min read Open source su GitHub

Nessuna carta di credito · 7 giorni di prova · Alternativa self-host disponibile

MySQL / MariaDB

MySQL / MariaDB

Query a MySQL or MariaDB database directly: list tables, describe columns and run read-only SQL. Installs read-only; credentials are held encrypted rather than in the connection string.

tool

5

Regione

INTL

Categoria

Databases

Autenticazione

Connection string

Env vars richieste

MYSQL_HOSTMYSQL_PORTMYSQL_DATABASEMYSQL_USERMYSQL_PASSWORD
Installa con un clic su Cloud

7 giorni di prova gratuita · Nessuna carta di credito

  • Prova gratuita di 7 giorni
    Nessuna carta di credito
  • GDPR & SOC 2 ready
    Dati in UE, log di audit
  • Open source su GitHub
    Open source · AGPL-3.0
  • Funziona con ChatGPT, Claude, Gemini
    Qualsiasi client compatibile MCP

Salta l'installazione. Attivo in meno di 2 minuti.

Avvia una prova gratuita su cloud.anythingmcp.com, aggiungi MySQL / MariaDB con un clic, poi punta il tuo client AI (Claude, ChatGPT, Copilot o Cursor) all'endpoint MCP generato. Niente Docker, niente git clone, nessuna esperienza di sviluppo richiesta.

Inizia la prova gratuita

Summary

Query a MySQL or MariaDB database directly: list tables, describe columns and run read-only SQL. Installs read-only; credentials are held encrypted rather than in the connection string.

Prova a chiedere

Prompt di esempio per MySQL / MariaDB

Clicca su un prompt per copiarlo. Incollalo in Claude, ChatGPT, Cursor, Gemini, Copilot o OpenClaw per eseguirlo contro questo connettore.

MySQL / MariaDB · live via MCP
Condividi
Opus 4.7

Claude è un'AI e può sbagliare. Verifica sempre le risposte.

💡 Niente installazione? Vai direttamente su cloud.anythingmcp.com. Accedi, clicca Connectors → MySQL / MariaDB, inserisci le credenziali, genera una MCP API key — fatto. Niente Docker, niente git clone, niente server locale.

MySQL / MariaDB + Gemini

Query a MySQL or MariaDB database directly: list tables, describe columns and run read-only SQL. Installs read-only; credentials are held encrypted rather than in the connection string.

Prerequisiti

Le istruzioni di setup complete sono incluse nel connettore stesso (visibili nello store quando lo selezioni). Le variabili d'ambiente richieste sono:

MYSQL_HOST, MYSQL_PORT, MYSQL_DATABASE, MYSQL_USER, MYSQL_PASSWORD

Step 1 — Ottieni le credenziali

Setup

  1. Create a dedicated user and grant it only SELECT:
    CREATE USER 'amcp_reader'@'%' IDENTIFIED BY 'change-me';
    GRANT SELECT ON sales.* TO 'amcp_reader'@'%';
    FLUSH PRIVILEGES;
    
    Narrow '%' to the AnythingMCP host if you can — MySQL's host part of the account name is a real access control and worth using.
  2. Set MYSQL_HOST, MYSQL_PORT (3306), MYSQL_DATABASE, MYSQL_USER and MYSQL_PASSWORD.

MariaDB works unchanged. The engine also accepts a mariadb:// DSN and normalises it, because the mysql2 driver only understands mysql://. Either scheme reaches a MariaDB server.

…(continued in the in-app connector instructions)

Step 2 — Installa l'adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Aggiungi il connettore in Gemini

Gemini CLI legge i server MCP da ~/.gemini/settings.json (o %APPDATA%\gemini\settings.json su Windows). Aggiungi:

{
  "mcpServers": {
    "anythingmcp": {
      "httpUrl": "https://cloud.anythingmcp.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_MCP_API_KEY" }
    }
  }
}
  1. Ottieni la tua MCP API key da AnythingMCP → Profilo → MCP API Keys → Nuova Key.
  2. Salva il file e riavvia gemini.
  3. Esegui /mcp nella Gemini CLI — MySQL / MariaDB dovrebbe essere elencato come disponibile.
  4. Vertex AI Studio: passa https://cloud.anythingmcp.com/mcp nell'array tools della richiesta con lo stesso header Bearer.

Tool disponibili

ToolWhat it does
mysql_list_tablesList the tables and views in the database with their schema and, where the server tracks it, an approximate row count
mysql_describe_tableDescribe one table: every column with its data type, nullability and default
mysql_find_columnsFind columns across every table whose name matches a pattern — the fast way to locate where customer e-mail addresses, IBANs or order number
mysql_queryRun a read-only SQL statement against MySQL / MariaDB and return up to 1000 rows
mysql_query_examplesShow worked example queries for MySQL / MariaDB: how to list schemas, find large tables, inspect indexes and check what is running right now

FAQ

Gemini 1.5 Pro o 2.x supportano MCP? Sì — Gemini CLI ≥ 0.4 e la Vertex AI tools API accettano connettori MCP httpUrl con header Bearer.

Prossimi passi

Questa guida ti è stata utile?

Your MySQL / MariaDB agent is one click away.

Install the connector, paste the key, prompt Gemini. Free for 7 days, no credit card.

Guide correlate