Connect with read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
100K+
23
1 Tool
Version 4.43 or later needs to be installed to add the server automatically
Use cases
About
Connect with read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
Attribute | Details |
---|---|
Docker Image | mcp/postgres |
Author | modelcontextprotocol |
Repository | https://github.com/modelcontextprotocol/servers |
Dockerfile | https://github.com/modelcontextprotocol/servers/blob/2025.4.24/src/postgres/Dockerfile |
Docker Image built by | Docker Inc. |
Docker Scout Health Score | |
Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/postgres --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
Licence | MIT License |
Tools provided by this Server | Short Description |
---|---|
query | Run a read-only SQL query |
Tool: query
Run a read-only SQL query
Parameters | Type | Description |
---|---|---|
sql | string optional |
{
"mcpServers": {
"postgres": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"POSTGRES_URL",
"mcp/postgres",
"$POSTGRES_URL"
],
"env": {
"POSTGRES_URL": "postgresql://host.docker.internal:5432/mydb"
}
}
}
}
Manual installation
You can install the MCP server using:
Installation for