{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_2f6556fsjpra","handle":"mcp-pgsql-query","url":"https://wellknown.network/agents/mcp-pgsql-query","links":{"self":"https://wellknown.network/agents/mcp-pgsql-query/record.json","html":"https://wellknown.network/agents/mcp-pgsql-query","markdown":"https://wellknown.network/agents/mcp-pgsql-query/record.md","api":"https://wellknown.network/api/v1/agents/mcp-pgsql-query","status":"https://wellknown.network/api/v1/agents/mcp-pgsql-query/status","claim":"https://wellknown.network/agents/mcp-pgsql-query/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/mcp-pgsql-query/claim.json","badge":"https://wellknown.network/agents/mcp-pgsql-query/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/mcp-pgsql-query/history","tools":"https://wellknown.network/api/v1/agents/mcp-pgsql-query/tools"},"ard":{"identifier":"urn:air::server:mcp-pgsql-query","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"mcp-pgsql-query","summary":"MCP server for read-only PostgreSQL queries","description":"# mcp-pgsql-query\n\nMCP server for read-only PostgreSQL queries. Only SELECT statements are allowed — all other operations are rejected at the SQL validation layer.\n\n## Features\n\n- SELECT-only enforcement (INSERT/UPDATE/DELETE/DDL/COPY all blocked)\n- AST-level SQL analysis via `sqlglot` to catch injection and embedded write operations\n- Blocks dangerous functions: `pg_read_file`, `pg_write_file`, `lo_export`, `dblink`, etc.\n- Stacked statement prevention (`;` separated statements)\n- Returns results as JSON with column names, rows, and truncation indicator\n\n## Configuration\n\nSet these environment variables:\n\n| Variable | Description | Default |\n|---|---|---|\n| `PG_HOST` | PostgreSQL hostname | `localhost` |\n| `PG_PORT` | Port | `5432` |\n| `PG_DATABASE` | Database name | |\n| `PG_USERNAME` | Login username | |\n| `PG_PASSWORD` | Login password | |\n\n## Claude Desktop configuration\n\n```json\n{\n  \"mcpServers\": {\n    \"pgsql\": {\n      \"command\": \"uvx\",\n      \"args\": [\"mcp-pgsql-query@latest\"],\n      \"env\": {\n        \"PG_HOST\": \"your-server\",\n        \"PG_DATABASE\": \"your-db\",\n        \"PG_USERNAME\": \"your-user\",\n        \"PG_PASSWORD\": \"your-password\"\n      }\n    }\n  }\n}\n```\n\n## Tool\n\n### `query_pgsql`\n\nRun a read-only SELECT query against the configured PostgreSQL database.\n\n**Parameters:**\n- `sql` (required) — PostgreSQL SELECT statement\n- `max_rows` (optional) — Maximum rows to return, default 100, max 1000","publisher":null,"homepage":"https://github.com/uaniay/plugins/tree/main/mcp-servers/pgsql","repository":"https://github.com/uaniay/plugins/tree/main/mcp-servers/pgsql","version":"0.1.0","license":null,"protocols":["mcp"],"tags":["ai-agent","database","mcp","pgsql","postgresql"],"pricing":null,"endpoints":[{"url":"pypi:mcp-pgsql-query","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi"}},"derived":{"capabilities":[{"slug":"data.database","name":"Databases","confidence":1,"provenance":"declared"},{"slug":"dev.filesystem","name":"Filesystem","confidence":0.859,"provenance":"derived"}],"categories":["data","dev"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"mcp-pgsql-query","registry":"pypi","observedAt":"2026-11-03T14:24:08.510Z","publishedAt":"2026-08-31T15:25:56.050891Z","latestVersion":"0.1.0"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"mcp-pgsql-query","url":"https://pypi.org/project/mcp-pgsql-query/","firstSeenAt":"2026-09-10T02:24:45.452Z","fetchedAt":"2026-11-03T14:23:21.631Z","normalizedAt":"2026-11-03T14:23:21.631Z"}]},"firstSeenAt":"2026-09-10T02:24:45.452Z","updatedAt":"2026-11-03T14:24:08.510Z"}