
MCP Toolbox for Databases
[!NOTE]MCP Toolbox for Databases is currently in beta, and may see breakingchanges until the first stable release (v1.0).
MCP Toolbox for Databases is an open source MCP server for databases It wasdesigned with enterprise-grade and production-quality in mind. It enables you todevelop tools easier, faster, and more securely by handling the complexitiessuch as connection pooling, authentication, and more.
This README provides a brief overview. For comprehensive details, see the fulldocumentation.
[!NOTE]This product was originally named “Gen AI Toolbox for Databases” asits initial development predated MCP, but was renamed to align with recentlyadded MCP compatibility.
Table of Contents
- Why Toolbox?
- General Architecture
- Getting Started
- Installing the server
- Running the server
- Integrating your application
- Configuration
- Sources
- Tools
- Toolsets
- Versioning
- Contributing
Why Toolbox?
Toolbox helps you build Gen AI tools that let your agents access data in yourdatabase. Toolbox provides:
- Simplified development: Integrate tools to your agent in less than 10lines of code, reuse tools between multiple agents or frameworks, and deploynew versions of tools more easily.
- Better performance: Best practices such as connection pooling,authentication, and more.
- Enhanced security: Integrated auth for more secure access to your data
- End-to-end observability: Out of the box metrics and tracing with built-insupport for OpenTelemetry.
General Architecture
Toolbox sits between your application's orchestration framework and yourdatabase, providing a control plane that is used to modify, distribute, orinvoke tools. It simplifies the management of your tools by providing you with acentralized location to store and update tools, allowing you to share toolsbetween agents and applications and update those tools without necessarilyredeploying your application.

Getting Started
Installing the server
For the latest version, check the releases page and use thefollowing instructions for your OS and CPU architecture.
BinaryTo install Toolbox as a binary:
# see releases page for other versions
export VERSION=0.3.0
curl -O https://storage.googleapis.com/genai-toolbox/v$VERSION/linux/amd64/toolbox
chmod +x toolbox
Container image You can also install Toolbox as a container:
# see releases page for other versions
export VERSION=0.3.0
docker pull us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION
Compile from source
To install from source, ensure you have the latest version ofGo installed, and then run the following command:
go install github.com/googleapis/[email protected]
Running the server
Configure a tools.yaml to define your tools, and thenexecute toolbox to start the server:
./toolbox --tools_file "tools.yaml"
You can use toolbox help for a full list of flags! To stop the server, send aterminate signal (ctrl+c on most platforms).
For more detailed documentation on deploying to different environments, checkout the resources in the How-tosection
Integrating your application
Once your server is up and running, you can load the tools into yourapplication. See below the list of Client SDKs for using various frameworks:
Core- Install Toolbox Core SDK:
pip install toolbox-core - Load tools:
from toolbox_core import ToolboxClient # update the url to point to your server client = ToolboxClient("http://127.0.0.1:5000") # 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 theproject's README.
LangChain / LangGraph- Install Toolbox LangChain SDK:
pip install toolbox-langchain - Load tools:
from toolbox_langchain import ToolboxClient # update the url to point to your server client = ToolboxClient("http://127.0.0.1:5000") # these tools can be passed to your application! tools = client.load_toolset()
For more detailed instructions on using the Toolbox LangChain SDK, see theproject's README.
LlamaIndex- Install Toolbox Llamaindex SDK:
pip install toolbox-llamaindex - Load tools:
from toolbox_llamaindex import ToolboxClient # update the url to point to your server client = ToolboxClient("http://127.0.0.1:5000") # these tools can be passed to your application! tools = client.load_toolset()
For more detailed instructions on using the Toolbox Llamaindex SDK, see theproject's README.
Configuration
The primary way to configure Toolbox is through the tools.yaml file. If youhave multiple files, you can tell toolbox which to load with the --tools_file tools.yaml flag.
You can find more detailed reference documentation to all resource types in theResources.
Sources
The sources section of your tools.yaml defines what data sources yourToolbox should have access to. Most tools will have at least one source toexecute against.
sources:
my-pg-source:
kind: 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 theSources.
Tools
The tools section of a tools.yaml define the actions an agent can take: whatkind of tool it is, which source(s) it affects, what parameters it uses, etc.
tools:
search-hotels-by-name:
kind: 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 theTools.
Toolsets
The toolsets section of your tools.yaml allows you to define groups of toolsthat you want to be able to load together. This can be useful for definingdifferent groups based on agent or application.
toolsets:
my_first_toolset:
- my_first_tool
- my_second_tool
my_second_toolset:
- my_second_tool
- my_third_tool
You can load toolsets by name:
# This will load all tools
all_tools = client.load_toolset()
# This will only load the tools listed in 'my_second_toolset'
my_second_toolset = client.load_toolset("my_second_toolset")
Versioning
This project uses semantic versioning, including aMAJOR.MINOR.PATCH version number that increments with:
- MAJOR version when we make incompatible API changes
- MINOR version when we add functionality in a backward compatible manner
- PATCH version when we make backward compatible bug fixes
The public API that this applies to is the CLI associated with Toolbox, theinteractions with official SDKs, and the definitions in the tools.yaml file.
Contributing
Contributions are welcome. Please, see the CONTRIBUTINGto get started.
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. SeeContributor Code of Conduct for more information.