Skip to content

Commit c81c490

Browse files
committed
feat: update PostgreSQL MCP schema to use DATABASE_URL environment variable
- Add DATABASE_URL argument for prompting user during installation - Replace hardcoded connection strings with environment variable - Update both npm and docker installations to use DATABASE_URL - Follows same pattern as other MCP servers in the registry
1 parent 08680b4 commit c81c490

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

code_assistant_manager/mcp/registry/servers/postgresql.json

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,25 @@
1919
"name": "modelcontextprotocol"
2020
},
2121
"homepage": "https://github.com/modelcontextprotocol/servers-archived/tree/main/src/postgres",
22+
"arguments": {
23+
"DATABASE_URL": {
24+
"description": "PostgreSQL connection string (e.g., postgresql://user:password@host:port/database)",
25+
"required": true,
26+
"example": "postgresql://localhost/mydb"
27+
}
28+
},
2229
"installations": {
2330
"npm": {
2431
"type": "npm",
2532
"command": "npx",
2633
"args": [
2734
"-y",
2835
"@modelcontextprotocol/server-postgres",
29-
"postgresql://localhost/mydb"
30-
]
36+
"${DATABASE_URL}"
37+
],
38+
"env": {
39+
"DATABASE_URL": "${DATABASE_URL}"
40+
}
3141
},
3242
"docker": {
3343
"type": "docker",
@@ -36,9 +46,14 @@
3646
"run",
3747
"-i",
3848
"--rm",
49+
"-e",
50+
"DATABASE_URL",
3951
"mcp/postgres",
40-
"postgresql://host.docker.internal:5432/mydb"
41-
]
52+
"${DATABASE_URL}"
53+
],
54+
"env": {
55+
"DATABASE_URL": "${DATABASE_URL}"
56+
}
4257
}
4358
},
4459
"tools": [

0 commit comments

Comments
 (0)