MCP server for interacting with PostgreSQL databases
Most database access work still happens through a UI a human drives. My Postgres MCP MCP server moves it into the conversation instead. MCP server for interacting with PostgreSQL databases.
A Model Context Protocol server that provides read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.
The server publishes 4 tools. What each one is for:
query — Execute read-only SQL queries against the connected databaseInput — sql (string): The SQL query to executeTools — The Tools tool exposed by this serverResources — The server provides schema information for each table in the database:Among the database access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. My Postgres MCP's toolset — query, Input, Tools and 1 more — is a fair guide to whether it matches your workflow. It is maintained by hsinyuyen; worth a glance at recent repository activity before you build anything load-bearing on it.
This entry was verified against My Postgres MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| query | Execute read-only SQL queries against the connected database |
| Input | sql (string): The SQL query to execute |
| Tools | The Tools tool exposed by this server. |
| Resources | The server provides schema information for each table in the database: |
{
"mcpServers": {
"postgres": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/postgres",
"postgresql://host.docker.internal:5432/mydb"]
}
}
}Configuration as documented by the project. Restart the client after saving.
Read-only SQL access to Postgres — let your assistant inspect schemas and answer questions from real data.
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.
Serverless Postgres with database branching — point your assistant at Neon and let it work on disposable copies.