@sarmadparvez/postgresql-mcp 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +23 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -23,7 +23,7 @@ This server is the alternative for everything else: local PostgreSQL, self-hoste
23
23
  npm install -g @sarmadparvez/postgresql-mcp
24
24
  ```
25
25
 
26
- Or run directly without installing:
26
+ Or run directly without installing (requires npm 7+ / Node.js 18+):
27
27
 
28
28
  ```bash
29
29
  npx @sarmadparvez/postgresql-mcp <postgresql-connection-string>
@@ -45,7 +45,7 @@ postgresql-mcp postgresql://user:pass@localhost:5432/mydb
45
45
  postgresql-mcp postgresql://user:pass@localhost:5432/mydb?mode=readonly
46
46
  ```
47
47
 
48
- Or with `npx` (no install required):
48
+ Or with `npx` (requires npm 7+ / Node.js 18+):
49
49
 
50
50
  ```bash
51
51
  npx @sarmadparvez/postgresql-mcp postgresql://user:pass@localhost:5432/mydb
@@ -74,19 +74,29 @@ First, install the package globally:
74
74
  npm install -g @sarmadparvez/postgresql-mcp
75
75
  ```
76
76
 
77
- Then find the path to the installed binary:
77
+ Then find the paths to node and the installed package:
78
78
 
79
79
  ```bash
80
- which postgresql-mcp
80
+ which node # e.g. /usr/local/bin/node
81
+ which postgresql-mcp # e.g. /usr/local/bin/postgresql-mcp
81
82
  ```
82
83
 
83
- Add this to your `claude_desktop_config.json`, replacing the path with the output of the above command:
84
+ > **nvm users:** Claude Desktop launches with a different PATH than your terminal and may pick up the wrong Node version via the shebang. Use the full paths to both `node` and the script to guarantee the correct version is used:
85
+ > ```bash
86
+ > # Find your node path
87
+ > which node # e.g. /Users/yourname/.nvm/versions/node/v22.12.0/bin/node
88
+ > # Find the installed script
89
+ > ls $(npm root -g)/@sarmadparvez/postgresql-mcp/index.js
90
+ > ```
84
91
 
92
+ Add this to your `claude_desktop_config.json`:
93
+
94
+ **Standard install (non-nvm):**
85
95
  ```json
86
96
  {
87
97
  "mcpServers": {
88
98
  "postgres": {
89
- "command": "/usr/local/bin/postgresql-mcp",
99
+ "command": "/path/to/postgresql-mcp",
90
100
  "args": [
91
101
  "postgresql://user:pass@localhost:5432/mydb"
92
102
  ]
@@ -95,21 +105,23 @@ Add this to your `claude_desktop_config.json`, replacing the path with the outpu
95
105
  }
96
106
  ```
97
107
 
98
- For read-only access:
99
-
108
+ **nvm users (recommended):**
100
109
  ```json
101
110
  {
102
111
  "mcpServers": {
103
- "postgres-readonly": {
104
- "command": "/usr/local/bin/postgresql-mcp",
112
+ "postgres": {
113
+ "command": "/path/to/node",
105
114
  "args": [
106
- "postgresql://user:pass@localhost:5432/mydb?mode=readonly"
115
+ "/path/to/node_modules/@sarmadparvez/postgresql-mcp/index.js",
116
+ "postgresql://user:pass@localhost:5432/mydb"
107
117
  ]
108
118
  }
109
119
  }
110
120
  }
111
121
  ```
112
122
 
123
+ For read-only access, append `?mode=readonly` to the connection string.
124
+
113
125
  ## Dependencies
114
126
 
115
127
  - [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk) — MCP server framework
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarmadparvez/postgresql-mcp",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "MCP server for PostgreSQL with full read-write support. Works with any PostgreSQL instance — local, Supabase, RDS, or self-hosted.",
5
5
  "main": "index.js",
6
6
  "bin": {