MCP Toolbox for Databases

v1.3.0Databasesstable

Open source MCP server specializing in easy, fast, and secure tools for Databases.

agentagentsaibigqueryclickhouse
Share:
15,301
Stars
0
Downloads
0
Weekly
0/5

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

Multi-database support
Secure queries
AI agent database access
googleapis

Maintainer

LicenseApache 2.0
Languagego
Versionv1.3.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y @toolbox-sdk/server

Manual Installation

npx -y @toolbox-sdk/server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 toolbox
2

Create 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 || '%';
3

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.yaml
4

Connect 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"
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-toolbox-for-databases": { "command": "npx", "args": ["-y", "@toolbox-sdk/server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides