Multigres
Postgres diagnostics and cluster operations for Multigres, read-only by default
- Pricing
- Open source
- Platforms
- Linux, macOS, Windows
- Runs
- Locally
- Version
- 0.1.12
- Listing updated
- today
Similar MCP servers
About Multigres
Multigres is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.
Two groups of tools sit behind this server. The first connects through the Multigres gateway and offers Postgres diagnostics modeled on the tools of postgres-mcp: schema and object browsing, read-only SQL, query plans with hypothetical indexes, top queries, index advice and a broad health check covering bloat, vacuum, locks, replication and more. The second talks to multiadmin and is registered only when MULTIGRES_ADMIN_URL is set, covering cluster status, backups, node logs and, in unrestricted mode, switching a shard's primary or starting and expiring backups.
Safety is layered. The default restricted mode registers no write tools at all, and writing SQL is a separate tool so permission granted to execute_sql never covers a write. Every statement passes a parse check that allows only a single SELECT, EXPLAIN of a SELECT or SHOW, with an allow list of functions, and several independent checks each stop writes alone. A statement timeout of 25 seconds applies by default.
The README says it was tested only against a local Multigres Docker cluster built from one commit, with PostgreSQL 17.7 on Linux, and other setups are untested. It ships as an MCP Bundle with binaries for Linux, macOS and Windows, or can be built with Go 1.26.
Install
Run in a terminal
claude mcp add multigres-mcp --env DATABASE_URI='<DATABASE_URI>' --env MULTIGRES_ADMIN_TOKEN='<MULTIGRES_ADMIN_TOKEN>' -- npx -y https://github.com/JoongHyuk-Shin/multigres-mcp/releases/download/v0.1.12/multigres-mcp-0.1.12.mcpbAdd to claude_desktop_config.json
{
"mcpServers": {
"multigres-mcp": {
"command": "npx",
"args": [
"-y",
"https://github.com/JoongHyuk-Shin/multigres-mcp/releases/download/v0.1.12/multigres-mcp-0.1.12.mcpb"
],
"env": {
"DATABASE_URI": "<DATABASE_URI>",
"MULTIGRES_ADMIN_TOKEN": "<MULTIGRES_ADMIN_TOKEN>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"multigres-mcp": {
"command": "npx",
"args": [
"-y",
"https://github.com/JoongHyuk-Shin/multigres-mcp/releases/download/v0.1.12/multigres-mcp-0.1.12.mcpb"
],
"env": {
"DATABASE_URI": "<DATABASE_URI>",
"MULTIGRES_ADMIN_TOKEN": "<MULTIGRES_ADMIN_TOKEN>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"multigres-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"https://github.com/JoongHyuk-Shin/multigres-mcp/releases/download/v0.1.12/multigres-mcp-0.1.12.mcpb"
],
"env": {
"DATABASE_URI": "<DATABASE_URI>",
"MULTIGRES_ADMIN_TOKEN": "<MULTIGRES_ADMIN_TOKEN>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"multigres-mcp": {
"command": "npx",
"args": [
"-y",
"https://github.com/JoongHyuk-Shin/multigres-mcp/releases/download/v0.1.12/multigres-mcp-0.1.12.mcpb"
],
"env": {
"DATABASE_URI": "<DATABASE_URI>",
"MULTIGRES_ADMIN_TOKEN": "<MULTIGRES_ADMIN_TOKEN>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"multigres-mcp": {
"command": "npx",
"args": [
"-y",
"https://github.com/JoongHyuk-Shin/multigres-mcp/releases/download/v0.1.12/multigres-mcp-0.1.12.mcpb"
],
"env": {
"DATABASE_URI": "<DATABASE_URI>",
"MULTIGRES_ADMIN_TOKEN": "<MULTIGRES_ADMIN_TOKEN>"
}
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
DATABASE_URIPostgres connection string of the Multigres gateway.RequiredMULTIGRES_ADMIN_URLmultiadmin HTTP address. The cluster tools are registered only when it is set.MULTIGRES_ADMIN_TOKENBearer token for multiadmin started with --enable-auth.MULTIGRES_NODE_HOST_MAPreported=reachable host pairs, comma separated, for direct node connections.MULTIGRES_MCP_ACCESS_MODErestricted (read-only) or unrestricted (adds the write tools).MULTIGRES_MCP_SQL_TIMEOUTStatement timeout for the SQL every tool sends, as a Go duration.
Tools this server provides (19)
Taken from the project documentation; the running server may differ.
- list_schemas
- Lists the schemas.
- list_objects
- Lists tables, views, sequences or extensions.
- get_object_details
- Shows columns, constraints and indexes of an object.
- execute_sql
- Runs one read-only statement.
- explain_query
- Shows a query plan, optionally with hypothetical indexes.
- get_top_queries
- Lists the slowest or most expensive queries.
- analyze_workload_indexes
- Advises indexes for the workload.
- analyze_query_indexes
- Advises indexes for up to 10 given queries.
- diagnose
- Runs health checks.
- cluster_status
- Shows cluster topology and status.
- list_backups
- Lists backups of a shard.
- verify_backups
- Runs pgBackRest verify on a shard's backups.
- get_backup_job_status
- Shows the status of a backup job.
- read_node_log
- Reads the end of a node's Postgres log.
- execute_write_sql
- Runs a statement that may change data or schema.
- switch_primary
- Asks Multigres to switch a shard's primary.
- create_backup
- Starts a backup.
- expire_backups
- Expires backups by the cluster retention rules.
- set_postgres_restarts
- Turns automatic Postgres restarts on a node on or off.
What it does
- Read-only by default
- Write tools are only registered when the access mode is set to unrestricted.
- Index advice
- Compares planner costs with hypothetical indexes for a workload or up to 10 queries, creating nothing.
- Health diagnosis
- Checks bloat, vacuum, locks, waits, cache, replication, sequences and constraints.
- Cluster status
- Shows cells, primaries, replicas with lag, gateways and recent primary changes.
- Backup tools
- List and verify backups with pgBackRest verify, and in unrestricted mode create or expire them.
- Direct node reads
- Read a node's Postgres log or diagnose a single node instead of the gateway.
- Statement validation
- Every read statement is parsed and checked before it is sent.
Good for
- Find the slowest queries on a Multigres cluster
- Get index recommendations without creating indexes
- Check replication lag and which node is primary
- Verify backups before a failover
- Investigate the old primary after a failover
Pricing
Open source
Multigres FAQ
Can it change my data?
Not by default. The restricted mode has no write tools; unrestricted mode adds execute_write_sql and cluster operations.
What do I need to configure?
DATABASE_URI for the Multigres gateway is required. MULTIGRES_ADMIN_URL enables the cluster tools.
How many tools are available?
14 in restricted mode and 19 in unrestricted mode with multiadmin configured, or 9 and 10 without it.
What has it been tested on?
A local Multigres Docker cluster with PostgreSQL 17.7 on Linux. Other setups are untested.
Does it run restores?
No. verify_backups runs pgBackRest verify, which checks backups and archived WAL but does not run a restore.
Is Multigres free?
Yes. Multigres is open source, so you can use and self-host it for free.
How do I add Multigres to Claude Code?
Run this command in your terminal: claude mcp add multigres-mcp --env DATABASE_URI='<DATABASE_URI>' --env MULTIGRES_ADMIN_TOKEN='<MULTIGRES_ADMIN_TOKEN>' -- npx -y https://github.com/JoongHyuk-Shin/multigres-mcp/releases/download/v0.1.12/multigres-mcp-0.1.12.mcpb
What are the best alternatives to Multigres?
The closest alternatives to Multigres are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


