{"_id":"mcp-postgres","_rev":"19-0bef991147f50c3c81ff9017ee4574d2","name":"mcp-postgres","dist-tags":{"latest":"1.4.2"},"versions":{"1.0.0":{"name":"mcp-postgres","version":"1.0.0","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Your Name"},"license":"MIT","_id":"mcp-postgres@1.0.0","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"f02bf53d8d3f2cf6199670441d8e42e2cf46a27a","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.0.0.tgz","fileCount":3,"integrity":"sha512-L0YLREl2A5AVtjee+FfOGxrgXgU/JRUXFyt4JwWENIEeqDKnap+HU6mC8n2+4FW7Wav4wgNfzv+5yUgBAkwgNQ==","signatures":[{"sig":"MEUCIQCiRqmmZq8cAbOC9lPyug4aPwx4zxPZhimmTywqvHwnPAIgGFgu+tZLshjLDICSm27BiliYE+VlqcaGTHoePSZE3r0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12005},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"1ae921a9bb801d0c6602d283e34709451d218347","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node server.mjs"},"_npmUser":{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"},"_npmVersion":"11.4.1","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"24.1.0","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.0.0_1760620797030_0.5474679037133288","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"mcp-postgres","version":"1.0.1","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Your Name"},"license":"MIT","_id":"mcp-postgres@1.0.1","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"c861e2bdf7eca31f0fb942872bd8c364044206f7","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.0.1.tgz","fileCount":3,"integrity":"sha512-QdJUwx9bepnuSTcdipENRuZ+ryTvGoc3RwKglbG/SFHLv8fvAhbJQdVh6wmgfr9tHGsh4q+pTH7va8EKA1Xo/w==","signatures":[{"sig":"MEYCIQCcUHoag79FJuvR2LKbjcrftQUwa0aZuf0LbR/3bbDmiwIhAK6ZlslVqcCyeToEix36qkv8hTt1B87pg9GzTBi7sv05","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14566},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"597417c0124faccdd587af04800c5aaa9eee3d07","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node server.mjs"},"_npmUser":{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"},"_npmVersion":"11.4.1","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"24.1.0","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.0.1_1760621909111_0.4738521307335464","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"mcp-postgres","version":"1.0.2","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Your Name"},"license":"MIT","_id":"mcp-postgres@1.0.2","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"46834de562babfa48c4f0f7aaacf28ba3e11fbd7","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.0.2.tgz","fileCount":3,"integrity":"sha512-LbrcYwRBHErNj+c783DqWEfAIv6DEocB1vPqpXJtwUe0yE+GNPFQsRJzRaFIt8Y6hJ+FdDhi0w1o8FNulM7f+Q==","signatures":[{"sig":"MEQCIHRFihTuXJB8v1zCiNh47rLSlhj3LHC/WiHX3GEchOv2AiBIqxa2m5j80+VMa238leVHjqPpPETL7rLU+ZE2VWGmig==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19067},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"eabe8c46838105e6162ed98dbae83fe020ad16a6","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node server.mjs"},"_npmUser":{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"},"_npmVersion":"11.4.1","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"24.1.0","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.0.2_1760622351415_0.2439347621931498","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"mcp-postgres","version":"1.0.3","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.0.3","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"83fba7e355cef80d5a01aa3cdf947255f2db515f","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.0.3.tgz","fileCount":3,"integrity":"sha512-IAtcawZmGIEGQQpqKmO85tmOqACz4Lh3IPujoewzKrA9/4gufghYMpeQVr/oTZO4XPv9YVjsme5S0Q3UA0QZXA==","signatures":[{"sig":"MEYCIQCazaYY+9FDCDSEmkKsbhG2JbhHRi45ORy7saha7D9W3QIhALIF0Rb/JT8knQnRV8hCM4DSN3AOX/BYXB8XaNyjXUVf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25587},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"d331cd4cc7a8c73d019c13a65e6e5bdc8cd6a968","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node server.mjs"},"_npmUser":{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"11.4.1","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"24.1.0","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.0.3_1760631229379_0.03362626145452996","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"mcp-postgres","version":"1.0.6","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.0.6","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"f53f2fdaae3e08c61ea319a155b262af1b590619","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.0.6.tgz","fileCount":3,"integrity":"sha512-h6fWVGFSQ4gsWLfeoBbVNrLjXh2riMkATIjTom4DYmOCUcWLbfG/Tqvbc6ZWctgtx6cQr5pSnYrWERFo42aZ1w==","signatures":[{"sig":"MEYCIQDP/8Hf4nCPLs6Dsnn5pzafFJwQnElsZrObSK2H/JHEvwIhAPYNZbWIbGCQGMkgtSDmsIrK+7JnoO5xa+HswDpjjFDY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25598},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"38a22fed528f63450126f59d8d80e3920d0e6ffe","scripts":{"test":"echo \"No tests yet - server startup test runs in CI\"","start":"node server.mjs"},"_npmUser":{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"11.4.1","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"24.1.0","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.0.6_1760634806881_0.5629545653093317","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"mcp-postgres","version":"1.0.7","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.0.7","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"21eda9b0cb926c12b5511fa482eaa8af4a4f927e","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.0.7.tgz","fileCount":3,"integrity":"sha512-EYcFsrUeUqRAct0q5d4mV/WIoRXuSe0nYjOmsP0qMDQQFV8Km0Wnyj0oHo1isylrBgXV8Wpac/q9aZKtRG+MsA==","signatures":[{"sig":"MEQCIA+JfYBNYVLsDqVR2yi4Cz3YWQsnom2e8SCJSd5UZ1YMAiAcOygEMYuE5VB9Rmud2XEGYco49Or2vTWLZV1qgdldSw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25598},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"ba10f5fb191d8f4b5a1e8537ce6d80187660b702","scripts":{"test":"echo \"No tests yet - server startup test runs in CI\"","start":"node server.mjs"},"_npmUser":{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"11.4.1","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"24.1.0","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.0.7_1760635611606_0.4638898169547221","host":"s3://npm-registry-packages-npm-production"}},"1.0.11":{"name":"mcp-postgres","version":"1.0.11","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.0.11","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"774f4b31a210aef7e5449a94b07ba51a714d2a71","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.0.11.tgz","fileCount":3,"integrity":"sha512-45JY09LulAM9ho2dj9w82qHHC8w3PZWsF6Q5Qm4Fvi5h21kIc95F2XC1MA9S/2zyM2mLP5B+bMW7n2MM6sD5nw==","signatures":[{"sig":"MEQCICHMI2iIHZccimXgLzo4qYnPabPqXDcMdZ7wtl4pUMCQAiA4jMNpSPQET6UR0xbbRZ7Q2euieUAtWXXAnGRA4MI/Og==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25601},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"6ebb6a898330a75dd30a571f9d28ff74a7062408","scripts":{"test":"echo \"No tests yet - server startup test runs in CI\"","start":"node server.mjs"},"_npmUser":{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"11.4.1","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"24.1.0","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.0.11_1760642429851_0.9013497862166227","host":"s3://npm-registry-packages-npm-production"}},"1.0.13":{"name":"mcp-postgres","version":"1.0.13","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.0.13","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"0642ade3e17420567355a436b100b6ebd06927d0","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.0.13.tgz","fileCount":3,"integrity":"sha512-rUHklyjdsh3N9337WQlSz8mC520rVI2TUwyGWC3rLboah67Q51xVGVjJfbLVXoxDArwPv/fNlNC3eDdjfzrYRw==","signatures":[{"sig":"MEQCIBL8q7QnT4sQodj2WN3popIonc/n8nZ9wH+0MPwQQsrtAiAd+CgxRwBSH8QOvKY/LRba3Uhg4XJsQ8sM9VBEQFZbug==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mcp-postgres@1.0.13","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":24776},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"655263c8f2ab57e826148375d42bd5cfeea42292","scripts":{"test":"echo \"No tests yet - server startup test runs in CI\"","start":"node server.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cad0f5cd-d44e-4c32-91a7-48602647841b"}},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"11.6.2","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"22.20.0","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.0.13_1760701706942_0.6469119580470921","host":"s3://npm-registry-packages-npm-production"}},"1.0.14":{"name":"mcp-postgres","version":"1.0.14","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.0.14","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"53c4737104c77f3c4a5c40e8bc124a0f5147dae8","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.0.14.tgz","fileCount":3,"integrity":"sha512-Ir+Mh+qq3qGJWVww5vJnxyiBcxmxufDiLnu8EuQImaGDy34qd4slGKb+Funvc1e80puZ8etzwJBh0xLBfrjHvA==","signatures":[{"sig":"MEUCIQCE3J7WHEtwcOghsi/I3Jsai6qoAiTg5btFz6iKGuTh9AIgbP76nDrsWjHGcdCp6q7W4yEIcy2j8AmrGhDfZ7DXhjU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mcp-postgres@1.0.14","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":25865},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"1e65d94a458aa6d5d8d6133bf5e677cfdd49c0ae","scripts":{"test":"echo \"No tests yet - server startup test runs in CI\"","start":"node server.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cad0f5cd-d44e-4c32-91a7-48602647841b"}},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"11.6.2","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"22.21.1","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.0.14_1763120288121_0.3538834260569681","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"mcp-postgres","version":"1.1.1","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.1.1","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"1d858e99ae3f60a0d478518094b818914450dacc","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.1.1.tgz","fileCount":3,"integrity":"sha512-tuWUvQUTtyPHfgFU3KEjkpReyPdxVHbBghNK4oF0EQlxzJa7+jyjLXxUNi6FcpRT+6OIo4FT6yOrjIOrryZwKA==","signatures":[{"sig":"MEUCIQCIFDMuNUO/crevnHJ6SXz3+h+/5G/h7/rMfoyD9+sK3AIgGDHHlLKHpFRgZN6JvbwApTcZ75eifP2ns5+udSacGUM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mcp-postgres@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46515},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"90e089607003b65cf7027d75662268b7534c5778","scripts":{"test":"echo \"No tests yet - server startup test runs in CI\"","start":"node server.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cad0f5cd-d44e-4c32-91a7-48602647841b"}},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"11.6.2","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"22.21.1","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.1.1_1763122365712_0.6988450071271721","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"mcp-postgres","version":"1.1.2","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.1.2","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"dd74f4dee0b3616588aa7e86366a96cf06017c73","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.1.2.tgz","fileCount":3,"integrity":"sha512-5lbp5C4ZhiP0Gg7TXI5PTufLfaRYfI3Jsw5YqIItNMX34lrrghbBQ0cT23uCVjNrN0IOjSfRdNgW2TzE4wnuBw==","signatures":[{"sig":"MEQCIDAd2l0IVZ5PVb/A/abAMVJQ5+Ee9MkEcjt+biyrAjd5AiAVElhZa+xrOUa0+EkrD12HenMXjm3F/4zhH1gyygpY2A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mcp-postgres@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46961},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"08b12071ee6261a391b5662c6bf36a4889d69972","scripts":{"test":"echo \"No tests yet - server startup test runs in CI\"","start":"node server.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cad0f5cd-d44e-4c32-91a7-48602647841b"}},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"11.6.2","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"22.21.1","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.1.2_1763276740781_0.9844431848239803","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"mcp-postgres","version":"1.2.0","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.2.0","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"f764ea536a04c092de3dcd476c844190c4b16a6a","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.2.0.tgz","fileCount":3,"integrity":"sha512-dXc8b7AJJkbNqDeUYvYWM692v+8aK+B5/FtzDlaEyAG4Ygt51u0/EVFOaAQhADJz9eIrSprCDCGiq5365Z9kZQ==","signatures":[{"sig":"MEUCIH43vO6gM3N+XBSXu8pQWt73yWMiBWmggrMUsoNhWYRfAiEAhmtJxm7p0d/lfmv1zN2Dtn/8quCHywZ+SFTBKO4QbRY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mcp-postgres@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":48025},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"d260d116d80a851c97eed669ea9bcba1dfd4272f","scripts":{"test":"node test-tools.mjs","start":"node server.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cad0f5cd-d44e-4c32-91a7-48602647841b"}},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"11.12.0","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"22.22.1","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.2.0_1774029805644_0.39963090997132134","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"mcp-postgres","version":"1.2.1","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.2.1","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"37ae9c9c481ea0c2a55cd1dcb239af0ce4b6e3f6","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.2.1.tgz","fileCount":3,"integrity":"sha512-pfPHSVNd/3RE45Bc7XIK7vE7ehEQ/ClCml/202iR6dDcp8kzp2fNNnnTZM+69xD0gk4TN0EUnNfKdaFQ89jtaQ==","signatures":[{"sig":"MEYCIQDSIFrF7+YKxr5XPAAYxD6tsbtUn9WIyNmPD0/FWyz9fwIhAOpmj12XZ/JqM258zanX8g/arRF+vQJyj88AfthPS6RZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mcp-postgres@1.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47989},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"460b6c2d0a58773bbc9dac06a7b7d68fe46b2124","scripts":{"test":"node test-tools.mjs","start":"node server.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cad0f5cd-d44e-4c32-91a7-48602647841b"}},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"11.12.0","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"22.22.1","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.2.1_1774038795881_0.516147905504805","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"mcp-postgres","version":"1.3.0","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.3.0","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"f8c67d38c490291741a7a30e83b055a0455a3bb8","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.3.0.tgz","fileCount":3,"integrity":"sha512-J6CQTRbjCITeKVnnaKhIhHgUTHpu20+TWK31KOOYwH/7LZraLoHHUwZMX/UXPhQaU3WT4ygi1bL751BmLeAHzQ==","signatures":[{"sig":"MEUCICWua+t1U5ZfmjLIFkHYPrsW6z9pRQfxMinZF+JdWiJjAiEAyukxgqDSxfTrBqRT8YF131KyJL84kDDcmWeQcShMV2E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mcp-postgres@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":51455},"main":"server.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"61ac8da40dee226169e48576540d61d5bacb79ad","scripts":{"test":"node test-tools.mjs","start":"node server.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cad0f5cd-d44e-4c32-91a7-48602647841b"}},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"11.15.0","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"22.22.2","dependencies":{"pg":"^8.16.3","@modelcontextprotocol/sdk":"^1.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.3.0_1779351902244_0.32528010700744203","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"mcp-postgres","version":"1.4.0","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.4.0","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"96a07b3b29d5b9df1cec3fed5c1a99d3283e6a3f","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.4.0.tgz","fileCount":4,"integrity":"sha512-fHVwWU84smgynrzR+K193b7KgW05pNeaBWDxrqiobLLAzQsLB+zvG3rSFWT9VQRfiYVjdgZwr/bgCQLAIRumog==","signatures":[{"sig":"MEYCIQCCAKW/41PtazXIkzhDloYAyVJ18eKZKuBGLawFpopotwIhAIQByWKSURnU3AH7loUdL8JK7xz/L7xxArZrV8S/2GoH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIH9i6eIj3EN3x6h3wVaq5PvW9Om8zPXDl5pGe7nlxdYyAiByAbCqs3x82brMND6l/7NfAOrcFVSvBNZjK85rueVbmw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mcp-postgres@1.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":52574},"main":"server.mjs","type":"module","engines":{"node":">=22.0.0"},"gitHead":"8acd3ccc96e2712ae0ff67f51455c8b6a3a3ad34","scripts":{"test":"node test-tools.mjs","start":"node server.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"cad0f5cd-d44e-4c32-91a7-48602647841b"}},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"12.2.0","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"24.21.0","dependencies":{"pg":"^8.23.1","@modelcontextprotocol/sdk":"^1.32.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.4.0_1791696258324_0.6840974077511526","host":"s3://npm-registry-packages-npm-production"}},"1.4.1":{"name":"mcp-postgres","version":"1.4.1","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"author":{"name":"Kristofer Nilsson"},"license":"MIT","_id":"mcp-postgres@1.4.1","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"bin":{"mcp-postgres":"server.mjs"},"dist":{"shasum":"b47ebb8e0a81efa4c367e12224712b89bebeec1f","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.4.1.tgz","fileCount":12,"integrity":"sha512-vvMYWBGuEkDkVV2G6X1nERPoNqGIq2d+hdx2GHXieJwMPhl91EraFhzi4qX8HPMrAsHJuSRzExaKmZGsvDVo8A==","signatures":[{"sig":"MEQCIHMfjRlR33/yIIUdJWgiAk6WD2TUIFYtdiixfEIMlyzSAiAqksBr6DHYeg94Xw4PvtTGTaMy+AipgVT5yRMp3lrdmg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQC8+gJkoWijDkEmxNKwfCvYbZv9syj0Z6KUg8a9t55x+gIgDlhDR9BQhSUzWdy0NAbTgaVGl+5h+ZKKj4vJHPhNTAA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mcp-postgres@1.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":54859},"main":"server.mjs","type":"module","engines":{"node":">=22.0.0"},"gitHead":"64cdbd2563977fe857c46961d1a23df98179d5c1","scripts":{"lint":"eslint .","test":"npm run test:unit && npm run test:integration","start":"node server.mjs","test:unit":"node --test \"test/**/*.test.mjs\"","test:integration":"node test-tools.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"cad0f5cd-d44e-4c32-91a7-48602647841b"}},"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"12.2.0","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"24.21.0","dependencies":{"pg":"^8.23.1","@modelcontextprotocol/sdk":"^1.32.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.12.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-postgres_1.4.1_1791702647647_0.39693083656065564","host":"s3://npm-registry-packages-npm-production"}},"1.4.2":{"_id":"mcp-postgres@1.4.2","bin":{"mcp-postgres":"server.mjs"},"bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"dist":{"shasum":"f313beafe6b4a1a1ba9194511982c974c08b0161","tarball":"https://registry.npmjs.org/mcp-postgres/-/mcp-postgres-1.4.2.tgz","fileCount":12,"integrity":"sha512-6tI6Wx6EHdPZoniMCPnIsrJ8NNSgFAzaMQ6cYbFBxgoSX93Ojc0cAsPjh4NNgbpFdXAkbyedVnevvdH7llgMcQ==","signatures":[{"sig":"MEQCIEKIZFukZBWvvtFov3aIrBBWf+aS58+rR/vCwuxVtGGPAiA7qCOJtO9Uexv8Yrg9l1fHYbyuWfMatDFHOeGMVfQ94A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBhn3Ec2SbaIeFWPWhpfEHdEWVm91pvEQS4rez2GfVUWAiAJyv/OMUmM45wkGX7hacGWba6WQjj8ZX4Ud8gWPf1v/g=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mcp-postgres@1.4.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":65611},"main":"server.mjs","name":"mcp-postgres","type":"module","author":{"name":"Kristofer Nilsson"},"engines":{"node":">=22.0.0"},"gitHead":"4b163be9c09210cad165629ce013166e7730b41b","license":"MIT","scripts":{"lint":"eslint .","test":"npm run test:unit && npm run test:integration","start":"node server.mjs","test:unit":"node --test \"test/**/*.test.mjs\"","test:integration":"node test-tools.mjs"},"version":"1.4.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"cad0f5cd-d44e-4c32-91a7-48602647841b"}},"homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"_npmVersion":"12.2.0","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"_nodeVersion":"24.21.0","dependencies":{"pg":"^8.23.1","@modelcontextprotocol/sdk":"^1.32.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.12.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-postgres_1.4.2_1792412130660_0.1398845667939672"}}},"time":{"created":"2025-10-16T13:19:57.029Z","modified":"2026-10-19T12:15:31.091Z","1.0.0":"2025-10-16T13:19:57.238Z","1.0.1":"2025-10-16T13:38:29.296Z","1.0.2":"2025-10-16T13:45:51.577Z","1.0.3":"2025-10-16T16:13:49.579Z","1.0.6":"2025-10-16T17:13:27.045Z","1.0.7":"2025-10-16T17:26:51.987Z","1.0.11":"2025-10-16T19:20:30.024Z","1.0.13":"2025-10-17T11:48:27.105Z","1.0.14":"2025-11-14T11:38:08.306Z","1.0.15":"2025-11-14T12:04:28.052Z","1.1.1":"2025-11-14T12:12:45.933Z","1.1.2":"2025-11-16T07:05:40.971Z","1.2.0":"2026-03-20T18:03:25.799Z","1.2.1":"2026-03-20T20:33:16.027Z","1.3.0":"2026-05-21T08:25:02.428Z","1.4.0":"2026-10-11T05:24:18.401Z","1.4.1":"2026-10-11T07:10:47.733Z","1.4.2":"2026-10-19T12:15:30.769Z"},"bugs":{"url":"https://github.com/kristofer84/mcp-postgres/issues"},"author":{"name":"Kristofer Nilsson"},"license":"MIT","homepage":"https://github.com/kristofer84/mcp-postgres#mcp-postgresql-server","keywords":["mcp","postgres","postgresql","database","model-context-protocol"],"repository":{"url":"git+https://github.com/kristofer84/mcp-postgres.git","type":"git"},"description":"Model Context Protocol server for PostgreSQL database operations","maintainers":[{"name":"kristofer84","email":"kristofer.john.nilsson@gmail.com"}],"readme":"# MCP PostgreSQL Server\n\n[![npm version](https://img.shields.io/npm/v/mcp-postgres.svg)](https://www.npmjs.com/package/mcp-postgres)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nA Model Context Protocol (MCP) server that provides PostgreSQL database access and operations.\n\n## Installation\n\nYou can use this MCP server with any MCP-compatible client by installing it via npm:\n\n```bash\nnpm install -g mcp-postgres\n```\n\nOr run it directly with npx:\n\n```bash\nnpx mcp-postgres@latest\n```\n\nRequires Node.js 22 or newer.\n\n## Configuration\n\n### MCP Client Configuration\n\nAdd this to your MCP client configuration (e.g., `.kiro/settings/mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres\": {\n      \"command\": \"npx\",\n      \"args\": [\"mcp-postgres@latest\"],\n      \"env\": {\n        \"DB_HOST\": \"localhost\",\n        \"DB_PORT\": \"5432\",\n        \"DB_USER\": \"postgres\",\n        \"DB_PASSWORD\": \"your_password\",\n        \"DB_NAME\": \"your_database\",\n        \"DB_SSL_MODE\": \"require\"\n      },\n      \"disabled\": false,\n      \"autoApprove\": [\"list_tables\", \"get_schema\"]\n    }\n  }\n}\n```\n\nAlternative using DATABASE_URL:\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres\": {\n      \"command\": \"npx\",\n      \"args\": [\"mcp-postgres@latest\"],\n      \"env\": {\n        \"DATABASE_URL\": \"postgresql://username:password@localhost:5432/database_name?sslmode=require\"\n      },\n      \"disabled\": false,\n      \"autoApprove\": [\"list_tables\", \"get_schema\"]\n    }\n  }\n}\n```\n\n### Environment Variables\n\nThe server supports multiple configuration methods:\n\n#### Option 1: Individual Environment Variables (Recommended)\n\n```bash\nDB_HOST=localhost\nDB_PORT=5432\nDB_USER=postgres\nDB_PASSWORD=your_password\nDB_NAME=your_database\nDB_SSL_MODE=require       # Optional: require, disable, or omit for default\nDB_READ_ONLY=true         # Optional: disables write/DDL tools and makes the DB session read-only\nDB_STATEMENT_TIMEOUT=30000  # Optional: query timeout in ms (default: 30000)\n```\n\nAlternative PostgreSQL-style variable names are also supported:\n\n```bash\nPOSTGRES_HOST=localhost\nPOSTGRES_PORT=5432\nPOSTGRES_USER=postgres\nPOSTGRES_PASSWORD=your_password\nPOSTGRES_DB=your_database\nPOSTGRES_SSL_MODE=require  # Optional: require, disable, or omit for default\n```\n\n#### Option 2: DATABASE_URL (Fallback)\n\n```bash\nDATABASE_URL=postgresql://username:password@localhost:5432/database_name?sslmode=require\n```\n\n#### Option 3: Config File\n\nCreate a `config.json` file in your working directory:\n\n```json\n{\n  \"db\": {\n    \"host\": \"localhost\",\n    \"port\": 5432,\n    \"user\": \"postgres\",\n    \"password\": \"your_password\",\n    \"database\": \"your_database\",\n    \"sslmode\": \"require\"\n  }\n}\n```\n\n### SSL Configuration\n\nThe server supports SSL connections with the following modes:\n\n- `require` - Forces SSL connection (useful for cloud databases)\n- `disable` - Explicitly disables SSL (default for local development)\n- Omit the SSL mode for default behavior (no SSL)\n\nSSL can be configured via:\n\n- Environment variables: `DB_SSL_MODE` or `POSTGRES_SSL_MODE`\n- DATABASE_URL parameter: `?sslmode=require`\n- Config file: `\"sslmode\": \"require\"`\n\n#### AWS RDS Auto-Configuration\n\nThe server automatically detects AWS RDS endpoints (hosts containing `.rds.amazonaws.com`) and:\n\n1. **Automatically downloads** the AWS RDS Global Certificate Bundle from `https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem`\n2. **Caches the certificate** locally in `.aws-certs/` directory for 30 days\n3. **Configures SSL** with proper certificate validation using the downloaded bundle\n4. **Re-downloads** the certificate automatically if it's older than 30 days\n5. **Graceful fallback** to basic SSL if certificate download fails\n\nThis means you can connect to AWS RDS instances without manually downloading or configuring SSL certificates. Simply provide your RDS endpoint and the server handles the rest:\n\n```bash\nDB_HOST=mydb.cluster-xyz.us-east-1.rds.amazonaws.com\nDB_USER=postgres\nDB_PASSWORD=your_password\nDB_NAME=your_database\n# No need to set DB_SSL_MODE - automatically configured for RDS\n```\n\n**Features:**\n\n- **Persistent disk caching**: Certificate is saved to `.aws-certs/rds-global-bundle.pem` and persists between sessions\n- **30-day cache duration**: Certificate is automatically refreshed after 30 days\n- **Cache validation**: Verifies cached certificates aren't corrupted before use\n- **Connection retry**: Automatic retry logic with 3 attempts and 2-second delays\n- **Error handling**: Falls back to basic SSL if certificate download fails\n- **Performance**: Certificate is cached in memory after first read to avoid repeated file operations\n- **Cache monitoring**: Use the `check_certificate_cache` tool to view cache status\n\nThe auto-configuration ensures secure, verified connections to AWS RDS while maintaining convenience and reliability.\n\n## Available Tools\n\n### `list_tables`\n\nLists all tables in the database with their types.\n\n### `get_schema`\n\nGets database schema information including tables and columns.\n\n- Optional parameter: `table_name` - Get schema for a specific table\n\n### `execute_query`\n\nExecutes a SQL query (SELECT statements only for safety).\n\n- Required parameter: `query` - The SQL SELECT query to execute\n\n### `describe_table`\n\nGet detailed information about a specific table including indexes and constraints.\n\n- Required parameter: `table_name` - Name of the table to describe\n\n### `get_table_sample`\n\nGets a sample of rows from a table.\n\n- Required parameter: `table_name` - Name of the table to sample\n- Optional parameter: `limit` - Number of rows to return (default: 10, max: 100)\n\n### `check_certificate_cache`\n\nChecks the status of the AWS RDS certificate cache.\n\n- Shows cache location, age, expiration status, and file details\n- Useful for troubleshooting SSL connection issues with RDS\n\n## Security\n\n### Read-Only Mode\n\nSet `DB_READ_ONLY=true` to disable all write and DDL tools at the server level. When enabled, the following tools are hidden from the tool list and will return an error if called:\n\n- `update_data`\n- `delete_data`\n- `insert_data`\n- `execute_raw_query`\n- `create_table`\n- `alter_table`\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres\": {\n      \"command\": \"npx\",\n      \"args\": [\"mcp-postgres@latest\"],\n      \"env\": {\n        \"DB_HOST\": \"localhost\",\n        \"DB_READ_ONLY\": \"true\",\n        ...\n      },\n      \"autoApprove\": [\"list_tables\", \"get_schema\"]\n    }\n  }\n}\n```\n\nThis is enforced server-side — it cannot be bypassed by the MCP client, and is independent of the client's `autoApprove` list.\n\nRead-only mode is enforced at three levels:\n\n1. Write and DDL tools are hidden and rejected.\n2. The database session uses `default_transaction_read_only = on`.\n3. Every `query_data` call runs inside an explicit `BEGIN TRANSACTION READ ONLY` block, so a query cannot switch the session back to read-write for a later statement.\n\nIn read-only mode, `query_data` also rejects calls to `VOLATILE` PostgreSQL functions. Volatile functions are the ones PostgreSQL allows to have side effects, which includes `dblink_exec()` and similar functions that can open a second connection and write outside the current read-only transaction. This is enforced by looking up the function in `pg_proc`, not by matching a fixed list of names. A few harmless volatile functions (for example `random()`) are also rejected while `DB_READ_ONLY=true`.\n\n`query_data` in read-only mode is intended for ordinary `SELECT` queries and built-in read-only functions. If you need extension functions that are genuinely read-only, they will work when they are marked `STABLE` or `IMMUTABLE`. For the strongest isolation, still connect with a SELECT-only database role — that also covers functions, operators, or type input functions that declare themselves non-volatile while performing external actions.\n\n### Least-Privilege Database Roles (Recommended)\n\nFor defence in depth, connect with a PostgreSQL user that only has the permissions it needs. Even with `DB_READ_ONLY=true`, using a restricted database role ensures the server cannot accidentally or maliciously access data beyond its scope. A SELECT-only role is the strongest boundary and is the recommended setup for any server exposed to untrusted callers.\n\n**Read-only role** (schema inspection + SELECT):\n\n```sql\nCREATE ROLE mcp_readonly WITH LOGIN PASSWORD 'strong_password';\n-- Allow connecting to the database\nGRANT CONNECT ON DATABASE your_database TO mcp_readonly;\n-- Allow reading schema metadata\nGRANT USAGE ON SCHEMA public TO mcp_readonly;\n-- Allow SELECT on all current tables\nGRANT SELECT ON ALL TABLES IN SCHEMA public TO mcp_readonly;\n-- Allow SELECT on future tables too\nALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO mcp_readonly;\n```\n\n**Read-write role** (no DDL):\n\n```sql\nCREATE ROLE mcp_readwrite WITH LOGIN PASSWORD 'strong_password';\nGRANT CONNECT ON DATABASE your_database TO mcp_readwrite;\nGRANT USAGE ON SCHEMA public TO mcp_readwrite;\nGRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO mcp_readwrite;\nALTER DEFAULT PRIVILEGES IN SCHEMA public\n  GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO mcp_readwrite;\n```\n\nThis role can use all tools except `create_table`, `alter_table`, and `execute_raw_query` (which can run DDL). Consider whether those tools are needed and restrict accordingly.\n\n**What to avoid:** connecting as a superuser (`postgres`) or a user with `CREATEDB` / `CREATEROLE` privileges. If `execute_raw_query` is enabled, a superuser connection has no effective guardrails.\n\n### Query Safety\n\nOnly a single SELECT statement is allowed through the `query_data` tool; comments and string literals are parsed before the multi-statement check, so a marker such as `--` inside a string cannot hide a second statement. In read-only mode, volatile functions are rejected as described above. The `execute_raw_query` tool has no such restriction — disable it via `DB_READ_ONLY=true` or use a role without write permissions if you don't need it.\n\n## Testing\n\n### Testing with MCP Inspector\n\nYou can test the server locally using the MCP Inspector tool:\n\n```powershell\n# Install the MCP inspector\nnpm install -g @modelcontextprotocol/inspector\n\n# Set your database credentials\n$env:DB_HOST=\"localhost\"\n$env:DB_USER=\"postgres\"\n$env:DB_PASSWORD=\"your_password\"\n$env:DB_NAME=\"your_database\"\n\n# Run the inspector\nmcp-inspector node server.mjs\n```\n\nThe inspector opens a web UI where you can interactively test each tool and see the responses.\n\n### Testing in Kiro IDE\n\nOnce configured in your `.kiro/settings/mcp.json`, you can test the tools directly:\n\n- \"List all tables in the database\"\n- \"Show me the schema for the users table\"\n- \"Execute this query: SELECT \\* FROM products WHERE price > 100\"\n\n## Project Structure\n\n```\nserver.mjs          Entry point: server wiring and shutdown handling\nsrc/\n  sql.mjs           Pure helpers: quoting, validation, query checks\n  ssl.mjs           AWS RDS certificate handling and SSL config\n  config.mjs        Configuration loading\n  db.mjs            Database connection lifecycle\n  tools/\n    index.mjs       Tool definitions and dispatch\n    read.mjs        Read-only tool handlers\n    write.mjs       Write and DDL tool handlers\ntest/\n  sql.test.mjs      Unit tests for the pure helpers\ntest-tools.mjs      Integration tests (need a running PostgreSQL)\n```\n\nRun `npm run test:unit` for the unit tests and `npm test` for everything.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}