Skip to content
MCP Shelf

MCP Toolbox for Databases

Google's toolbox for Postgres, MySQL, BigQuery, Spanner and other databases.

View on GitHub
  • Started in our test
  • ★ 16.7K GitHub stars
  • 31.2K downloads a week
  • Last commit 28 Oct 2026

What is MCP Toolbox for Databases?

MCP Toolbox for Databases is Google's open-source MCP server that connects AI assistants to dozens of databases, from BigQuery and AlloyDB to Postgres, MySQL and MongoDB, with prebuilt or custom tools.

Tools
29
Runs on
Your computer
Licence
Apache-2.0
GitHub stars
16.7K

Good for

  • Teams on Google Cloud databases
  • Exposing a fixed set of approved queries
  • One server for several database types

You'll need

  • Node.js 18 or newer
  • Connection details for your database

Started in our testWe ran this exact config on 26 Oct 2026: it started and answered with 29 tools. @toolbox-sdk/server on npm is published from googleapis/mcp-toolbox.

MCP Shelf take

We started MCP Toolbox for Databases on our own test machine on 26 Oct 2026 and it answered with 29 tools. 22 of the 29 only read; the other 7 can change things. Every tool comes with a useful description, all of them say whether they change things, and the tool list costs about 3,000 tokens of context before you ask a thing. It is the most-starred of the 6 servers in its category on our shelf (16.7K stars, with 31.2K downloads a week).
MCP Shelf tests: numbers from our own runs, not the README · tested on 26 Oct 2026

What can MCP Toolbox for Databases read and change?

It can read

  • Whichever databases you configure as sources, from Postgres and MySQL to BigQuery and MongoDB

It can change

  • Data, if you load a prebuilt set with execute_sql or write tools that update rows
  • Nothing else when you only define read queries in tools.yaml

Safer setup: Skip the prebuilt execute_sql and write your own tools.yaml with fixed queries, and give the database user read-only rights.

MCP Toolbox for Databases in more detail

Toolbox is a server from Google that ships ready-made tool sets for a long list of databases. Pick one with --prebuilt and pass connection details as environment variables, or write your own tools file to expose only the queries you approve.

That second option is the reason to choose it: you can give an assistant five named queries instead of raw SQL.

Made by
Google (googleapis)
Latest version
1.15.0 (23 Oct 2026)
Downloads
31.2K a week
Last commit
28 Oct 2026
Setup checked
27 Oct 2026
Page updated
27 Oct 2026

What's in the pod

What tools does MCP Toolbox for Databases have?

We found 29 tools when we started it on 26 Oct 2026. 22 only read. The rest can change things, so keep your app's "ask before each tool call" setting on for them.

How we tested it: Started with the published config against a local Postgres 16 database.

Runs commands1 tool · Can start programs or run code.

ToolWhat it is for
execute_sqlRuns a SQL statement the agent writes against the connected database.

Changes things6 tools · Can create, edit, send or delete.

ToolWhat it is for
get_query_planShows how Postgres would run a query, as JSON, without running it.
list_autovacuum_configurationsShows the server's autovacuum settings.
list_invalid_indexesFinds broken indexes that take space but the planner cannot use.
list_memory_configurationsShows the server's memory settings.
list_replication_slotsLists replication slots and how far behind each one is.
list_top_bloated_tablesFinds the tables with the most dead rows waiting to be cleaned up.

Only reads22 tools · Looks things up and changes nothing.

ToolWhat it is for
database_overviewGives a quick snapshot of the server: version, uptime, whether it is a replica and connection counts.
get_column_cardinalityEstimates how many distinct values each column of a table holds.
list_active_queriesShows the queries running right now, longest first.
list_available_extensionsLists extensions that could be installed on this server.
list_database_statsShows activity and size figures for each database on the server.
list_indexesLists your indexes with their size and how often they are used.
list_installed_extensionsLists the extensions already installed.
list_locksShows which sessions hold locks and on what.
list_pg_settingsLists server configuration values.
list_publication_tablesLists tables included in logical replication publications.
list_query_statsRanks past queries by total time, from pg_stat_statements.
list_rolesLists the user roles and their rights.
list_schemasLists the schemas in the database.
list_sequencesLists sequences and their current values.
list_stored_procedureLists stored procedures with their language and definition.
list_table_statsShows table activity, such as sequential scans and row counts.
list_tablesLists the tables in the database with their columns, so the agent learns the schema.
list_tablespacesLists tablespaces and their size.
list_triggersLists triggers and which tables they fire on.
list_viewsLists views and their definitions.
long_running_transactionsFinds transactions that have been open longer than a limit you set.
replication_statsShows each replica's lag and connection details.

Tool groups

--prebuilt=postgres
Ready-made tools for PostgreSQL. Swap the name for mysql, sqlserver, oracle, mongodb, redis, snowflake, clickhouse, neo4j and more.
--prebuilt=bigquery
Google Cloud data: also alloydb-postgres, cloud-sql-postgres, cloud-sql-mysql, spanner and firestore.
--prebuilt=<database>/<toolset>
Load only part of a prebuilt set, such as the data tools without the admin ones.
tools.yaml
Your own tools: fixed, parameterised queries you write once, so the agent can only run what you allowed.

Grouped and described by us. The README on GitHub lists the inputs each tool takes.

How clearly it describes its tools to your assistant

Tools with a description
29 of 29
Say if they change things
29 of 29
Context it takes, at least
~3,000 tokens

Every tool says whether it only reads or can change things, so a client can ask before the risky ones.

From the tool list it sent us. The token figure counts names, descriptions and input names; the full schemas your client loads add more.

How do I install MCP Toolbox for Databases?

Install steps from the MCP Toolbox for Databases README

The project's own instructions, copied from its README on GitHub on 28 Oct 2026 under its Apache-2.0 licence. They are the source of truth; the ready-made configs further down are built from them. The rest of the README is in the README tab.

Quick Start: Prebuilt Tools

Stop context-switching and let your AI assistant become a true co-developer. By connecting your IDE to your databases with MCP Toolbox, you can query your data in plain English, automate schema discovery and management, and generate database-aware code.

You can use the Toolbox in any MCP-compatible IDE or client (e.g., Gemini CLI, Google Antigravity, Claude Code, Codex, etc.) by configuring the MCP server.

Prebuilt tools are also conveniently available via the Google Antigravity MCP Store with a simple click-to-install experience.

  1. Add the following to your client's MCP configuration file (usually mcp.json or claude_desktop_config.json):

    {
      "mcpServers": {
        "toolbox-postgres": {
          "command": "npx",
          "args": [
            "-y",
            "@toolbox-sdk/server",
            "--prebuilt=postgres",
            "--stdio"
          ]
        }
      }
    }
    
  2. Set the appropriate environment variables to connect, see the Prebuilt Tools Reference.

When you run Toolbox with a --prebuilt=<database> flag, you instantly get access to standard tools to interact with that database. You can also specify a specific toolset using the --prebuilt=<database>/<toolset> syntax (e.g., --prebuilt=postgres/data to only load SQL tools).

Supported databases currently include:

  • Google Cloud: AlloyDB, BigQuery, Cloud SQL (PostgreSQL, MySQL, SQL Server), Spanner, Firestore, Knowledge Catalog (formerly known as Dataplex).
  • Other Databases: PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, MongoDB, Redis, Elasticsearch, CockroachDB, ClickHouse, Couchbase, Neo4j, Snowflake, Trino, and more.

For a full list of available tools and their capabilities across all supported databases, see the Prebuilt Tools Reference.

See the Install & Run the Toolbox server section for different execution methods like Docker or binaries.

Tip: For users looking for a managed solution, Google Cloud MCP Servers provide a managed MCP experience with prebuilt tools; you can learn more about the differences here.


Quick Start: Custom Tools

Toolbox can also be used as a framework for customized tools. The primary way to configure Toolbox is through the tools.yaml file. If you have multiple files, you can tell Toolbox which to load with the --config tools.yaml flag.

You can find more detailed reference documentation to all resource types in the Resources.

Sources

The sources section of your tools.yaml defines what data sources your Toolbox should have access to. Most tools will have at least one source to execute against.

kind: source
name: my-pg-source
type: postgres
host: 127.0.0.1
port: 5432
database: toolbox_db
user: toolbox_user
password: my-password

For more details on configuring different types of sources, see the Sources.

Tools

The tools section of a tools.yaml define the actions an agent can take: what type of tool it is, which source(s) it affects, what parameters it uses, etc.

kind: tool
name: search-hotels-by-name
type: postgres-sql
source: my-pg-source
description: Search for hotels based on name.
parameters:
  - name: name
    type: string
    description: The name of the hotel.
statement: SELECT * FROM hotels WHERE name ILIKE '%' || $1 || '%';

For more details on configuring different types of tools, see the Tools.

Toolsets

The toolsets section of your tools.yaml allows you to define groups of tools that you want to be able to load together. This can be useful for defining different groups based on agent or application.

kind: toolset
name: my_first_toolset
tools:
    - my_first_tool
    - my_second_tool
---
kind: toolset
name: my_second_toolset
tools:
    - my_second_tool
    - my_third_tool
Prompts

The prompts section of a tools.yaml defines prompts that can be used for interactions with LLMs.

kind: prompt
name: code_review
description: "Asks the LLM to analyze code quality and suggest improvements."
messages:
  - content: >
         Please review the following code for quality, correctness,
         and potential improvements: \n\n{{.code}}
arguments:
  - name: "code"
    description: "The code to review"

For more details on configuring prompts, see the Prompts.

Resources

The resources and resourceTemplates sections of your tools.yaml define read-only content, files, or parameterized directory trees that can be discovered and retrieved by MCP clients:

kind: resource
name: database_schema_ddl
type: text
description: "Core table definitions and constraints."
mimeType: text/x-sql
text: |
  CREATE TABLE customers (
    id SERIAL PRIMARY KEY,
    name VARCHAR(255) NOT NULL,
    email VARCHAR(255) UNIQUE NOT NULL
  );
---
kind: resource
name: database_schema
type: file
description: "PostgreSQL schema definition."
path: "./schema.sql"
---
kind: resourceTemplate
name: server_logs
type: file
description: "Application log files."
uriTemplate: "file:///var/log/{path}"
allowedPaths:
  - "/var/log"

For more details on configuring resources and resource templates, see Resources.


Install & Run the Toolbox server

You can run Toolbox directly with a configuration file:

npx @toolbox-sdk/server --config tools.yaml

This runs the latest version of the Toolbox server with your configuration file.

Note: This method is optimized for convenience rather than performance. For a more standard and reliable installation, please use the binary or container image as described in Install & Run the Toolbox server.

Install Toolbox

For the latest version, check the releases page and use the following instructions for your OS and CPU architecture.

Binary

To install Toolbox as a binary:

Linux (AMD64)

To install Toolbox as a binary on Linux (AMD64):

# see releases page for other versions
export VERSION=1.15.0
curl -L -o toolbox https://storage.googleapis.com/mcp-toolbox-for-databases/v$VERSION/linux/amd64/toolbox
chmod +x toolbox
macOS (Apple Silicon)

To install Toolbox as a binary on macOS (Apple Silicon):

# see releases page for other versions
export VERSION=1.15.0
curl -L -o toolbox https://storage.googleapis.com/mcp-toolbox-for-databases/v$VERSION/darwin/arm64/toolbox
chmod +x toolbox
macOS (Intel)

To install Toolbox as a binary on macOS (Intel):

# see releases page for other versions
export VERSION=1.15.0
curl -L -o toolbox https://storage.googleapis.com/mcp-toolbox-for-databases/v$VERSION/darwin/amd64/toolbox
chmod +x toolbox
Windows (Command Prompt)

To install Toolbox as a binary on Windows (Command Prompt):

:: see releases page for other versions
set VERSION=1.15.0
curl -o toolbox.exe "https://storage.googleapis.com/mcp-toolbox-for-databases/v%VERSION%/windows/amd64/toolbox.exe"
Windows (PowerShell)

To install Toolbox as a binary on Windows (PowerShell):

# see releases page for other versions
$VERSION = "1.15.0"
curl.exe -o toolbox.exe "https://storage.googleapis.com/mcp-toolbox-for-databases/v$VERSION/windows/amd64/toolbox.exe"
Windows ARM64 (Command Prompt)

To install Toolbox as a binary on Windows ARM64 (Command Prompt):

:: see releases page for other versions
set VERSION=1.15.0
curl -o toolbox.exe "https://storage.googleapis.com/mcp-toolbox-for-databases/v%VERSION%/windows/arm64/toolbox.exe"
Windows ARM64 (PowerShell)

To install Toolbox as a binary on Windows ARM64 (PowerShell):

# see releases page for other versions
$VERSION = "1.15.0"
curl.exe -o toolbox.exe "https://storage.googleapis.com/mcp-toolbox-for-databases/v$VERSION/windows/arm64/toolbox.exe"
Container image You can also install Toolbox as a container:
# see releases page for other versions
export VERSION=1.15.0
docker pull us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION
Homebrew

To install Toolbox using Homebrew on macOS or Linux:

brew install mcp-toolbox
Compile from source

To install from source, ensure you have the latest version of Go installed, and then run the following command:

go install github.com/googleapis/mcp-toolbox@v1.15.0
Gemini CLI Check out the [Gemini CLI extensions](https://geminicli.com/extensions/) to install prebuilt tools for specific databases like AlloyDB, BigQuery, and Cloud SQL directly into Gemini CLI.
# Install Gemini CLI
npm install -g @google/gemini-cli
# Install the extension
gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-postgres
# Run Gemini CLI
gemini

Interact with your custom tools using natural language through the Gemini CLI.

# Install the extension
gemini extensions install https://github.com/gemini-cli-extensions/mcp-toolbox
Run Toolbox

Configure a tools.yaml to define your tools, and then execute toolbox to start the server:

Binary

To run Toolbox from binary:

./toolbox --config "tools.yaml"

ⓘ Note
Toolbox enables dynamic reloading by default. To disable, use the --disable-reload flag.

Container image

To run the server after pulling the container image:

export VERSION=0.24.0 # Use the version you pulled
docker run -p 5000:5000 \
-v $(pwd)/tools.yaml:/app/tools.yaml \
us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION \
--config "/app/tools.yaml"

ⓘ Note
The -v flag mounts your local tools.yaml into the container, and -p maps the container's port 5000 to your host's port 5000.

Source

To run the server directly from source, navigate to the project root directory and run:

go run .

ⓘ Note
This command runs the project from source, and is more suitable for development and testing. It does not compile a binary into your $GOPATH. If you want to compile a binary instead, refer the Developer Documentation.

Homebrew

If you installed Toolbox using Homebrew, the toolbox binary is available in your system path. You can start the server with the same command:

toolbox --config "tools.yaml"
NPM

To run Toolbox directly without manually downloading the binary (requires Node.js):

npx @toolbox-sdk/server --config tools.yaml
Gemini CLI After installing a [Gemini CLI extensions](https://geminicli.com/extensions/), the prebuilt tools will be available during use.
# Run Gemini CLI
gemini

# List extensions
/extensions list
# List MCP servers
/mcp list

You can use toolbox help for a full list of flags! To stop the server, send a terminate signal (ctrl+c on most platforms).

For more detailed documentation on deploying to different environments, check out the resources in the Deploy Toolbox section


What you need first

  • Node.js 18 or newer
  • Connection details for your database

Add MCP Toolbox for Databases to your app

Pick your app for a ready-to-paste snippet and where it goes, built from the steps above.

Where it goes: Your terminal, in the project folder

Claude Code
claude mcp add mcp-toolbox-for-databases -e POSTGRES_HOST=localhost -e POSTGRES_PORT=5432 -e POSTGRES_DATABASE=dbname -e POSTGRES_USER=user -e POSTGRES_PASSWORD=password -- npx -y @toolbox-sdk/server --prebuilt=postgres --stdio

Swap postgres for your database in --prebuilt, and the POSTGRES_ variables for that database's settings from the prebuilt reference. --prebuilt=postgres/data loads only the SQL tools.

Checked against the project's own install docs on 27 Oct 2026: googleapis/mcp-toolbox README, mcp-toolbox.dev/documentation/configuration/prebuilt-configs.

Did this work for you?

Projects change their install steps often. If MCP Toolbox for Databases did not install, or something here no longer matches the project, tell us and we will check it against the README and fix the page.

New to this? See the setup guides for Claude Code, Cursor, Claude Desktop, VS Code, Codex and ChatGPT. If it will not start, test it in MCP Inspector and look up the error in Fixing MCP server errors.

MCP Toolbox for Databases not working? Common fixes

Prebuilt tools cannot connect
Each database expects its own environment variables. Check the prebuilt tools reference for the exact names and set them in the client config.
The client only shows some tools
You may be connected to a toolset URL. Use /mcp for everything or /mcp/<toolset> for one group.
Unsure whether a custom tool works
Run toolbox --ui and try it by hand first.

How do I configure MCP Toolbox for Databases?

Names are exactly as the project spells them. Required ones are marked.

SettingWhat it does
--prebuiltCommand line flagStarts with a ready-made tool set for one database type, with no config file.--prebuilt=postgres
--stdioCommand line flagTalks to a client over standard input and output, which most desktop clients need.
--configCommand line flagPath to a tools.yaml that defines your sources, tools and toolsets.--config tools.yaml
POSTGRES_HOSTEnvironment variableConnection details for the prebuilt Postgres tools, alongside POSTGRES_PORT, POSTGRES_DATABASE, POSTGRES_USER and POSTGRES_PASSWORD. Other databases use their own names.
--uiCommand line flagOpens a local web page to try out your tools before an agent uses them.
--telemetry-otlpCommand line flagSends traces and metrics to any OpenTelemetry collector.

MCP Toolbox for Databases FAQ

How do I add MCP Toolbox for Databases to Claude Code?

Run claude mcp add with the connection details as -e variables (for Postgres: POSTGRES_HOST, POSTGRES_PORT, POSTGRES_DATABASE, POSTGRES_USER, POSTGRES_PASSWORD) followed by -- npx -y @toolbox-sdk/server --prebuilt=postgres --stdio. Change the prebuilt name for other databases.

Which databases does MCP Toolbox support?

Google Cloud's AlloyDB, BigQuery, Cloud SQL, Spanner and Firestore, plus PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, MongoDB, Redis, Elasticsearch, ClickHouse, Neo4j, Snowflake, Trino and more. Each has a --prebuilt name and its own environment variables.

Is MCP Toolbox only for Google Cloud?

No. Google makes it, but it works with databases anywhere, including a Postgres or MySQL on your own laptop. For Google's own databases there are also managed Google Cloud MCP servers if you would rather not run it yourself.

Is MCP Toolbox for Databases free?

Yes. It is open source under the Apache 2.0 licence. You pay only for the databases it connects to.

What is tools.yaml in MCP Toolbox?

It is where you define your own sources and tools: each tool is a fixed, parameterised query with a description. Passing it with --config instead of --prebuilt limits the assistant to queries you wrote and tested, which suits production data.

Is MCP Toolbox safe on production data?

The prebuilt tools include execute_sql, which runs whatever the model writes. For production, define fixed queries in tools.yaml and connect with a database user that only has the rights those queries need.

Why do the prebuilt tools fail to connect?

Each prebuilt reads its connection from environment variables, so a missing or misspelt variable, or a database not reachable from your machine, stops it. Check the names against the prebuilt reference for your database.

Can I use MCP Toolbox tools in my own agent?

Yes. Its SDKs for Python, JavaScript, Go and Java load the same tools into frameworks such as LangChain, LlamaIndex and Google's ADK, so your app and your coding assistant share one definition.

MCP Toolbox for Databases README

This is the project's own README from googleapis/mcp-toolbox, written by Google (googleapis), and shared under its Apache-2.0 licence. We copied it on 28 Oct 2026, so the version on GitHub may be newer.

logo

MCP Toolbox for Databases

MCP Toolbox for Databases is an open source Model Context Protocol (MCP) server that connects your AI agents, IDEs, and applications directly to your enterprise databases.

architecture

It serves a dual purpose:

  1. Ready-to-use MCP Server (Build-Time): Instantly connect Gemini CLI, Google Antigravity, Claude Code, Codex, or other MCP clients to your databases using our prebuilt generic tools. Talk to your data, explore schemas, and generate code without writing boilerplate.
  2. Custom Tools Framework (Run-Time): A robust framework to build specialized, highly secure AI tools for your production agents. Define structured queries, semantic search, and NL2SQL capabilities safely and easily.

This README provides a brief overview. For comprehensive details, see the full documentation.

Important:
Repository Name Update: The genai-toolbox repository has been officially renamed to mcp-toolbox. To ensure your local environment reflects the new name, you may update your remote: git remote set-url origin https://github.com/googleapis/mcp-toolbox.git

Note: This solution was originally named “Gen AI Toolbox for Databases” (github.com/googleapis/genai-toolbox) as its initial development predated MCP, but was renamed to align with the MCP compatibility.

Table of Contents

  • Why MCP Toolbox?
  • Quick Start: Prebuilt Tools
  • Quick Start: Custom Tools
  • Install & Run the Toolbox server
  • Connect to Toolbox
    • MCP Client
    • Toolbox SDKs: Integrate with your Application
  • Additional Features
  • Versioning
  • Contributing
  • Community

Why MCP Toolbox?

  • Out-of-the-Box Database Access: Prebuilt generic tools for instant data exploration (e.g., list_tables, execute_sql) directly from your IDE or CLI.
  • Custom Tools Framework: Build production-ready tools with your own predefined logic, ensuring safety through Restricted Access, Structured Queries, and Semantic Search.
  • Simplified Development: Integrate tools into your Agent Development Kit (ADK), LangChain, LlamaIndex, or custom agents in less than 10 lines of code.
  • Better Performance: Handles connection pooling, integrated auth (IAM), and end-to-end observability (OpenTelemetry) out of the box.
  • Enhanced Security: Integrated authentication for more secure access to your data.
  • End-to-end Observability: Out of the box metrics and tracing with built-in support for OpenTelemetry.

Quick Start: Prebuilt Tools

Stop context-switching and let your AI assistant become a true co-developer. By connecting your IDE to your databases with MCP Toolbox, you can query your data in plain English, automate schema discovery and management, and generate database-aware code.

You can use the Toolbox in any MCP-compatible IDE or client (e.g., Gemini CLI, Google Antigravity, Claude Code, Codex, etc.) by configuring the MCP server.

Prebuilt tools are also conveniently available via the Google Antigravity MCP Store with a simple click-to-install experience.

  1. Add the following to your client's MCP configuration file (usually mcp.json or claude_desktop_config.json):

    {
      "mcpServers": {
        "toolbox-postgres": {
          "command": "npx",
          "args": [
            "-y",
            "@toolbox-sdk/server",
            "--prebuilt=postgres",
            "--stdio"
          ]
        }
      }
    }
    
  2. Set the appropriate environment variables to connect, see the Prebuilt Tools Reference.

When you run Toolbox with a --prebuilt=<database> flag, you instantly get access to standard tools to interact with that database. You can also specify a specific toolset using the --prebuilt=<database>/<toolset> syntax (e.g., --prebuilt=postgres/data to only load SQL tools).

Supported databases currently include:

  • Google Cloud: AlloyDB, BigQuery, Cloud SQL (PostgreSQL, MySQL, SQL Server), Spanner, Firestore, Knowledge Catalog (formerly known as Dataplex).
  • Other Databases: PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, MongoDB, Redis, Elasticsearch, CockroachDB, ClickHouse, Couchbase, Neo4j, Snowflake, Trino, and more.

For a full list of available tools and their capabilities across all supported databases, see the Prebuilt Tools Reference.

See the Install & Run the Toolbox server section for different execution methods like Docker or binaries.

Tip: For users looking for a managed solution, Google Cloud MCP Servers provide a managed MCP experience with prebuilt tools; you can learn more about the differences here.


Quick Start: Custom Tools

Toolbox can also be used as a framework for customized tools. The primary way to configure Toolbox is through the tools.yaml file. If you have multiple files, you can tell Toolbox which to load with the --config tools.yaml flag.

You can find more detailed reference documentation to all resource types in the Resources.

Sources

The sources section of your tools.yaml defines what data sources your Toolbox should have access to. Most tools will have at least one source to execute against.

kind: source
name: my-pg-source
type: postgres
host: 127.0.0.1
port: 5432
database: toolbox_db
user: toolbox_user
password: my-password

For more details on configuring different types of sources, see the Sources.

Tools

The tools section of a tools.yaml define the actions an agent can take: what type of tool it is, which source(s) it affects, what parameters it uses, etc.

kind: tool
name: search-hotels-by-name
type: postgres-sql
source: my-pg-source
description: Search for hotels based on name.
parameters:
  - name: name
    type: string
    description: The name of the hotel.
statement: SELECT * FROM hotels WHERE name ILIKE '%' || $1 || '%';

For more details on configuring different types of tools, see the Tools.

Toolsets

The toolsets section of your tools.yaml allows you to define groups of tools that you want to be able to load together. This can be useful for defining different groups based on agent or application.

kind: toolset
name: my_first_toolset
tools:
    - my_first_tool
    - my_second_tool
---
kind: toolset
name: my_second_toolset
tools:
    - my_second_tool
    - my_third_tool
Prompts

The prompts section of a tools.yaml defines prompts that can be used for interactions with LLMs.

kind: prompt
name: code_review
description: "Asks the LLM to analyze code quality and suggest improvements."
messages:
  - content: >
         Please review the following code for quality, correctness,
         and potential improvements: \n\n{{.code}}
arguments:
  - name: "code"
    description: "The code to review"

For more details on configuring prompts, see the Prompts.

Resources

The resources and resourceTemplates sections of your tools.yaml define read-only content, files, or parameterized directory trees that can be discovered and retrieved by MCP clients:

kind: resource
name: database_schema_ddl
type: text
description: "Core table definitions and constraints."
mimeType: text/x-sql
text: |
  CREATE TABLE customers (
    id SERIAL PRIMARY KEY,
    name VARCHAR(255) NOT NULL,
    email VARCHAR(255) UNIQUE NOT NULL
  );
---
kind: resource
name: database_schema
type: file
description: "PostgreSQL schema definition."
path: "./schema.sql"
---
kind: resourceTemplate
name: server_logs
type: file
description: "Application log files."
uriTemplate: "file:///var/log/{path}"
allowedPaths:
  - "/var/log"

For more details on configuring resources and resource templates, see Resources.


Install & Run the Toolbox server

You can run Toolbox directly with a configuration file:

npx @toolbox-sdk/server --config tools.yaml

This runs the latest version of the Toolbox server with your configuration file.

Note: This method is optimized for convenience rather than performance. For a more standard and reliable installation, please use the binary or container image as described in Install & Run the Toolbox server.

Install Toolbox

For the latest version, check the releases page and use the following instructions for your OS and CPU architecture.

Binary

To install Toolbox as a binary:

Linux (AMD64)

To install Toolbox as a binary on Linux (AMD64):

# see releases page for other versions
export VERSION=1.15.0
curl -L -o toolbox https://storage.googleapis.com/mcp-toolbox-for-databases/v$VERSION/linux/amd64/toolbox
chmod +x toolbox
macOS (Apple Silicon)

To install Toolbox as a binary on macOS (Apple Silicon):

# see releases page for other versions
export VERSION=1.15.0
curl -L -o toolbox https://storage.googleapis.com/mcp-toolbox-for-databases/v$VERSION/darwin/arm64/toolbox
chmod +x toolbox
macOS (Intel)

To install Toolbox as a binary on macOS (Intel):

# see releases page for other versions
export VERSION=1.15.0
curl -L -o toolbox https://storage.googleapis.com/mcp-toolbox-for-databases/v$VERSION/darwin/amd64/toolbox
chmod +x toolbox
Windows (Command Prompt)

To install Toolbox as a binary on Windows (Command Prompt):

:: see releases page for other versions
set VERSION=1.15.0
curl -o toolbox.exe "https://storage.googleapis.com/mcp-toolbox-for-databases/v%VERSION%/windows/amd64/toolbox.exe"
Windows (PowerShell)

To install Toolbox as a binary on Windows (PowerShell):

# see releases page for other versions
$VERSION = "1.15.0"
curl.exe -o toolbox.exe "https://storage.googleapis.com/mcp-toolbox-for-databases/v$VERSION/windows/amd64/toolbox.exe"
Windows ARM64 (Command Prompt)

To install Toolbox as a binary on Windows ARM64 (Command Prompt):

:: see releases page for other versions
set VERSION=1.15.0
curl -o toolbox.exe "https://storage.googleapis.com/mcp-toolbox-for-databases/v%VERSION%/windows/arm64/toolbox.exe"
Windows ARM64 (PowerShell)

To install Toolbox as a binary on Windows ARM64 (PowerShell):

# see releases page for other versions
$VERSION = "1.15.0"
curl.exe -o toolbox.exe "https://storage.googleapis.com/mcp-toolbox-for-databases/v$VERSION/windows/arm64/toolbox.exe"
Container image You can also install Toolbox as a container:
# see releases page for other versions
export VERSION=1.15.0
docker pull us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION
Homebrew

To install Toolbox using Homebrew on macOS or Linux:

brew install mcp-toolbox
Compile from source

To install from source, ensure you have the latest version of Go installed, and then run the following command:

go install github.com/googleapis/mcp-toolbox@v1.15.0
Gemini CLI Check out the [Gemini CLI extensions](https://geminicli.com/extensions/) to install prebuilt tools for specific databases like AlloyDB, BigQuery, and Cloud SQL directly into Gemini CLI.
# Install Gemini CLI
npm install -g @google/gemini-cli
# Install the extension
gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-postgres
# Run Gemini CLI
gemini

Interact with your custom tools using natural language through the Gemini CLI.

# Install the extension
gemini extensions install https://github.com/gemini-cli-extensions/mcp-toolbox
Run Toolbox

Configure a tools.yaml to define your tools, and then execute toolbox to start the server:

Binary

To run Toolbox from binary:

./toolbox --config "tools.yaml"

ⓘ Note
Toolbox enables dynamic reloading by default. To disable, use the --disable-reload flag.

Container image

To run the server after pulling the container image:

export VERSION=0.24.0 # Use the version you pulled
docker run -p 5000:5000 \
-v $(pwd)/tools.yaml:/app/tools.yaml \
us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION \
--config "/app/tools.yaml"

ⓘ Note
The -v flag mounts your local tools.yaml into the container, and -p maps the container's port 5000 to your host's port 5000.

Source

To run the server directly from source, navigate to the project root directory and run:

go run .

ⓘ Note
This command runs the project from source, and is more suitable for development and testing. It does not compile a binary into your $GOPATH. If you want to compile a binary instead, refer the Developer Documentation.

Homebrew

If you installed Toolbox using Homebrew, the toolbox binary is available in your system path. You can start the server with the same command:

toolbox --config "tools.yaml"
NPM

To run Toolbox directly without manually downloading the binary (requires Node.js):

npx @toolbox-sdk/server --config tools.yaml
Gemini CLI After installing a [Gemini CLI extensions](https://geminicli.com/extensions/), the prebuilt tools will be available during use.
# Run Gemini CLI
gemini

# List extensions
/extensions list
# List MCP servers
/mcp list

You can use toolbox help for a full list of flags! To stop the server, send a terminate signal (ctrl+c on most platforms).

For more detailed documentation on deploying to different environments, check out the resources in the Deploy Toolbox section


Connect to Toolbox

Once your Toolbox server is up and running, you can load tools into your MCP-compatible client or application.

MCP Client

Add the following configuration to your MCP client configuration:

{
  "mcpServers": {
    "toolbox": {
      "type": "http",
      "url": "http://127.0.0.1:5000/mcp",
    }
  }
}

If you would like to connect to a specific toolset, replace url with "http://127.0.0.1:5000/mcp/{toolset_name}".

Toolbox SDKs: Integrate with your Application

Toolbox Client SDKs provide the easy-to-use building blocks and advanced features for connecting your custom applications to the MCP Toolbox server. See below the list of Client SDKs for using various frameworks:

Python (Github)
Core
  1. Install Toolbox Core SDK:

    pip install toolbox-core
    
  2. Load tools:

    from toolbox_core import ToolboxClient
    
    # update the url to point to your server
    async with ToolboxClient("http://127.0.0.1:5000") as client:
    
        # these tools can be passed to your application!
        tools = await client.load_toolset("toolset_name")
    

For more detailed instructions on using the Toolbox Core SDK, see the project's README.

LangChain / LangGraph
  1. Install Toolbox LangChain SDK:

    pip install toolbox-langchain
    
  2. Load tools:

    from toolbox_langchain import ToolboxClient
    
    # update the url to point to your server
    async with ToolboxClient("http://127.0.0.1:5000") as client:
    
        # these tools can be passed to your application!
        tools = client.load_toolset()
    

    For more detailed instructions on using the Toolbox LangChain SDK, see the project's README.

LlamaIndex
  1. Install Toolbox Llamaindex SDK:

    pip install toolbox-llamaindex
    
  2. Load tools:

    from toolbox_llamaindex import ToolboxClient
    
    # update the url to point to your server
    async with ToolboxClient("http://127.0.0.1:5000") as client:
    
        # these tools can be passed to your application!
        tools = client.load_toolset()
    

    For more detailed instructions on using the Toolbox Llamaindex SDK, see the project's README.

Javascript/Typescript (Github)
Core
  1. Install Toolbox Core SDK:

    npm install @toolbox-sdk/core
    
  2. Load tools:

    import { ToolboxClient } from '@toolbox-sdk/core';
    
    // update the url to point to your server
    const URL = 'http://127.0.0.1:5000';
    let client = new ToolboxClient(URL);
    
    // these tools can be passed to your application!
    const tools = await client.loadToolset('toolsetName');
    

    For more detailed instructions on using the Toolbox Core SDK, see the project's README.

LangChain / LangGraph
  1. Install Toolbox Core SDK:

    npm install @toolbox-sdk/core
    
  2. Load tools:

    import { ToolboxClient } from '@toolbox-sdk/core';
    
    // update the url to point to your server
    const URL = 'http://127.0.0.1:5000';
    let client = new ToolboxClient(URL);
    
    // these tools can be passed to your application!
    const toolboxTools = await client.loadToolset('toolsetName');
    
    // Define the basics of the tool: name, description, schema and core logic
    const getTool = (toolboxTool) => tool(currTool, {
        name: toolboxTool.getName(),
        description: toolboxTool.getDescription(),
        schema: toolboxTool.getParamSchema()
    });
    
    // Use these tools in your Langchain/Langraph applications
    const tools = toolboxTools.map(getTool);
    
Genkit
  1. Install Toolbox Core SDK:

    npm install @toolbox-sdk/core
    
  2. Load tools:

    import { ToolboxClient } from '@toolbox-sdk/core';
    import { genkit } from 'genkit';
    
    // Initialise genkit
    const ai = genkit({
        plugins: [
            googleAI({
                apiKey: process.env.GEMINI_API_KEY || process.env.GOOGLE_API_KEY
            })
        ],
        model: googleAI.model('gemini-2.0-flash'),
    });
    
    // update the url to point to your server
    const URL = 'http://127.0.0.1:5000';
    let client = new ToolboxClient(URL);
    
    // these tools can be passed to your application!
    const toolboxTools = await client.loadToolset('toolsetName');
    
    // Define the basics of the tool: name, description, schema and core logic
    const getTool = (toolboxTool) => ai.defineTool({
        name: toolboxTool.getName(),
        description: toolboxTool.getDescription(),
        schema: toolboxTool.getParamSchema()
    }, toolboxTool)
    
    // Use these tools in your Genkit applications
    const tools = toolboxTools.map(getTool);
    
ADK
  1. Install Toolbox ADK SDK:

    npm install @toolbox-sdk/adk
    
  2. Load tools:

    import { ToolboxClient } from '@toolbox-sdk/adk';
    
    // update the url to point to your server
    const URL = 'http://127.0.0.1:5000';
    let client = new ToolboxClient(URL);
    
    // these tools can be passed to your application!
    const tools = await client.loadToolset('toolsetName');
    

    For more detailed instructions on using the Toolbox ADK SDK, see the project's README.

Go (Github)
Core
  1. Install Toolbox Go SDK:

    go get github.com/googleapis/mcp-toolbox-sdk-go
    
  2. Load tools:

    package main
    
    import (
      "github.com/googleapis/mcp-toolbox-sdk-go/core"
      "context"
    )
    
    func main() {
      // Make sure to add the error checks
      // update the url to point to your server
      URL := "http://127.0.0.1:5000";
      ctx := context.Background()
    
      client, err := core.NewToolboxClient(URL)
    
      // Framework agnostic tools
      tools, err := client.LoadToolset("toolsetName", ctx)
    }
    

    For more detailed instructions on using the Toolbox Go SDK, see the project's README.

LangChain Go
  1. Install Toolbox Go SDK:

    go get github.com/googleapis/mcp-toolbox-sdk-go
    
  2. Load tools:

    package main
    
    import (
      "context"
      "encoding/json"
    
      "github.com/googleapis/mcp-toolbox-sdk-go/core"
      "github.com/tmc/langchaingo/llms"
    )
    
    func main() {
      // Make sure to add the error checks
      // update the url to point to your server
      URL := "http://127.0.0.1:5000"
      ctx := context.Background()
    
      client, err := core.NewToolboxClient(URL)
    
      // Framework agnostic tool
      tool, err := client.LoadTool("toolName", ctx)
    
      // Fetch the tool's input schema
      inputschema, err := tool.InputSchema()
    
      var paramsSchema map[string]any
      _ = json.Unmarshal(inputschema, &paramsSchema)
    
      // Use this tool with LangChainGo
      langChainTool := llms.Tool{
        Type: "function",
        Function: &llms.FunctionDefinition{
          Name:        tool.Name(),
          Description: tool.Description(),
          Parameters:  paramsSchema,
        },
      }
    }
    
Genkit
  1. Install Toolbox Go SDK:

    go get github.com/googleapis/mcp-toolbox-sdk-go
    
  2. Load tools:

    package main
    import (
      "context"
      "log"
    
      "github.com/firebase/genkit/go/genkit"
      "github.com/googleapis/mcp-toolbox-sdk-go/core"
      "github.com/googleapis/mcp-toolbox-sdk-go/tbgenkit"
    )
    
    func main() {
      // Make sure to add the error checks
      // Update the url to point to your server
      URL := "http://127.0.0.1:5000"
      ctx := context.Background()
      g := genkit.Init(ctx)
    
      client, err := core.NewToolboxClient(URL)
    
      // Framework agnostic tool
      tool, err := client.LoadTool("toolName", ctx)
    
      // Convert the tool using the tbgenkit package
      // Use this tool with Genkit Go
      genkitTool, err := tbgenkit.ToGenkitTool(tool, g)
      if err != nil {
        log.Fatalf("Failed to convert tool: %v\n", err)
      }
      log.Printf("Successfully converted tool: %s", genkitTool.Name())
    }
    
Go GenAI
  1. Install Toolbox Go SDK:

    go get github.com/googleapis/mcp-toolbox-sdk-go
    
  2. Load tools:

    package main
    
    import (
      "context"
      "encoding/json"
    
      "github.com/googleapis/mcp-toolbox-sdk-go/core"
      "google.golang.org/genai"
    )
    
    func main() {
      // Make sure to add the error checks
      // Update the url to point to your server
      URL := "http://127.0.0.1:5000"
      ctx := context.Background()
    
      client, err := core.NewToolboxClient(URL)
    
      // Framework agnostic tool
      tool, err := client.LoadTool("toolName", ctx)
    
      // Fetch the tool's input schema
      inputschema, err := tool.InputSchema()
    
      var schema *genai.Schema
      _ = json.Unmarshal(inputschema, &schema)
    
      funcDeclaration := &genai.FunctionDeclaration{
        Name:        tool.Name(),
        Description: tool.Description(),
        Parameters:  schema,
      }
    
      // Use this tool with Go GenAI
      genAITool := &genai.Tool{
        FunctionDeclarations: []*genai.FunctionDeclaration{funcDeclaration},
      }
    }
    
OpenAI Go
  1. Install Toolbox Go SDK:

    go get github.com/googleapis/mcp-toolbox-sdk-go
    
  2. Load tools:

    package main
    
    import (
      "context"
      "encoding/json"
    
      "github.com/googleapis/mcp-toolbox-sdk-go/core"
      openai "github.com/openai/openai-go"
    )
    
    func main() {
      // Make sure to add the error checks
      // Update the url to point to your server
      URL := "http://127.0.0.1:5000"
      ctx := context.Background()
    
      client, err := core.NewToolboxClient(URL)
    
      // Framework agnostic tool
      tool, err := client.LoadTool("toolName", ctx)
    
      // Fetch the tool's input schema
      inputschema, err := tool.InputSchema()
    
      var paramsSchema openai.FunctionParameters
      _ = json.Unmarshal(inputschema, &paramsSchema)
    
      // Use this tool with OpenAI Go
      openAITool := openai.ChatCompletionToolParam{
        Function: openai.FunctionDefinitionParam{
          Name:        tool.Name(),
          Description: openai.String(tool.Description()),
          Parameters:  paramsSchema,
        },
      }
    
    }
    
ADK Go
  1. Install Toolbox Go SDK:

    go get github.com/googleapis/mcp-toolbox-sdk-go
    
  2. Load tools:

    package main
    
    import (
      "github.com/googleapis/mcp-toolbox-sdk-go/tbadk"
      "context"
    )
    
    func main() {
      // Make sure to add the error checks
      // Update the url to point to your server
      URL := "http://127.0.0.1:5000"
      ctx := context.Background()
      client, err := tbadk.NewToolboxClient(URL)
      if err != nil {
        return fmt.Sprintln("Could not start Toolbox Client", err)
      }
    
      // Use this tool with ADK Go
      tool, err := client.LoadTool("toolName", ctx)
      if err != nil {
        return fmt.Sprintln("Could not load Toolbox Tool", err)
      }
    }
    

    For more detailed instructions on using the Toolbox Go SDK, see the project's README.


Additional Features

Test tools with the Toolbox UI

To launch Toolbox's interactive UI, use the --ui flag. This allows you to test tools and toolsets with features such as authorized parameters. To learn more, visit Toolbox UI.

./toolbox --ui
Telemetry

Toolbox emits traces and metrics via OpenTelemetry. Use --telemetry-otlp=<endpoint> to export to any OTLP-compatible backend like Google Cloud Monitoring, Agnost AI, or others. See the telemetry docs for details.

Generate Agent Skills

The skills-generate command allows you to convert a toolset into an Agent Skill compatible with the Agent Skill specification. This is useful for distributing tools as portable skill packages.

toolbox --config tools.yaml skills-generate \
  --name "my-skill" \
  --toolset "my_toolset" \
  --description "A skill containing multiple tools"

Once generated, you can install the skill into the Gemini CLI:

gemini skills install ./skills/my-skill

For more details, see the Generating Skills guide. To serve a skill you already have over MCP, see Serving Skills over MCP.

The repository also ships ready-to-use Agent Skills (e.g. maintainer workflows). See skills/ for the catalog and install instructions.


Versioning

MCP Toolbox for Databases follows Semantic Versioning.

The Public API includes the Toolbox Server (CLI, configuration manifests, and pre-built toolsets) and the Client SDKs.

  • Major versions are incremented for breaking changes, such as incompatible CLI or manifest changes.
  • Minor versions are incremented for new features, including modifications to pre-built toolsets or beta features.
  • Patch versions are incremented for backward-compatible bug fixes.

For more details, including our Container Tagging Policy, see our Full Versioning Policy.


Contributing

Contributions are welcome. Please, see the CONTRIBUTING guide to get started.

For technical details on setting up a environment for developing on Toolbox itself, see the DEVELOPER guide.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See Contributor Code of Conduct for more information.


Community

Join our Discord community to connect with our developers!

Two peas, one chat

Chat with AI about MCP Toolbox for Databases

Opens a chat primed with MCP Toolbox for Databases’s README and setup docs from this page, or add it in Cursor to use its tools.

The Cursor button opens Cursor and asks before it adds the server. Fill in any keys it needs in Cursor’s MCP settings.

Peas in a pod

What are the alternatives to MCP Toolbox for Databases?

How MCP Toolbox for Databases lines up against its neighbours on the shelf. See every databases and data server.

  • MCP Toolbox for DatabasesThis pea

    Google's toolbox for Postgres, MySQL, BigQuery, Spanner and other databases.

    Tools
    29
    Runs on
    Your computer
    Licence
    Apache-2.0
    Stars
    16.7K
  • Qdrant

    Store notes and find them by meaning in a Qdrant vector collection.

    Tools
    2
    Runs on
    Your computer
    Licence
    Apache-2.0
    Stars
    1.6K
  • Excel MCP Server

    Create, edit, format and chart .xlsx files, no Excel needed.

    Tools
    46
    Runs on
    Your computer
    Licence
    MIT
    Stars
    4.3K
  • DBHub

    One small server for Postgres, MySQL, MariaDB, SQL Server, Oracle and SQLite.

    Tools
    2
    Runs on
    Your computer
    Licence
    MIT
    Stars
    3.7K
  • Postgres MCP Pro

    SQL, query plans, health checks and index advice for Postgres.

    Tools
    9
    Runs on
    Your computer
    Licence
    MIT
    Stars
    3.4K
  • Supabase

    Manage Supabase projects, tables, migrations, logs and Edge Functions.

    Tools
    29
    Runs on
    Hosted
    Licence
    Apache-2.0
    Stars
    3K

Compared head to head: MCP Toolbox for Databases vs Postgres MCP Pro.

Full docs on GitHubgoogleapis/mcp-toolbox

Something wrong on this page? Tell us.

For bots & AI agents

Machine-readable versions of MCP Toolbox for Databases and MCP Shelf. Fetch these instead of parsing this page.

This listing (.md)llms.txtllms-full.txtai.txtFull catalog (.md)API specMCP serverMCP manifestDeveloper docs