MCP Toolbox for Databases — Claude Code MCP server: setup and features
Connect an AI agent to databases through MCP to inspect schemas, run queries, and write code informed by the database structure.
Open on GitHubWhat MCP Toolbox for Databases does
MCP Toolbox for Databases gives Claude Code ready-made ways to work with a connected database. An agent can retrieve table names with list_tables or run SQL through execute_sql. Supported options include PostgreSQL, MySQL, MongoDB, and Google Cloud database services.
To connect it, add a server entry to the client's MCP configuration. The PostgreSQL example runs @toolbox-sdk/server with npx and the --prebuilt=postgres option. Then provide environment variables for the database connection; without them, the server has no connection settings to use.
Toolbox also lets you define custom tools with structured queries and semantic search. You can select a narrower toolset with a value such as --prebuilt=postgres/data, which loads SQL tools for PostgreSQL.
What it helps with
- connect Claude Code to a database
- inspect database tables through an AI agent
- run SQL from an IDE
- define a tool with custom query logic
Example prompts for the agent
- Show me the tables in the connected database.
- Run a SQL query to find the latest records in this table.
- Write code for this database using its schema.
How to install MCP Toolbox for Databases
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about MCP Toolbox for Databases
How do I install MCP Toolbox for Databases in Claude Code?
Add a toolbox-postgres server entry to the client's MCP configuration. Run npx with -y, @toolbox-sdk/server, --prebuilt=postgres, and --stdio, then set the environment variables needed for the database connection.
What does MCP Toolbox for Databases do?
It connects MCP clients to databases and provides ready-made tools for exploring schemas and running queries. It can also support custom tools for agents.
Which databases work with MCP Toolbox for Databases?
Supported options include PostgreSQL, MySQL, MongoDB, Redis, Snowflake, and Google Cloud databases such as BigQuery and Spanner.