MCP Toolbox for Databases

by @googleapis

Toolbox For Databases MCP Server

MCP Toolbox for Databases connects agents and IDEs to enterprise data through prebuilt tools or custom query definitions. It combines database access with connection pooling, authentication integration, and observability.

Databases16,678goApache-2.0

Server facts

MCP Toolbox for Databases

GitHub stars

16,678

Last commit

Oct 17, 2026

Runtime

go

License

Apache-2.0

Tech

Runtime
goGo
Transports
stdio
Remote access
No

Activity

GitHub stars
16,678
Last commit
Data as of

Tags

  • Connection Pooling
  • Custom Tools
  • Databases
  • Opentelemetry
  • Sql

Overview

MCP Toolbox for Databases serves two related purposes. Developers can connect an MCP client to a database using prebuilt generic tools for exploration and SQL work, or define narrower custom tools for production agents. The README names table listing and SQL execution as examples of the prebuilt interface. Custom definitions describe sources, parameters, statements, and toolsets in a tools.yaml configuration file, allowing teams to expose deliberate operations rather than only a generic database connection. Supported systems span Google Cloud databases and other platforms, including PostgreSQL, MySQL, MongoDB, Redis, Neo4j, Snowflake, and additional engines.

The server handles connection pooling, integrated authentication including IAM, and observability through OpenTelemetry. An npm launch example configures prebuilt PostgreSQL tools over stdio, while custom configurations can also run through npm, a downloaded binary, a container, Homebrew installation, or source execution. Connection environment variables depend on the chosen prebuilt database and are referred to separate reference documentation rather than enumerated in this README. The project recommends binaries or containers for a more standard and reliable installation than the convenience-oriented npm route. It also clarifies that the repository was renamed from genai-toolbox to mcp-toolbox. For teams building database-aware assistants, the distinction between exploratory tools and restricted custom queries is the main architectural choice offered by this project.

Install & configure

Requirements

  • An MCP-compatible client
  • npx for this execution method
  • A PostgreSQL database for this example
  • Database-specific connection settings from the prebuilt reference
Documented launch / install command
npx -y @toolbox-sdk/server --prebuilt=postgres --stdio

This is the README's prebuilt PostgreSQL example. Exact database connection environment variables are not stated in the supplied README, so none are invented here. Binaries and containers are recommended for a more standard installation. The repository is now named mcp-toolbox.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Desktop configuration
{
  "mcpServers": {
    "genai-toolbox": {
      "command": "npx",
      "args": [
        "-y",
        "@toolbox-sdk/server",
        "--prebuilt=postgres",
        "--stdio"
      ],
      "env": {}
    }
  }
}

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

Cursor configuration
{
  "mcpServers": {
    "genai-toolbox": {
      "command": "npx",
      "args": [
        "-y",
        "@toolbox-sdk/server",
        "--prebuilt=postgres",
        "--stdio"
      ],
      "env": {}
    }
  }
}

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

VS Code configuration
{
  "servers": {
    "genai-toolbox": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@toolbox-sdk/server",
        "--prebuilt=postgres",
        "--stdio"
      ],
      "env": {}
    }
  }
}

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

Windsurf configuration
{
  "mcpServers": {
    "genai-toolbox": {
      "command": "npx",
      "args": [
        "-y",
        "@toolbox-sdk/server",
        "--prebuilt=postgres",
        "--stdio"
      ],
      "env": {}
    }
  }
}

Read the Windsurf setup guide

Config file · Project scope: .mcp.json at the repository root

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "mcpServers": {
    "genai-toolbox": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@toolbox-sdk/server",
        "--prebuilt=postgres",
        "--stdio"
      ],
      "env": {}
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Tools

Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
list_tablesDiscover database tables through a prebuilt generic tool.
execute_sqlExecute SQL through the database's prebuilt tool interface.

Use cases

  • Explore database schemas from a coding assistant.
  • Run database queries through prebuilt MCP tools.
  • Define parameterized custom operations for production agents.
  • Group database tools into task-specific toolsets.
  • Observe database-tool activity with metrics and tracing.

Strengths

  • Supports both prebuilt exploration and custom query tools.
  • Covers numerous cloud and non-cloud database engines.
  • Includes connection pooling, integrated authentication, and OpenTelemetry support.

Limitations

  • Connection configuration is database-specific and requires separate reference details.
  • The README characterizes npm execution as convenience-oriented rather than the most reliable installation.
  • Custom tools require source and query definitions.

MCP Toolbox for Databases setup notes

  • MCP Toolbox for Databases's stdio example needs a client that launches local processes.

Frequently asked questions

No. The README also lists systems such as PostgreSQL, MySQL, Oracle, MongoDB, Redis, Neo4j, and Snowflake.

Related MCP servers