{"_id":"@achmadya-dev/mcp-postgres-query","_rev":"6-b8ba28bfa820d3a48fd160bac16c7d7c","name":"@achmadya-dev/mcp-postgres-query","dist-tags":{"latest":"0.3.2"},"versions":{"0.2.0":{"name":"@achmadya-dev/mcp-postgres-query","version":"0.2.0","keywords":["mcp","model-context-protocol","postgres","postgresql","database","cursor"],"author":{"name":"achmadya"},"license":"MIT","_id":"@achmadya-dev/mcp-postgres-query@0.2.0","maintainers":[{"name":"madyardwn","email":"achmadya.dev@gmail.com"}],"homepage":"https://github.com/achmadya-dev/mcp-postgres-query#readme","bugs":{"url":"https://github.com/achmadya-dev/mcp-postgres-query/issues"},"bin":{"mcp-postgres-query":"dist/index.js"},"dist":{"shasum":"1f1dbe256363f4219930a879f3ab82466d3425cf","tarball":"https://registry.npmjs.org/@achmadya-dev/mcp-postgres-query/-/mcp-postgres-query-0.2.0.tgz","fileCount":43,"integrity":"sha512-NmVzEGR9QMRUWa3iO3YdyoRsA45OAuHHem1nUwK2FhYXSj9GRZ05iXkc4yfwRU9mHuTLbu2e1SDz41bxlh2+Iw==","signatures":[{"sig":"MEUCIHKcW1iZZBZjfWPZZe36ev+5ojbhwx3EhtzFcLScecWTAiEAwRyOc8SCLuXOv1UGC38MSJZ4UM2qbl1SV8/RWQqKDus=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47741},"main":"dist/index.js","type":"module","_from":"file:achmadya-dev-mcp-postgres-query-0.2.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"scripts":{"test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc -p tsconfig.build.json","start":"node dist/index.js","changeset":"changeset","publish-packages":"pnpm run build && changeset publish","version-packages":"changeset version"},"_npmUser":{"name":"madyardwn","email":"achmadya.dev@gmail.com"},"_resolved":"/tmp/20cf635b32d21f6e8696b2c0b59060c4/achmadya-dev-mcp-postgres-query-0.2.0.tgz","_integrity":"sha512-NmVzEGR9QMRUWa3iO3YdyoRsA45OAuHHem1nUwK2FhYXSj9GRZ05iXkc4yfwRU9mHuTLbu2e1SDz41bxlh2+Iw==","repository":{"url":"git+https://github.com/achmadya-dev/mcp-postgres-query.git","type":"git"},"_npmVersion":"11.13.0","description":"Model Context Protocol (MCP) server for PostgreSQL to run SQL queries via stdio (read-only by default)","directories":{},"_nodeVersion":"24.16.0","dependencies":{"pg":"8.13.1","zod":"4.3.6","@achmadya-dev/mcp-core":"^0.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"30.4.2","ts-jest":"29.4.11","@types/pg":"8.11.10","typescript":"5.7.2","@types/jest":"30.0.0","@types/node":"22.10.0","@jest/globals":"30.4.1","@changesets/cli":"2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres-query_0.2.0_1781402499407_0.6091304826945236","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@achmadya-dev/mcp-postgres-query","version":"0.2.1","keywords":["mcp","model-context-protocol","postgres","postgresql","database","cursor"],"author":{"name":"achmadya"},"license":"MIT","_id":"@achmadya-dev/mcp-postgres-query@0.2.1","maintainers":[{"name":"madyardwn","email":"achmadya.dev@gmail.com"}],"homepage":"https://github.com/achmadya-dev/mcp-postgres-query#readme","bugs":{"url":"https://github.com/achmadya-dev/mcp-postgres-query/issues"},"bin":{"mcp-postgres-query":"dist/index.js"},"dist":{"shasum":"5ab158960782cba7ac6ea216fc3758929d42da72","tarball":"https://registry.npmjs.org/@achmadya-dev/mcp-postgres-query/-/mcp-postgres-query-0.2.1.tgz","fileCount":43,"integrity":"sha512-pUcs/YmLFtsZAvIkgqLpM+Ej1fofZG6wdHq4ywE2UUxiU9x9kHNfnsX/9dG3DrnlYCA2Yx7Uy8p8I62FCb/8xA==","signatures":[{"sig":"MEQCIBwRWHHy87OQcqWOxdHPGpDScVgdQB8NjZhI5cqBMyX+AiB5jVnYm1YcNl1iVfVWKt70LQPN3GpQS4mOWrX9Pt7BGQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47911},"main":"dist/index.js","type":"module","_from":"file:achmadya-dev-mcp-postgres-query-0.2.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"scripts":{"test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc -p tsconfig.build.json","start":"node dist/index.js","changeset":"changeset","publish-packages":"pnpm run build && changeset publish","version-packages":"changeset version"},"_npmUser":{"name":"madyardwn","email":"achmadya.dev@gmail.com"},"_resolved":"/tmp/45758740e4ecd5e5856877a7d53b76c4/achmadya-dev-mcp-postgres-query-0.2.1.tgz","_integrity":"sha512-pUcs/YmLFtsZAvIkgqLpM+Ej1fofZG6wdHq4ywE2UUxiU9x9kHNfnsX/9dG3DrnlYCA2Yx7Uy8p8I62FCb/8xA==","repository":{"url":"git+https://github.com/achmadya-dev/mcp-postgres-query.git","type":"git"},"_npmVersion":"11.13.0","description":"Model Context Protocol (MCP) server for PostgreSQL to run SQL queries via stdio (read-only by default)","directories":{},"_nodeVersion":"24.16.0","dependencies":{"pg":"8.13.1","zod":"4.3.6","@achmadya-dev/mcp-core":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"30.4.2","husky":"9.1.7","ts-jest":"29.4.11","@types/pg":"8.11.10","typescript":"5.7.2","@types/jest":"30.0.0","@types/node":"22.10.0","@jest/globals":"30.4.1","@changesets/cli":"2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres-query_0.2.1_1781916930884_0.9208004382435897","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@achmadya-dev/mcp-postgres-query","version":"0.2.2","keywords":["mcp","model-context-protocol","postgres","postgresql","database","cursor"],"author":{"name":"achmadya"},"license":"MIT","_id":"@achmadya-dev/mcp-postgres-query@0.2.2","maintainers":[{"name":"madyardwn","email":"achmadya.dev@gmail.com"}],"homepage":"https://github.com/achmadya-dev/mcp-postgres-query#readme","bugs":{"url":"https://github.com/achmadya-dev/mcp-postgres-query/issues"},"bin":{"mcp-postgres-query":"dist/index.js"},"dist":{"shasum":"79e4f19482692eeda2f318b3ee5898effdea2170","tarball":"https://registry.npmjs.org/@achmadya-dev/mcp-postgres-query/-/mcp-postgres-query-0.2.2.tgz","fileCount":43,"integrity":"sha512-4ZWkhIXDuEhMSTq4WlB8qSQSRQ/kaW8c2L7kHTO7nURLTENP8cPi/9osZrrsbyFiK6dmlUOgCKuejRfAEk/gJg==","signatures":[{"sig":"MEUCIE/CH2sGQaXZug6acKpn4YWyGKH7bbrQuTT2T4jePL+WAiEArfd6LcxW9c99WTgVSVC+gsqJYyVFQ+OHDG65+yZJZj0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47911},"main":"dist/index.js","type":"module","_from":"file:achmadya-dev-mcp-postgres-query-0.2.2.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"scripts":{"test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc -p tsconfig.build.json","start":"node dist/index.js","changeset":"changeset","publish-packages":"pnpm run build && changeset publish","version-packages":"changeset version"},"_npmUser":{"name":"madyardwn","email":"achmadya.dev@gmail.com"},"_resolved":"/tmp/684156c4e391a2e49d419de81ec244ee/achmadya-dev-mcp-postgres-query-0.2.2.tgz","_integrity":"sha512-4ZWkhIXDuEhMSTq4WlB8qSQSRQ/kaW8c2L7kHTO7nURLTENP8cPi/9osZrrsbyFiK6dmlUOgCKuejRfAEk/gJg==","repository":{"url":"git+https://github.com/achmadya-dev/mcp-postgres-query.git","type":"git"},"_npmVersion":"11.13.0","description":"Model Context Protocol (MCP) server for PostgreSQL to run SQL queries via stdio (read-only by default)","directories":{},"_nodeVersion":"24.16.0","dependencies":{"pg":"8.13.1","zod":"4.3.6","@achmadya-dev/mcp-core":"^0.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"30.4.2","husky":"9.1.7","ts-jest":"29.4.11","@types/pg":"8.11.10","typescript":"5.7.2","@types/jest":"30.0.0","@types/node":"22.10.0","@jest/globals":"30.4.1","@changesets/cli":"2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres-query_0.2.2_1782005491641_0.958001876396634","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@achmadya-dev/mcp-postgres-query","version":"0.3.0","keywords":["mcp","model-context-protocol","postgres","postgresql","database","cursor"],"author":{"name":"achmadya"},"license":"MIT","_id":"@achmadya-dev/mcp-postgres-query@0.3.0","maintainers":[{"name":"madyardwn","email":"achmadya.dev@gmail.com"}],"homepage":"https://github.com/achmadya-dev/mcp-postgres-query#readme","bugs":{"url":"https://github.com/achmadya-dev/mcp-postgres-query/issues"},"bin":{"mcp-postgres-query":"dist/index.js"},"dist":{"shasum":"e0170fbaee278c868310dc086dc6e51da34056a8","tarball":"https://registry.npmjs.org/@achmadya-dev/mcp-postgres-query/-/mcp-postgres-query-0.3.0.tgz","fileCount":43,"integrity":"sha512-/mJhpLeKqv1NNkCEP8MGXbq41qj2GIIl9ivaMFEXnpqqOCrN+tF/HENBN5gk+dMe7oStmpjFj+Nxgh1Q/guGOg==","signatures":[{"sig":"MEUCIQCOzpd9/IZS4Rvmtb9uPxpblId03EDRW7dM5zJjitrGvAIgcv52/aYHJPrjMS6yLdQ46ao4FaT9J/ZK1k2wwhG0c8c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49237},"main":"dist/index.js","type":"module","_from":"file:achmadya-dev-mcp-postgres-query-0.3.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"scripts":{"test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc -p tsconfig.build.json","start":"node dist/index.js","changeset":"changeset","publish-packages":"pnpm run build && changeset publish","version-packages":"changeset version"},"_npmUser":{"name":"madyardwn","email":"achmadya.dev@gmail.com"},"_resolved":"/tmp/235add416cd32abdae333b3ca5f539b9/achmadya-dev-mcp-postgres-query-0.3.0.tgz","_integrity":"sha512-/mJhpLeKqv1NNkCEP8MGXbq41qj2GIIl9ivaMFEXnpqqOCrN+tF/HENBN5gk+dMe7oStmpjFj+Nxgh1Q/guGOg==","repository":{"url":"git+https://github.com/achmadya-dev/mcp-postgres-query.git","type":"git"},"_npmVersion":"11.13.0","description":"Model Context Protocol (MCP) server for PostgreSQL to run SQL queries via stdio (read-only by default)","directories":{},"_nodeVersion":"24.16.0","dependencies":{"pg":"8.13.1","zod":"4.3.6","@achmadya-dev/mcp-core":"^0.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"30.4.2","husky":"9.1.7","ts-jest":"29.4.11","@types/pg":"8.11.10","typescript":"5.7.2","@types/jest":"30.0.0","@types/node":"22.10.0","@jest/globals":"30.4.1","@changesets/cli":"2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres-query_0.3.0_1782006364916_0.951037379785665","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@achmadya-dev/mcp-postgres-query","version":"0.3.1","keywords":["mcp","model-context-protocol","postgres","postgresql","database","cursor"],"author":{"name":"achmadya"},"license":"MIT","_id":"@achmadya-dev/mcp-postgres-query@0.3.1","maintainers":[{"name":"madyardwn","email":"achmadya.dev@gmail.com"}],"homepage":"https://github.com/achmadya-dev/mcp-postgres-query#readme","bugs":{"url":"https://github.com/achmadya-dev/mcp-postgres-query/issues"},"bin":{"mcp-postgres-query":"dist/index.js"},"dist":{"shasum":"e73c3364e2a6a8493a6f8b8132174d480d0d336a","tarball":"https://registry.npmjs.org/@achmadya-dev/mcp-postgres-query/-/mcp-postgres-query-0.3.1.tgz","fileCount":47,"integrity":"sha512-WFxLi56/dKsOGYawZCZfmVZs/n5I4t/RGzWO/OTA7XSCE8F8nwStesCS3HRDE4wp5FYotP508t2Q6XxLRctFng==","signatures":[{"sig":"MEQCIB0wAAFV9ZyE60Sc/S51WGGbALfrma+QGKuG7WxoXDggAiB/ZZ1T69fb5XtKjP3pKorNHS5l5lXb6OU976URp9RjEw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54152},"main":"dist/index.js","type":"module","_from":"file:achmadya-dev-mcp-postgres-query-0.3.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"scripts":{"test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc -p tsconfig.build.json","start":"node dist/index.js","changeset":"changeset","publish-packages":"pnpm run build && changeset publish","version-packages":"changeset version"},"_npmUser":{"name":"madyardwn","email":"achmadya.dev@gmail.com"},"_resolved":"/tmp/c1ca315a935911d7a4994cf7d4ebd2e6/achmadya-dev-mcp-postgres-query-0.3.1.tgz","_integrity":"sha512-WFxLi56/dKsOGYawZCZfmVZs/n5I4t/RGzWO/OTA7XSCE8F8nwStesCS3HRDE4wp5FYotP508t2Q6XxLRctFng==","repository":{"url":"git+https://github.com/achmadya-dev/mcp-postgres-query.git","type":"git"},"_npmVersion":"11.13.0","description":"Model Context Protocol (MCP) server for PostgreSQL to run SQL queries via stdio (read-only by default)","directories":{},"_nodeVersion":"24.16.0","dependencies":{"pg":"8.13.1","zod":"4.3.6","@achmadya-dev/mcp-core":"^0.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"30.4.2","husky":"9.1.7","ts-jest":"29.4.11","@types/pg":"8.11.10","typescript":"5.7.2","@types/jest":"30.0.0","@types/node":"22.10.0","@jest/globals":"30.4.1","@changesets/cli":"2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres-query_0.3.1_1782007760977_0.6069652746596776","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@achmadya-dev/mcp-postgres-query","version":"0.3.2","description":"Model Context Protocol (MCP) server for PostgreSQL to run SQL queries via stdio (read-only by default)","type":"module","author":{"name":"achmadya"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/achmadya-dev/mcp-postgres-query.git"},"keywords":["mcp","model-context-protocol","postgres","postgresql","database","cursor"],"main":"dist/index.js","bin":{"mcp-postgres-query":"dist/index.js"},"publishConfig":{"access":"public"},"engines":{"node":">=20"},"dependencies":{"@achmadya-dev/mcp-core":"^0.8.0","pg":"8.13.1","zod":"4.3.6"},"devDependencies":{"@changesets/cli":"2.29.8","@jest/globals":"30.4.1","@types/jest":"30.0.0","@types/node":"22.10.0","@types/pg":"8.11.10","husky":"9.1.7","jest":"30.4.2","ts-jest":"29.4.11","typescript":"5.7.2"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","start":"node dist/index.js","changeset":"changeset","version-packages":"changeset version","publish-packages":"pnpm run build && changeset publish"},"types":"./dist/index.d.ts","_id":"@achmadya-dev/mcp-postgres-query@0.3.2","bugs":{"url":"https://github.com/achmadya-dev/mcp-postgres-query/issues"},"homepage":"https://github.com/achmadya-dev/mcp-postgres-query#readme","_integrity":"sha512-D0dec75I5YscZjn6sS1m+jaBBVZcHV6fh2RB0eYNXhLRBAB5DW9f7GtsMMm4K+nHGnlarke7I40GUIJGdzqAeg==","_resolved":"/tmp/2ae33e6f9ed7940f9e903478faf38c7a/achmadya-dev-mcp-postgres-query-0.3.2.tgz","_from":"file:achmadya-dev-mcp-postgres-query-0.3.2.tgz","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-D0dec75I5YscZjn6sS1m+jaBBVZcHV6fh2RB0eYNXhLRBAB5DW9f7GtsMMm4K+nHGnlarke7I40GUIJGdzqAeg==","shasum":"69139b63d173b19650d1a8f146a075e041ae0fbc","tarball":"https://registry.npmjs.org/@achmadya-dev/mcp-postgres-query/-/mcp-postgres-query-0.3.2.tgz","fileCount":47,"unpackedSize":54152,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDkK772+njiq/UUTh1cBtui+en36o0MuF8mtpTlZaGIJAiEAqQYe2kU4ccB5dhqDUqLYn6/5lyF+ppePmeIFYrLqofg="}]},"_npmUser":{"name":"madyardwn","email":"achmadya.dev@gmail.com"},"directories":{},"maintainers":[{"name":"madyardwn","email":"achmadya.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-postgres-query_0.3.2_1782027885065_0.9233374251975666"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-14T02:01:39.192Z","modified":"2026-06-21T07:44:45.343Z","0.2.0":"2026-06-14T02:01:39.542Z","0.2.1":"2026-06-20T00:55:31.037Z","0.2.2":"2026-06-21T01:31:31.787Z","0.3.0":"2026-06-21T01:46:05.055Z","0.3.1":"2026-06-21T02:09:21.122Z","0.3.2":"2026-06-21T07:44:45.204Z"},"bugs":{"url":"https://github.com/achmadya-dev/mcp-postgres-query/issues"},"author":{"name":"achmadya"},"license":"MIT","homepage":"https://github.com/achmadya-dev/mcp-postgres-query#readme","keywords":["mcp","model-context-protocol","postgres","postgresql","database","cursor"],"repository":{"type":"git","url":"git+https://github.com/achmadya-dev/mcp-postgres-query.git"},"description":"Model Context Protocol (MCP) server for PostgreSQL to run SQL queries via stdio (read-only by default)","maintainers":[{"name":"madyardwn","email":"achmadya.dev@gmail.com"}],"readme":"# @achmadya-dev/mcp-postgres-query\n\nMCP server for PostgreSQL. Runs a single SQL statement per tool call over **stdio**. **Read-only by default** — writes and DDL require explicit env flags.\n\n## Requirements\n\n- Node.js **≥ 20**\n- A reachable PostgreSQL server\n\n## Install from npm\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@achmadya-dev/mcp-postgres-query\"],\n      \"env\": {\n        \"POSTGRES_HOST\": \"localhost\",\n        \"POSTGRES_PORT\": \"5432\",\n        \"POSTGRES_USER\": \"your_user\",\n        \"POSTGRES_PASSWORD\": \"your_password\",\n        \"POSTGRES_DATABASE\": \"your_database\"\n      }\n    }\n  }\n}\n```\n\nOr use `envFile` instead of inline `env` (see [Cursor MCP docs](https://cursor.com/docs/mcp)).\n\n## Develop from source\n\n```bash\ngit clone https://github.com/achmadya-dev/mcp-postgres-query.git\ncd mcp-postgres-query\npnpm install\npnpm run build\npnpm test\n```\n\nOpen the repo root in Cursor. You need a reachable PostgreSQL instance — set connection env in `.cursor/mcp.json` or via `envFile`:\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres\": {\n      \"command\": \"node\",\n      \"args\": [\"${workspaceFolder}/dist/index.js\"],\n      \"env\": {\n        \"POSTGRES_HOST\": \"localhost\",\n        \"POSTGRES_PORT\": \"5432\",\n        \"POSTGRES_USER\": \"your_user\",\n        \"POSTGRES_PASSWORD\": \"your_password\",\n        \"POSTGRES_DATABASE\": \"your_database\"\n      }\n    }\n  }\n}\n```\n\n## Environment variables\n\n### Connection\n\n| Variable            | Default      | Description                        |\n| ------------------- | ------------ | ---------------------------------- |\n| `POSTGRES_HOST`     | `localhost`  | PostgreSQL host                    |\n| `POSTGRES_PORT`     | `5432`       | Port                               |\n| `POSTGRES_USER`     | _(empty)_    | Username                           |\n| `POSTGRES_PASSWORD` | _(empty)_    | Password                           |\n| `POSTGRES_DATABASE` | _(optional)_ | Default database                   |\n| `POSTGRES_MAX_ROWS` | `500`        | Max rows for row-returning queries |\n\n### Write access\n\n| Variable                 | Allows   |\n| ------------------------ | -------- |\n| `ALLOW_INSERT_OPERATION` | `INSERT` |\n| `ALLOW_UPDATE_OPERATION` | `UPDATE` |\n| `ALLOW_DELETE_OPERATION` | `DELETE` |\n| `ALLOW_DDL_OPERATION`    | DDL      |\n\nEnabled values: `true`, `1`, `yes`, `on`.\n\n## Tools\n\n| Tool              | Statements                                     | Env flag                 |\n| ----------------- | ---------------------------------------------- | ------------------------ |\n| `postgres_select` | `SELECT`, `EXPLAIN`, `TABLE`, `VALUES`, `SHOW` | always on                |\n| `postgres_insert` | `INSERT`                                       | `ALLOW_INSERT_OPERATION` |\n| `postgres_update` | `UPDATE`                                       | `ALLOW_UPDATE_OPERATION` |\n| `postgres_delete` | `DELETE`                                       | `ALLOW_DELETE_OPERATION` |\n| `postgres_ddl`    | DDL                                            | `ALLOW_DDL_OPERATION`    |\n\n### Tool input\n\n| Parameter  | Required | Description                                 |\n| ---------- | -------- | ------------------------------------------- |\n| `sql`      | yes      | Single SQL statement                        |\n| `database` | no       | Overrides `POSTGRES_DATABASE` for this call |\n\nExample:\n\n```json\n{\n  \"sql\": \"SELECT datname FROM pg_database\",\n  \"database\": \"postgres\"\n}\n```\n\nUse `schema.table` in `sql` for other schemas in the same database.\n\n## Behavior and security\n\n- One statement per request.\n- Results are JSON text with `columns`, `rows`, `rowCount`, `truncated`, `maxRows` for row-returning queries.\n- Execute results return `kind: \"execute\"` with `affectedRows`.\n\n## Package scripts\n\n```bash\npnpm run build\npnpm test\npnpm start\n```\n","readmeFilename":"README.md"}