Repository navigation
Pin the postgres MCP server version in starter-advanced - #18
benjaminkincses wants to merge 2 commits into
Conversation
|
Hey @Dextheking1, pinning won't make this entry start. const args = process.argv.slice(2);
if (args.length === 0) {
console.error("Please provide a database URL as a command-line argument");
process.exit(1);
}The template passes the URL in Two more things about this entry:
My #17 replaces this example with a pinned |
|
Fixed. The URL is now passed as the first arg with ${env:POSTGRES_URL}, pin kept at 0.6.2, and the dead env block is gone. Checked the 0.6.2 source: it only reads argv[0] and exits without it, so the old env-only form could never start. |
The starter-advanced template launches @modelcontextprotocol/server-postgres unpinned via npx -y, with POSTGRES_URL in the environment. Anyone who starts from this template runs whatever the latest publish happens to be at that moment, with their database connection string exposed to it.
Pin to 0.6.2, the current release.
Note
Low Risk
Config-only version pin in a template; reduces unpinned dependency risk with no runtime code changes in this repo.
Overview
The starter-advanced template’s Postgres MCP config no longer pulls the latest
@modelcontextprotocol/server-postgreson everynpx -yrun. It now pins@modelcontextprotocol/server-postgres@0.6.2, so new projects from this template get a fixed server version instead of whatever was published most recently—important because the config still passesPOSTGRES_URLinto that process.Reviewed by Cursor Bugbot for commit ff504fc. Bugbot is set up for automated code reviews on this repo. Configure here.