MCP Toolbox for Databases is an open source MCP server that simplifies developing tools for database interactions by handling complexities like connection pooling, authentication, and security. It serves as a bridge between your application and databases, enabling AI tools to access data efficiently.
For Linux (AMD64):
export VERSION=0.18.0
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/linux/amd64/toolbox
chmod +x toolbox
For macOS (Apple Silicon):
export VERSION=0.18.0
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/darwin/arm64/toolbox
chmod +x toolbox
For macOS (Intel):
export VERSION=0.18.0
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/darwin/amd64/toolbox
chmod +x toolbox
For Windows (AMD64):
$VERSION = "0.18.0"
Invoke-WebRequest -Uri "https://storage.googleapis.com/genai-toolbox/v$VERSION/windows/amd64/toolbox.exe" -OutFile "toolbox.exe"
Using Homebrew:
brew install mcp-toolbox
Using Go:
go install github.com/googleapis/[email protected]
tools.yaml configuration file (see Configuration section below)./toolbox --tools-file "tools.yaml"
The server runs on port 5000 by default and enables dynamic reloading of configuration files. Use toolbox help to see all available flags.
Install the SDK:
pip install toolbox-core
Load tools in your code:
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")
Install the SDK:
npm install @toolbox-sdk/core
Load tools in your code:
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');
Install the SDK:
go get github.com/googleapis/mcp-toolbox-sdk-go
Load tools in your code:
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)
}
}
The primary way to configure Toolbox is through a tools.yaml file:
Define data sources your tools will access:
sources:
my-pg-source:
kind: postgres
host: 127.0.0.1
port: 5432
database: toolbox_db
user: toolbox_user
password: my-password
Define the actions an agent can take:
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 || '%';
Group tools together for easy loading:
toolsets:
my_first_toolset:
- my_first_tool
- my_second_tool
my_second_toolset:
- my_second_tool
- my_third_tool
Load tools by toolset 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")
To use custom tools with Gemini CLI, install the MCP Toolbox extension:
gemini extensions install https://github.com/gemini-cli-extensions/mcp-toolbox
This allows you to interact with your data sources through natural language commands directly from the command line.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "toolbox-for-databases" '{"command":"toolbox","args":["--tools-file","tools.yaml"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"toolbox-for-databases": {
"command": "toolbox",
"args": [
"--tools-file",
"tools.yaml"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"toolbox-for-databases": {
"command": "toolbox",
"args": [
"--tools-file",
"tools.yaml"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect