MCP Toolbox for Databases
Open source MCP server specializing in easy, fast, and secure tools for Databases.
What is MCP Toolbox for Databases?
MCP Toolbox for Databases is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to open source mcp server specializing in easy, fast, and secure tools for databases.
Open source MCP server specializing in easy, fast, and secure tools for Databases.
This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Open source MCP server specializing in easy, fast, and secur
Use Cases
Maintainer
Works with
Installation
NPM
npx -y @toolbox-sdk/serverManual Installation
npx -y @toolbox-sdk/serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP Toolbox for Databases
MCP Toolbox for Databases is a Google open-source MCP server that gives AI agents, IDEs, and applications direct, secure access to enterprise databases including PostgreSQL, MySQL, BigQuery, Cloud SQL, AlloyDB, Spanner, MongoDB, Redis, Elasticsearch, Snowflake, and more. It serves two roles: as a ready-to-use MCP server with prebuilt generic tools (list_tables, execute_sql) for instant data exploration, and as a framework for building custom parameterized SQL tools for production agents. Configuration is done via a tools.yaml file that defines database sources and structured query tools, with the server exposing them over HTTP at port 5000.
Prerequisites
- Go 1.21+, Homebrew, or a platform to run the pre-built binary (Linux/macOS/Windows)
- A running database instance (PostgreSQL, MySQL, BigQuery, MongoDB, etc.)
- Database credentials (host, port, user, password, database name)
- An MCP-compatible client such as Claude Code, Cursor, Gemini CLI, or Google Antigravity
Install MCP Toolbox
Install via Homebrew on macOS/Linux, download the binary directly, or use the npm package. The binary approach is recommended for production use.
# Via Homebrew:
brew install mcp-toolbox
# Via npm:
npx -y @toolbox-sdk/server --prebuilt=postgres --stdio
# Via binary (Linux AMD64):
export VERSION=1.4.0
curl -L -o toolbox https://storage.googleapis.com/mcp-toolbox-for-databases/v$VERSION/linux/amd64/toolbox
chmod +x toolboxCreate a tools.yaml configuration file
Define your database source and at least one tool. The source block provides connection details; tool blocks define structured queries the AI can call.
sources:
my-pg-source:
kind: postgres
host: 127.0.0.1
port: 5432
database: my_database
user: db_user
password: db_password
tools:
search-by-name:
kind: postgres-sql
source: my-pg-source
description: Search records by name
parameters:
- name: name
type: string
description: The name to search for
statement: SELECT * FROM records WHERE name ILIKE '%' || $1 || '%';Start the MCP Toolbox server
Run the server with your configuration file. It starts an HTTP MCP endpoint at http://127.0.0.1:5000/mcp by default.
./toolbox --config tools.yamlConnect your MCP client to the toolbox server
Configure your MCP client to connect to the running toolbox HTTP endpoint. For clients that prefer stdio, use the npm package with the --stdio flag.
{
"mcpServers": {
"toolbox": {
"type": "http",
"url": "http://127.0.0.1:5000/mcp"
}
}
}Use prebuilt tools for instant exploration (no tools.yaml needed)
For quick database exploration without writing a config file, use the prebuilt mode via npm. This exposes generic list_tables and execute_sql tools immediately.
{
"mcpServers": {
"toolbox-postgres": {
"command": "npx",
"args": ["-y", "@toolbox-sdk/server", "--prebuilt=postgres", "--stdio"],
"env": {
"PG_HOST": "127.0.0.1",
"PG_PORT": "5432",
"PG_DATABASE": "my_database",
"PG_USER": "db_user",
"PG_PASSWORD": "db_password"
}
}
}
}MCP Toolbox for Databases Examples
Client configuration
MCP client config to connect to a locally running MCP Toolbox server via HTTP. The toolbox process must be started separately with 'toolbox --config tools.yaml'.
{
"mcpServers": {
"toolbox": {
"type": "http",
"url": "http://127.0.0.1:5000/mcp"
}
}
}Prompts to try
Example prompts for querying databases and exploring schemas through MCP Toolbox.
- "List all tables in the database"
- "Show me the schema for the users table"
- "Search for all records where the name contains 'Acme'"
- "How many orders were placed in the last 30 days?"
- "Find the top 10 customers by revenue and show their contact information"Troubleshooting MCP Toolbox for Databases
toolbox fails to connect to the database with authentication errors
Verify the host, port, user, password, and database name in tools.yaml. For Google Cloud databases (BigQuery, Cloud SQL), ensure Application Default Credentials are configured with 'gcloud auth application-default login'.
MCP client cannot reach http://127.0.0.1:5000/mcp
Confirm the toolbox process is running. Check that no firewall rules block localhost connections and that the port is not already in use. Run './toolbox --config tools.yaml --port 5001' to use a different port.
SQL injection concern — tool parameters not sanitized
MCP Toolbox uses parameterized queries ($1, $2 placeholders in PostgreSQL) for all tool parameters, providing built-in SQL injection protection. Never interpolate user input directly into the statement string.
Frequently Asked Questions about MCP Toolbox for Databases
What is MCP Toolbox for Databases?
MCP Toolbox for Databases is a Model Context Protocol (MCP) server that open source mcp server specializing in easy, fast, and secure tools for databases. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP Toolbox for Databases?
Install via npm with the command: npx -y @toolbox-sdk/server. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with MCP Toolbox for Databases?
MCP Toolbox for Databases works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP Toolbox for Databases free to use?
Yes, MCP Toolbox for Databases is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.
MCP Toolbox for Databases Alternatives — Similar Databases Servers
Looking for alternatives to MCP Toolbox for Databases? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
MySQL
★ 1.7kProvides access to MySQL databases with fine-grained access control, supporting multiple databases simultaneously with configurable access modes (readonly, readwrite, full) and table-level permissions using whitelists, blacklists, wildcards, and rege
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCP Toolbox for Databases in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCP Toolbox for Databases?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.