A Model Context Protocol server for PostgreSQL with read-only default and super-code write access.
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"pgsql-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# pgsql-mcp A Model Context Protocol (MCP) server for PostgreSQL. Provides read-only database access by default, with optional write operations gated behind a super code. ## Overview pgsql-mcp exposes PostgreSQL databases to MCP-compatible AI clients (such as Claude, Kiro, and Cursor) through a set of structured tools. It supports schema inspection, table browsing, row fetching, arbitrary query execution, and stored function/procedure invocation. Write and DDL operations are disabled unless a super code is provided at server startup. This ensures safe, read-only access in environments where unrestricted database modification is not desired. ## Installation ```bash pip install pgsql-mcp ``` ## Usage Start the server with a PostgreSQL DSN: ```bash # Read-only mode (default) pgsql-mcp --dsn "postgresql://user:password@localhost:5432/mydb" # With write access enabled pgsql-mcp --dsn "postgresql://user:password@localhost:5432/mydb" --super-code "your-secret" ``` ### Command-Line Arguments | Argument | Required | Description | |----------|----------|-------------| | `--dsn` | Yes | PostgreSQL connection string in DSN format | | `--super-code` | No | Secret code to unlock write and DDL operations | ## MCP Client Configuration Add the following to your MCP client configuration file: ```json { "mcpServers": { "postgres": { "command": "pgsql-mcp", "args": [ "--dsn", "postgresql://user:password@localhost:5432/mydb" ], "autoApprove": [ "list_schemas", "list_tables", "describe_table", "fetch_rows", "run_query", "call_function" ] } } } ``` ## Tools ### list_schemas List all non-system schemas in the database. **Parameters:** None ### list_tables List all tables in a given schema. | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | schema | string | "public" | Schema name | ### describe_table Describe columns of a table,…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.