There is no per-tool permission model: whichever mode the process started in applies to every query, so a read-only connection and a write connection are two separate client entries. The connection string carries the credentials, which means the database role you point it at is the real limit on what any query can do.
A minimal server that executes SQL queries against a PostgreSQL database, with the permission level fixed by a command-line argument when the process starts.
- SQL executed against the database in the connection string you supply
- A server-level mode set on the command line — `readonly` or `write`
- Structured results with metadata rather than raw rows
- One connection string as the entire configuration
Node. Clone, `npm install`, `npm run build`, then point your client at `build/index.js` with two arguments: the PostgreSQL connection string — for example `postgresql://username:password@localhost:5432/database_name` — and the mode. Write mode is the default when the second argument is omitted.
One command plus a key — npx -y simple-postgres-mcp, then supply credentials