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.
这个资产会安全暂存
这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。
npx -y tokrepo@latest install a3c39721-f393-4d77-a408-a32c721488e3 --target codex先暂存文件;激活前需要读取暂存 README 和安装计划。
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.
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.
How to use
- Deploy GenAI Toolbox and configure it with your database connection string.
- Connect your AI agent to the toolbox using the MCP protocol.
- The agent can now query, insert, and update data using the exposed MCP tools with parameterized queries.
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
Related on TokRepo
- MCP Postgres Integration — PostgreSQL MCP server configurations
- AI Tools for Database — Database tools for AI workflows
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.
常见问题
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.
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.
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.
Yes. GenAI Toolbox manages database connection pools internally, so multiple concurrent agent requests share connections efficiently without overwhelming the database.
Yes. GenAI Toolbox is open source and published by Google on GitHub. It is free to use and deploy on your own infrastructure.
引用来源 (3)
- GenAI Toolbox GitHub— Open-source MCP server for databases by Google
- GenAI Toolbox README— Support for PostgreSQL, MySQL, Cloud SQL, AlloyDB, Spanner
- Model Context Protocol— MCP protocol for AI agent tool integration
来源与感谢
Created by Google. Licensed under Apache 2.0. googleapis/genai-toolbox — 13,500+ GitHub stars
讨论
相关资产
google-tag-manager-mcp-server — GTM MCP Remote Connector
Connect Google Tag Manager to MCP clients via an OAuth-backed remote server using mcp-remote + npx. Verified 152★; pushed 2026-05-14.
Google Workspace MCP — Gmail Drive Calendar for AI
Official Google CLI with built-in MCP server for all Workspace APIs. One command gives AI agents access to Gmail, Drive, Calendar, Docs, Sheets, and 10+ Google services.
Neon MCP — Serverless Postgres via AI Agents
MCP server for Neon serverless Postgres. Create projects, branch databases, run SQL, optimize queries via natural language. Safe migration workflow with branching. MIT, 574+ stars.
WhatsApp MCP Server — Chat with WhatsApp via AI Agents
MCP server connecting Claude and AI agents to your personal WhatsApp. Search contacts, read messages, send replies and media via natural language.