Cette page est affichée en anglais. Une traduction française est en cours.
Mar 30, 2026·1 min de lecture

GenAI Toolbox — MCP Server for Databases by Google

Open-source MCP server for databases by Google. Connect AI agents to PostgreSQL, MySQL, Cloud SQL, AlloyDB, and Spanner with built-in auth, connection pooling, and safety. 13K+ stars.

Anonymous
Anonymous · Community
Prêt pour agents

Staging sûr pour cet actif

Cet actif est d'abord staged. Le prompt copié demande à l'agent d'inspecter les fichiers staged avant d'activer scripts, config MCP ou config globale.

Stage only · 17/100Policy : staging
Surface agent
Tout agent MCP/CLI
Type
Mcp Config
Installation
Stage only
Confiance
Confiance : Community
Point d'entrée
GenAI Toolbox — MCP Server for Databases by Google
Commande de staging sûr
npx -y tokrepo@latest install a3c39721-f393-4d77-a408-a32c721488e3 --target codex

Stage les fichiers d'abord; l'activation exige la revue du README et du plan staged.

TL;DR
Google's open-source MCP server connects AI agents to databases with built-in auth, pooling, and safety.
§01

What it is

GenAI Toolbox is an open-source MCP server built by Google that connects AI agents to databases. It supports PostgreSQL, MySQL, Cloud SQL, AlloyDB, and Spanner with built-in authentication, connection pooling, and safety mechanisms to prevent destructive queries.

AI engineers and backend developers use GenAI Toolbox when building agents that need structured data access. Rather than writing custom database tool integrations, you deploy the toolbox and your agent gets safe, parameterized database access through the MCP protocol.

§02

How it saves time or tokens

GenAI Toolbox eliminates the boilerplate of building database tool definitions for AI agents. The MCP interface exposes database operations as typed tools that agents can call directly. Built-in connection pooling reduces latency, and the safety layer prevents agents from running DROP, TRUNCATE, or unscoped DELETE queries.

§03

How to use

  1. Deploy GenAI Toolbox and configure it with your database connection string.
  2. Connect your AI agent to the toolbox using the MCP protocol.
  3. The agent can now query, insert, and update data using the exposed MCP tools with parameterized queries.
§04

Example

# toolbox-config.yaml
sources:
  my-pg-source:
    kind: postgres
    connection_string: 'postgresql://user:pass@localhost:5432/mydb'

tools:
  search-users:
    kind: postgres-sql
    source: my-pg-source
    description: 'Search users by name'
    sql: 'SELECT id, name, email FROM users WHERE name ILIKE $1'
    parameters:
      - name: query
        type: string
        description: 'Name search pattern'
# Start the toolbox server
genai-toolbox --config toolbox-config.yaml --port 5000
§05

Related on TokRepo

§06

Common pitfalls

  • Exposing write operations without proper authentication, allowing agents to modify data without authorization checks.
  • Not defining parameterized queries, which opens the door to SQL injection through agent-generated inputs.
  • Connecting to production databases without read-only replicas, risking performance impact from agent-generated queries.

Questions fréquentes

What databases does GenAI Toolbox support?+

GenAI Toolbox supports PostgreSQL, MySQL, Google Cloud SQL, AlloyDB, and Cloud Spanner. Each database type has a dedicated connector with connection pooling and safety features.

How does the safety layer work?+

The toolbox validates queries against a configurable policy that blocks destructive operations like DROP TABLE, TRUNCATE, and DELETE without WHERE clauses. You define allowed query patterns in the configuration.

Can I use GenAI Toolbox with Claude or GPT agents?+

Yes. GenAI Toolbox implements the MCP protocol, which is supported by Claude, GPT-based agents, and other MCP-compatible clients. Any agent that speaks MCP can use the toolbox.

Is connection pooling built in?+

Yes. GenAI Toolbox manages database connection pools internally, so multiple concurrent agent requests share connections efficiently without overwhelming the database.

Is GenAI Toolbox open source?+

Yes. GenAI Toolbox is open source and published by Google on GitHub. It is free to use and deploy on your own infrastructure.

Sources citées (3)

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires