MCP Toolbox for Databases is an open source database tool management platform designed to help developers create and manage database tools more easily, quickly, and securely. It acts as a control plane between the application and the database , simplifying the development , distribution and invocation of tools . The platform supports multiple development frameworks such as LangChain, LlamaIndex and GoogleGenAI for local or cloud deployment. Users can optimize the efficiency of database operations through simple configuration and a small amount of code to achieve tool integration.MCP Toolbox provides connection pooling, authentication and other features to ensure performance and security. It is suitable for scenarios that require rapid development of database tools, such as data access for AI agents or automated database management. The current version is 0.9.0 and is still in beta, with the possibility of major updates in the future.
Function List
- Centralized management of tools: Provides a unified platform for storing and updating tools, supporting cross-application and agent sharing.
- Dynamic tool loading: Supports dynamic loading of tools to update tool configuration without restarting the application.
- Database connection optimization: built-in connection pooling and authentication mechanisms to improve performance and security.
- Multi-framework support: compatible with LangChain, LlamaIndex, GoogleGenAI and other development frameworks.
- Natural Language Querying: Allows direct querying of databases through natural language without writing complex SQL.
- Automated database management: support for automatically generating queries, creating tables and adding indexes.
- Context-aware code generation: Generate application code and test cases based on database schema.
- Cross-platform deployment: Support for Linux, Windows, macOS and containerized deployments (e.g. Docker).
Using Help
Installation process
MCP Toolbox provides various installation methods for different development environments. The following are the detailed installation steps:
1. Binary installation
Users can directly download the binary file for their operating system:
- Visit the official release page and select the corresponding version (currently
0.9.0
). - Depending on the operating system and CPU architecture (e.g.
linux/amd64
maybedarwin/arm64
) Download the binary file:export OS="linux/amd64" curl -O https://storage.googleapis.com/genai-toolbox/v0.9.0/$OS/toolbox chmod +x toolbox
- commander-in-chief (military)
toolbox
The file is moved to a system path (e.g./usr/local/bin
) to run.
2. Containerized installation
Installation with Docker is more suitable for production environments:
- Pull the official Docker image:
export VERSION=0.9.0 docker pull us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION
- Run the container, ensuring that the port (default
5000
) Available:docker run -p 5000:5000 us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION
3. Source code installation
Requires the Go language environment (latest version recommended):
- Run the following command to install:
go install github.com/googleapis/genai-toolbox@v0.9.0
- After the configuration is complete, run
toolbox
Start the server.
4. configure tools.yaml
After installation, you need to configure the tools.yaml
file for defining data sources and tools:
- establish
tools.yaml
file, the sample configuration is as follows:sources: my-pg-source: kind: postgres host: 127.0.0.1 port: 5432 database: toolbox_db user: ${USER_NAME} password: ${PASSWORD} 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.
- Use environment variables (e.g.
${USER_NAME}
) Store sensitive information and avoid hard-coding. - After saving the file, run the following command to start the server:
./toolbox
- Dynamic overloading is enabled by default, and can be disabled by adding the
--disable-reload
Logo.
Main Functions
1. Loading tools
The MCP Toolbox supports loading tools via SDKs for a variety of frameworks. The following is an example of the Python SDK:
- Install the SDK (selected according to the framework):
pip install toolbox-langchain
- Loading Toolset:
from toolbox_langchain import ToolboxClient async with ToolboxClient("http://127.0.0.1:5000") as client: tools = await client.load_toolset("toolset_name")
- Loaded tools can be passed directly to the application or the AI agent.
2. Natural language queries
Users can query the database in natural language. For example, the query "Orders delivered in 2024 and the goods they contain":
- After configuring the data source, the tool automatically converts the natural language to SQL queries.
- In a supported IDE, type something like "Find hotels in Basel with Basel in its name", and the tool will call
search-hotels-by-name
tool that returns the results.
3. Automated database management
MCP Toolbox can automatically generate database operations. For example:
- Create Table: Describe the requirement, such as "Create a data table to store user information", the tool will generate the corresponding SQL.
- Add Index: Enter "Add Index for User Table" and the tool will execute automatically.
- The user simply enters the requirements in the IDE and the tool handles the complex operations.
4. Context-aware code generation
The tool generates code based on the database schema. Example:
- Enter "Generate User Management Module Code" and the tool will generate the CRUD operation code based on the table structure.
- Support for generating test cases to ensure code reliability.
Stopping the server
Running servers can be accessed via the Ctrl+C
Terminate. To run in the background, use Docker or the System Service Manager tool.
caveat
- The current version is beta (
0.9.0
), there may be instability, it is recommended to pay attention to the official release page. - Make sure you have a stable internet connection, Docker image pulling may require scientific internet access.
- Sensitive information (e.g. database passwords) should be managed using environment variables to avoid disclosure.
application scenario
- AI Agent Development
Developers use MCP Toolbox to quickly build database tools for AI agents. For example, a hotel booking bot can query hotel information through natural language and automate booking operations, reducing manual coding efforts. - Automation of database management
Data analysts do not need to write complex SQL, through the natural language description of the requirements (such as "statistics on sales in 2024"), you can get the results of the query, suitable for rapid data exploration. - Cross-team tool sharing
Development teams can store tools in the MCP Toolbox and share them with multiple projects or AI agents, enabling tool reuse and reducing maintenance costs. - Real-time code generation
Beginners or busy developers can utilize the context-aware feature to quickly generate database-related application code and shorten development cycles.
QA
- What databases does MCP Toolbox support?
Currently PostgreSQL is the main support, other database support is under development. Users are required to add thetools.yaml
Configure the corresponding data source in the - How do you ensure tool security?
The platform provides a built-in authentication mechanism and supports environment variables to manage sensitive information and avoid hard-coding. HTTPS is recommended for server deployment. - Does it require a highly configurable environment to run?
No, MCP Toolbox is designed to be lightweight and can run on regular development machines or cloud servers, and Docker deployment further reduces environmental requirements. - How do I update the tool without restarting the app?
Dynamic reloading is enabled by default. New tools or configuration updates will take effect automatically without restarting the server.