From 2e1faf8a11c342f136ac677dfe8b6eb29f63c636 Mon Sep 17 00:00:00 2001 From: Mohammod Al Amin Ashik Date: Wed, 11 Feb 2026 11:49:18 +0000 Subject: [PATCH 1/7] feat: add PostgreSQL MCP server definition Add PostgreSQL local stdio server via npx @modelcontextprotocol/server-postgres. Read-only access to PostgreSQL databases with schema inspection and SQL queries. https://claude.ai/code/session_013AxurW8hPAfnUNvik354Xx --- servers/community.postgresql.json | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 servers/community.postgresql.json diff --git a/servers/community.postgresql.json b/servers/community.postgresql.json new file mode 100644 index 0000000..834b3fc --- /dev/null +++ b/servers/community.postgresql.json @@ -0,0 +1,55 @@ +{ + "$schema": "../schemas/server-definition.schema.json", + "id": "community.postgresql", + "name": "PostgreSQL", + "alias": "postgres", + "description": "Query PostgreSQL databases with read-only access. Execute SQL queries, inspect table schemas, and explore data in any PostgreSQL database.", + "icon": "https://avatars.githubusercontent.com/u/182288589?v=4", + "schema_version": "2.1", + "categories": ["database"], + "tags": ["postgres", "postgresql", "database", "sql", "query", "relational"], + + "transport": { + "type": "stdio", + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-postgres", "${input:POSTGRES_URL}"], + "metadata": { + "inputs": [ + { + "id": "POSTGRES_URL", + "label": "PostgreSQL Connection URL", + "description": "PostgreSQL connection string including host, port, database name, and credentials. All queries run in read-only transactions.", + "type": "password", + "required": true, + "secret": true, + "placeholder": "postgresql://username:password@localhost:5432/mydb" + } + ] + } + }, + + "auth": { + "type": "none" + }, + + "contributor": { + "name": "Model Context Protocol", + "github": "modelcontextprotocol", + "url": "https://modelcontextprotocol.io" + }, + + "links": { + "repository": "https://github.com/modelcontextprotocol/servers", + "homepage": "https://www.postgresql.org", + "documentation": "https://github.com/modelcontextprotocol/servers/blob/main/src/postgres/README.md" + }, + + "platforms": ["all"], + + "capabilities": { + "tools": true, + "resources": true, + "prompts": false, + "read_only_mode": true + } +} From d0f179305781ec10ba9fa397609cc40a5920e79e Mon Sep 17 00:00:00 2001 From: Mohammod Al Amin Ashik Date: Thu, 19 Feb 2026 19:10:15 +0800 Subject: [PATCH 2/7] fix: update server definition (input type 'password' -> 'text' for POSTGRES_URL; icon updated; doc URL fixed) --- servers/community.postgresql.json | 35 +++++++++++++++++++------------ 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/servers/community.postgresql.json b/servers/community.postgresql.json index 834b3fc..091d644 100644 --- a/servers/community.postgresql.json +++ b/servers/community.postgresql.json @@ -4,22 +4,34 @@ "name": "PostgreSQL", "alias": "postgres", "description": "Query PostgreSQL databases with read-only access. Execute SQL queries, inspect table schemas, and explore data in any PostgreSQL database.", - "icon": "https://avatars.githubusercontent.com/u/182288589?v=4", + "icon": "https://www.postgresql.org/media/img/about/press/elephant.png", "schema_version": "2.1", - "categories": ["database"], - "tags": ["postgres", "postgresql", "database", "sql", "query", "relational"], - + "categories": [ + "database" + ], + "tags": [ + "postgres", + "postgresql", + "database", + "sql", + "query", + "relational" + ], "transport": { "type": "stdio", "command": "npx", - "args": ["-y", "@modelcontextprotocol/server-postgres", "${input:POSTGRES_URL}"], + "args": [ + "-y", + "@modelcontextprotocol/server-postgres", + "${input:POSTGRES_URL}" + ], "metadata": { "inputs": [ { "id": "POSTGRES_URL", "label": "PostgreSQL Connection URL", "description": "PostgreSQL connection string including host, port, database name, and credentials. All queries run in read-only transactions.", - "type": "password", + "type": "text", "required": true, "secret": true, "placeholder": "postgresql://username:password@localhost:5432/mydb" @@ -27,25 +39,22 @@ ] } }, - "auth": { "type": "none" }, - "contributor": { "name": "Model Context Protocol", "github": "modelcontextprotocol", "url": "https://modelcontextprotocol.io" }, - "links": { "repository": "https://github.com/modelcontextprotocol/servers", "homepage": "https://www.postgresql.org", - "documentation": "https://github.com/modelcontextprotocol/servers/blob/main/src/postgres/README.md" + "documentation": "https://github.com/modelcontextprotocol/servers/tree/main/src/postgres#readme" }, - - "platforms": ["all"], - + "platforms": [ + "all" + ], "capabilities": { "tools": true, "resources": true, From 767a151d6187ec908aa8d92f76b2e585385f6040 Mon Sep 17 00:00:00 2001 From: Mohammod Al Amin Ashik Date: Thu, 19 Feb 2026 19:20:47 +0800 Subject: [PATCH 3/7] fix: update PostgreSQL documentation URL (servers repo archived) --- servers/community.postgresql.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/community.postgresql.json b/servers/community.postgresql.json index 091d644..ccd64db 100644 --- a/servers/community.postgresql.json +++ b/servers/community.postgresql.json @@ -50,7 +50,7 @@ "links": { "repository": "https://github.com/modelcontextprotocol/servers", "homepage": "https://www.postgresql.org", - "documentation": "https://github.com/modelcontextprotocol/servers/tree/main/src/postgres#readme" + "documentation": "https://github.com/modelcontextprotocol/servers-archived/tree/main/src/postgres" }, "platforms": [ "all" From 86143e39642607b3e1fcb0b43ee0a6e959ec182e Mon Sep 17 00:00:00 2001 From: Mohammod Al Amin Ashik Date: Thu, 19 Feb 2026 22:40:44 +0800 Subject: [PATCH 4/7] feat(postgresql): switch to crystaldba/postgres-mcp Replace @modelcontextprotocol/server-postgres (archived, read-only only) with postgres-mcp from Crystal DBA which adds index tuning, workload analysis, EXPLAIN plans, slow query detection, and health checks. - Transport: uvx (Python package) instead of npx - Env var: DATABASE_URI (matches upstream convention) - Supports both restricted (read-only) and unrestricted access modes Signed-off-by: Mohammod Al Amin Ashik --- servers/community.postgresql.json | 44 +++++++++++++++++++------------ 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/servers/community.postgresql.json b/servers/community.postgresql.json index ccd64db..577170f 100644 --- a/servers/community.postgresql.json +++ b/servers/community.postgresql.json @@ -3,7 +3,7 @@ "id": "community.postgresql", "name": "PostgreSQL", "alias": "postgres", - "description": "Query PostgreSQL databases with read-only access. Execute SQL queries, inspect table schemas, and explore data in any PostgreSQL database.", + "description": "Query PostgreSQL databases, analyze performance, and optimize indexes. Execute SQL, inspect schemas, get EXPLAIN plans, identify slow queries, and run health checks via Postgres MCP Pro.", "icon": "https://www.postgresql.org/media/img/about/press/elephant.png", "schema_version": "2.1", "categories": [ @@ -15,26 +15,35 @@ "database", "sql", "query", - "relational" + "relational", + "index-tuning", + "performance" ], "transport": { "type": "stdio", - "command": "npx", + "command": "uvx", "args": [ - "-y", - "@modelcontextprotocol/server-postgres", - "${input:POSTGRES_URL}" + "postgres-mcp", + "--access-mode=unrestricted" ], + "env": { + "DATABASE_URI": "${input:DATABASE_URI}" + }, "metadata": { "inputs": [ { - "id": "POSTGRES_URL", - "label": "PostgreSQL Connection URL", - "description": "PostgreSQL connection string including host, port, database name, and credentials. All queries run in read-only transactions.", + "id": "DATABASE_URI", + "label": "PostgreSQL Connection URI", + "description": "PostgreSQL connection string including host, port, database name, and credentials.", "type": "text", "required": true, "secret": true, - "placeholder": "postgresql://username:password@localhost:5432/mydb" + "placeholder": "postgresql://username:password@localhost:5432/mydb", + "obtain": { + "url": "https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS", + "instructions": "1. Format: postgresql://username:password@host:port/database\n2. For local PostgreSQL: postgresql://postgres:password@localhost:5432/mydb\n3. For cloud providers: check your dashboard for the connection string", + "button_label": "Connection Docs" + } } ] } @@ -43,22 +52,23 @@ "type": "none" }, "contributor": { - "name": "Model Context Protocol", - "github": "modelcontextprotocol", - "url": "https://modelcontextprotocol.io" + "name": "Crystal DBA", + "github": "crystaldba", + "url": "https://github.com/crystaldba" }, "links": { - "repository": "https://github.com/modelcontextprotocol/servers", + "repository": "https://github.com/crystaldba/postgres-mcp", "homepage": "https://www.postgresql.org", - "documentation": "https://github.com/modelcontextprotocol/servers-archived/tree/main/src/postgres" + "documentation": "https://github.com/crystaldba/postgres-mcp#readme" }, "platforms": [ "all" ], "capabilities": { "tools": true, - "resources": true, + "resources": false, "prompts": false, "read_only_mode": true - } + }, + "changelog_url": "https://github.com/crystaldba/postgres-mcp/releases" } From 44a84280a2274f8c0868eb9081f800a50f94a93e Mon Sep 17 00:00:00 2001 From: Mohammod Al Amin Ashik Date: Thu, 19 Feb 2026 22:45:22 +0800 Subject: [PATCH 5/7] fix: rename server files with transport suffix - community.postgresql.json -> community.postgresql-uvx.json (id: community.postgresql-uvx) Signed-off-by: Mohammod Al Amin Ashik --- ...ommunity.postgresql.json => community.postgresql-uvx.json} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename servers/{community.postgresql.json => community.postgresql-uvx.json} (97%) diff --git a/servers/community.postgresql.json b/servers/community.postgresql-uvx.json similarity index 97% rename from servers/community.postgresql.json rename to servers/community.postgresql-uvx.json index 577170f..6976abb 100644 --- a/servers/community.postgresql.json +++ b/servers/community.postgresql-uvx.json @@ -1,7 +1,7 @@ { "$schema": "../schemas/server-definition.schema.json", - "id": "community.postgresql", - "name": "PostgreSQL", + "id": "community.postgresql-uvx", + "name": "PostgreSQL (uvx)", "alias": "postgres", "description": "Query PostgreSQL databases, analyze performance, and optimize indexes. Execute SQL, inspect schemas, get EXPLAIN plans, identify slow queries, and run health checks via Postgres MCP Pro.", "icon": "https://www.postgresql.org/media/img/about/press/elephant.png", From f0f2124297cda683701a1b4b466d11d321549a9b Mon Sep 17 00:00:00 2001 From: Mohammod Al Amin Ashik Date: Thu, 19 Feb 2026 22:47:29 +0800 Subject: [PATCH 6/7] fix: use GitHub org as ID domain for community definitions - community.postgresql-uvx -> crystaldba.postgres-mcp-uvx Signed-off-by: Mohammod Al Amin Ashik --- ...ity.postgresql-uvx.json => crystaldba.postgres-mcp-uvx.json} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename servers/{community.postgresql-uvx.json => crystaldba.postgres-mcp-uvx.json} (98%) diff --git a/servers/community.postgresql-uvx.json b/servers/crystaldba.postgres-mcp-uvx.json similarity index 98% rename from servers/community.postgresql-uvx.json rename to servers/crystaldba.postgres-mcp-uvx.json index 6976abb..e8dc6a8 100644 --- a/servers/community.postgresql-uvx.json +++ b/servers/crystaldba.postgres-mcp-uvx.json @@ -1,6 +1,6 @@ { "$schema": "../schemas/server-definition.schema.json", - "id": "community.postgresql-uvx", + "id": "crystaldba.postgres-mcp-uvx", "name": "PostgreSQL (uvx)", "alias": "postgres", "description": "Query PostgreSQL databases, analyze performance, and optimize indexes. Execute SQL, inspect schemas, get EXPLAIN plans, identify slow queries, and run health checks via Postgres MCP Pro.", From c4f3bfa04094495bae68c4dc5da1672c9647c3a3 Mon Sep 17 00:00:00 2001 From: Mohammod Al Amin Ashik Date: Thu, 19 Feb 2026 22:49:03 +0800 Subject: [PATCH 7/7] feat(postgresql): add Docker variant using crystaldba/postgres-mcp image Add Docker transport variant using the official crystaldba/postgres-mcp Docker Hub image with unrestricted access mode. Signed-off-by: Mohammod Al Amin Ashik --- servers/crystaldba.postgres-mcp-docker.json | 75 +++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 servers/crystaldba.postgres-mcp-docker.json diff --git a/servers/crystaldba.postgres-mcp-docker.json b/servers/crystaldba.postgres-mcp-docker.json new file mode 100644 index 0000000..d650bd5 --- /dev/null +++ b/servers/crystaldba.postgres-mcp-docker.json @@ -0,0 +1,75 @@ +{ + "$schema": "../schemas/server-definition.schema.json", + "id": "crystaldba.postgres-mcp-docker", + "name": "PostgreSQL (Docker)", + "alias": "postgres-docker", + "description": "Query PostgreSQL databases, analyze performance, and optimize indexes via Docker. Execute SQL, inspect schemas, get EXPLAIN plans, identify slow queries, and run health checks.", + "icon": "https://www.postgresql.org/media/img/about/press/elephant.png", + "schema_version": "2.1", + "categories": [ + "database" + ], + "tags": [ + "postgres", + "postgresql", + "database", + "sql", + "docker", + "index-tuning", + "performance" + ], + "transport": { + "type": "stdio", + "command": "docker", + "args": [ + "run", "-i", "--rm", + "-e", "DATABASE_URI", + "crystaldba/postgres-mcp", + "--access-mode=unrestricted" + ], + "env": { + "DATABASE_URI": "${input:DATABASE_URI}" + }, + "metadata": { + "inputs": [ + { + "id": "DATABASE_URI", + "label": "PostgreSQL Connection URI", + "description": "PostgreSQL connection string. Use host.docker.internal instead of localhost for local instances.", + "type": "text", + "required": true, + "secret": true, + "placeholder": "postgresql://username:password@host.docker.internal:5432/mydb", + "obtain": { + "url": "https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS", + "instructions": "1. Format: postgresql://username:password@host:port/database\n2. For local PostgreSQL via Docker: use host.docker.internal instead of localhost\n3. For cloud providers: check your dashboard for the connection string", + "button_label": "Connection Docs" + } + } + ] + } + }, + "auth": { + "type": "none" + }, + "contributor": { + "name": "Crystal DBA", + "github": "crystaldba", + "url": "https://github.com/crystaldba" + }, + "links": { + "repository": "https://github.com/crystaldba/postgres-mcp", + "homepage": "https://www.postgresql.org", + "documentation": "https://github.com/crystaldba/postgres-mcp#readme" + }, + "platforms": [ + "all" + ], + "capabilities": { + "tools": true, + "resources": false, + "prompts": false, + "read_only_mode": true + }, + "changelog_url": "https://github.com/crystaldba/postgres-mcp/releases" +}