query
Run a read-only SQL query
Run read-only SQL against a PostgreSQL database with more than one schema in scope, so a query can cross schemas without a second connection.
LABSCO SUMMARY
There is one tool and it runs read-only SQL, so nothing an agent composes can write, and a badly formed statement costs a failed query rather than a changed row. Which schemas are visible belongs to the server rather than to the query, which means the boundary of what can be seen is decided once, by whoever started it.
A single-tool PostgreSQL bridge that executes read-only SQL over the schemas the server was started against.
Nothing to supply — no account, no key. A reachable PostgreSQL database and the list of schemas to expose, both settled when the server starts rather than per call.
One command — npx -y mcp-server-postgres-multi-schema <YOUR_DATABASE_URL> [schemas]
USE CASES
Both schemas are already in scope, so a join across them is written as ordinary SQL and executed read-only in one call.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
queryRun a read-only SQL query
BEFORE YOU INSTALL
1 tool when we connected.
CONTEXT COST
Rated by the size of the one tool definition that rides along on every turn
INSTALLATION
Add the block to your client, or run the command directly.
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"mcp-server-postgres-multi-schema",
"postgresql://localhost/mydb",
"public,audit"
]
}
}
}npx -y mcp-server-postgres-multi-schema <YOUR_DATABASE_URL> [schemas]