{"_id":"@ahmetkca/mcp-server-postgres","_rev":"9-60fc809174928c62e3c03a15f4b19cf8","name":"@ahmetkca/mcp-server-postgres","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@ahmetkca/mcp-server-postgres","version":"1.0.0","keywords":["mcp","model-context-protocol","postgresql","postgres","database","multi-tenant","schema-introspection","read-only","ai","llm"],"author":{"name":"AHMET KARAPINAR","email":"akarapinar53@gmail.com"},"license":"MIT","_id":"@ahmetkca/mcp-server-postgres@1.0.0","maintainers":[{"name":"ahmetkca","email":"akarapinrar@gmail.com"}],"homepage":"https://github.com/ahmetkca/mcp-server-postgres#readme","bugs":{"url":"https://github.com/ahmetkca/mcp-server-postgres/issues"},"bin":{"mcp-server-postgres":"dist/index.js"},"dist":{"shasum":"afbe3e07b15b5735369f7244f2524131cce5bee3","tarball":"https://registry.npmjs.org/@ahmetkca/mcp-server-postgres/-/mcp-server-postgres-1.0.0.tgz","fileCount":4,"integrity":"sha512-3vsnsJTv9oeDhzMfIMaiQXgGHLe4UYE7w1yFWdcUXPGMSOCFRLfgZNhcLiFbD9es9nHOvQ1hEKBi8ufX4fl7aw==","signatures":[{"sig":"MEUCIQCLfbthcJl3m+QEkJylTDduKsyjWRsLWTMiw+a/UgrY2wIgAXTVfxDpiffOteUNhBfWFeD/eNhhRCYVHPwzMOLAk64=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31484},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"9be4674d1ddf8c469e6461a27a337eeb65f76c2e","scripts":{"dev":"tsc --watch","build":"shx rm -rf dist && tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"ahmetkca","email":"akarapinrar@gmail.com"},"repository":{"url":"git+https://github.com/ahmetkca/mcp-server-postgres.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive, read-only, multi-tenant PostgreSQL MCP server with advanced schema introspection and query capabilities","directories":{},"_nodeVersion":"22.17.1","dependencies":{"pg":"^8.16.3","zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.17.1"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","@types/pg":"^8.15.5","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-postgres_1.0.0_1754445567320_0.7970754887106422","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ahmetkca/mcp-server-postgres","version":"1.0.1","keywords":["mcp","model-context-protocol","postgresql","postgres","database","multi-tenant","schema-introspection","read-only","ai","llm"],"author":{"name":"AHMET KARAPINAR","email":"akarapinar53@gmail.com"},"license":"MIT","_id":"@ahmetkca/mcp-server-postgres@1.0.1","maintainers":[{"name":"ahmetkca","email":"akarapinrar@gmail.com"}],"homepage":"https://github.com/ahmetkca/mcp-server-postgres#readme","bugs":{"url":"https://github.com/ahmetkca/mcp-server-postgres/issues"},"bin":{"mcp-server-postgres":"dist/index.js"},"dist":{"shasum":"853f1569564a769f781527003ac9c2c46bdf615c","tarball":"https://registry.npmjs.org/@ahmetkca/mcp-server-postgres/-/mcp-server-postgres-1.0.1.tgz","fileCount":4,"integrity":"sha512-DfTMdKHlTzxKCFrMUJQjpFmFufk7MVXmJ/9h+fOYn2ASPqnaZdAAlkCSlnOa7PB+MAQN5OpJx467p/mbSvRBGA==","signatures":[{"sig":"MEUCIGfrdeEfkSmHI5PO8hVK5iCSWPhsVaQ0bVLiKcxX8sGDAiEAnJ0GgYEu2Ws1tTtuXnIDAN236ohpJWyiU674owjrKGM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32953},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"9be4674d1ddf8c469e6461a27a337eeb65f76c2e","scripts":{"dev":"tsc --watch","build":"shx rm -rf dist && tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"ahmetkca","email":"akarapinrar@gmail.com"},"repository":{"url":"git+https://github.com/ahmetkca/mcp-server-postgres.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive, read-only, multi-tenant PostgreSQL MCP server with advanced schema introspection and query capabilities","directories":{},"_nodeVersion":"22.17.1","dependencies":{"pg":"^8.16.3","zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.17.1"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","@types/pg":"^8.15.5","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-postgres_1.0.1_1754447163493_0.24791515284627086","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@ahmetkca/mcp-server-postgres","version":"1.0.2","keywords":["mcp","model-context-protocol","postgresql","postgres","database","multi-tenant","schema-introspection","read-only","ai","llm"],"author":{"name":"AHMET KARAPINAR","email":"akarapinar53@gmail.com"},"license":"MIT","_id":"@ahmetkca/mcp-server-postgres@1.0.2","maintainers":[{"name":"ahmetkca","email":"akarapinrar@gmail.com"}],"homepage":"https://github.com/ahmetkca/mcp-server-postgres#readme","bugs":{"url":"https://github.com/ahmetkca/mcp-server-postgres/issues"},"bin":{"mcp-server-postgres":"dist/index.js"},"dist":{"shasum":"36e19695e298305de0a2dadaa7ca0b03a939a3f3","tarball":"https://registry.npmjs.org/@ahmetkca/mcp-server-postgres/-/mcp-server-postgres-1.0.2.tgz","fileCount":4,"integrity":"sha512-O3xPivxA1FUAjDIG+fr3KKW34xKZFSVAg/DJMhwRXXC/7Y/5EDM5JknV5W/c5jEN9sUOOrAMyVW85EQQublncg==","signatures":[{"sig":"MEUCIANnuQEhFNtTLoxgRcceiRjzZJb8SrTpR4gZO4tzIe6QAiEAuuUDaCi2/CUZbkl2VAzgDR9roorx0UImfR4r6tgdhbA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36278},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"9be4674d1ddf8c469e6461a27a337eeb65f76c2e","scripts":{"dev":"tsc --watch","build":"shx rm -rf dist && tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"ahmetkca","email":"akarapinrar@gmail.com"},"repository":{"url":"git+https://github.com/ahmetkca/mcp-server-postgres.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive, read-only, multi-tenant PostgreSQL MCP server with advanced schema introspection and query capabilities","directories":{},"_nodeVersion":"22.17.1","dependencies":{"pg":"^8.16.3","zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.17.1"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","@types/pg":"^8.15.5","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-postgres_1.0.2_1754447751712_0.5224587341249003","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@ahmetkca/mcp-server-postgres","version":"1.0.3","keywords":["mcp","model-context-protocol","postgresql","postgres","database","multi-tenant","schema-introspection","read-only","ai","llm"],"author":{"name":"AHMET KARAPINAR","email":"akarapinar53@gmail.com"},"license":"MIT","_id":"@ahmetkca/mcp-server-postgres@1.0.3","maintainers":[{"name":"ahmetkca","email":"akarapinrar@gmail.com"}],"homepage":"https://github.com/ahmetkca/mcp-server-postgres#readme","bugs":{"url":"https://github.com/ahmetkca/mcp-server-postgres/issues"},"bin":{"mcp-server-postgres":"dist/index.js"},"dist":{"shasum":"151679974f6c153bcbdf0613e63254f2b8a27966","tarball":"https://registry.npmjs.org/@ahmetkca/mcp-server-postgres/-/mcp-server-postgres-1.0.3.tgz","fileCount":4,"integrity":"sha512-giv7bcWk0nfCVQcff8Bq4uJLXOjjpjyH2ZyBSTUKLJWVGITY5i6roTrP2OGiHCRxfZPJGOx0cqgh+qzc/2bVnw==","signatures":[{"sig":"MEUCIEhfqw8HQOgSZdhjarlP2I65NMsKfMl2DQR7Qc18cKRMAiEAlMTek1p59o0rV9wonlx3bnjAcSrqSXi0/EvysnEcRjo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41545},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"9be4674d1ddf8c469e6461a27a337eeb65f76c2e","scripts":{"dev":"tsc --watch","build":"shx rm -rf dist && tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"ahmetkca","email":"akarapinrar@gmail.com"},"repository":{"url":"git+https://github.com/ahmetkca/mcp-server-postgres.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive, read-only, multi-tenant PostgreSQL MCP server with advanced schema introspection and query capabilities","directories":{},"_nodeVersion":"22.17.1","dependencies":{"pg":"^8.16.3","zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.17.1"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","@types/pg":"^8.15.5","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-postgres_1.0.3_1754449349202_0.9425957746952947","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@ahmetkca/mcp-server-postgres","version":"1.0.4","keywords":["mcp","model-context-protocol","postgresql","postgres","database","multi-tenant","schema-introspection","read-only","ai","llm"],"author":{"name":"AHMET KARAPINAR","email":"akarapinar53@gmail.com"},"license":"MIT","_id":"@ahmetkca/mcp-server-postgres@1.0.4","maintainers":[{"name":"ahmetkca","email":"akarapinrar@gmail.com"}],"homepage":"https://github.com/ahmetkca/mcp-server-postgres#readme","bugs":{"url":"https://github.com/ahmetkca/mcp-server-postgres/issues"},"bin":{"mcp-server-postgres":"dist/index.js"},"dist":{"shasum":"b35c54dfa82819066f89c902c89a78b720a5b41a","tarball":"https://registry.npmjs.org/@ahmetkca/mcp-server-postgres/-/mcp-server-postgres-1.0.4.tgz","fileCount":4,"integrity":"sha512-QUpADBqgvZl/9239AdtwCpE5V41SxhvyuiikE3QOC+IyogkKpmEyB4NWFYjtHFKTxJ87av3qMIu1ipBhB0R1GQ==","signatures":[{"sig":"MEUCIBkkTnxvyleLg3HIANnkK3rBva3eGoJ5mqpSae/M0eRiAiEA+rrPpZ14B2SelugVRekdMi6ydPY3bhv9gacFRsitx5w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41577},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"9be4674d1ddf8c469e6461a27a337eeb65f76c2e","scripts":{"dev":"tsc --watch","build":"shx rm -rf dist && tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"ahmetkca","email":"akarapinrar@gmail.com"},"repository":{"url":"git+https://github.com/ahmetkca/mcp-server-postgres.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive, read-only, multi-tenant PostgreSQL MCP server with advanced schema introspection and query capabilities","directories":{},"_nodeVersion":"22.17.1","dependencies":{"pg":"^8.16.3","zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.17.1"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","@types/pg":"^8.15.5","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-postgres_1.0.4_1754453587214_0.8101719397417855","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@ahmetkca/mcp-server-postgres","version":"1.0.5","keywords":["mcp","model-context-protocol","postgresql","postgres","database","multi-tenant","schema-introspection","read-only","ai","llm"],"author":{"name":"AHMET KARAPINAR","email":"akarapinar53@gmail.com"},"license":"MIT","_id":"@ahmetkca/mcp-server-postgres@1.0.5","maintainers":[{"name":"ahmetkca","email":"akarapinrar@gmail.com"}],"homepage":"https://github.com/ahmetkca/mcp-server-postgres#readme","bugs":{"url":"https://github.com/ahmetkca/mcp-server-postgres/issues"},"bin":{"mcp-server-postgres":"dist/index.js"},"dist":{"shasum":"bdbc8863f81435e51d0b6718f1f1bfa3a161747b","tarball":"https://registry.npmjs.org/@ahmetkca/mcp-server-postgres/-/mcp-server-postgres-1.0.5.tgz","fileCount":4,"integrity":"sha512-/YHWntGS97tYY+7bE8AfiwsAhyIWVqyhwFV26vpa6rtChGtz6Z74u6gSj+biRAb1q/dYLYvktlkK1vx5DQUG0w==","signatures":[{"sig":"MEUCIQCSNXJiONqpHtCZpkns0jonsQA9rljEPNRtrZmaKoiU8QIge19/Mx8adpmIvfNEoNBEANR1pMz7VfEn0XtcE2EmfMI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41625},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"9be4674d1ddf8c469e6461a27a337eeb65f76c2e","scripts":{"dev":"tsc --watch","build":"shx rm -rf dist && tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"ahmetkca","email":"akarapinrar@gmail.com"},"repository":{"url":"git+https://github.com/ahmetkca/mcp-server-postgres.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive, read-only, multi-tenant PostgreSQL MCP server with advanced schema introspection and query capabilities","directories":{},"_nodeVersion":"22.17.1","dependencies":{"pg":"^8.16.3","zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.17.1"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","@types/pg":"^8.15.5","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-postgres_1.0.5_1754456686928_0.6244593229852649","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@ahmetkca/mcp-server-postgres","version":"1.1.0","keywords":["mcp","model-context-protocol","postgresql","postgres","database","multi-tenant","schema-introspection","read-only","ai","llm"],"author":{"name":"AHMET KARAPINAR","email":"akarapinar53@gmail.com"},"license":"MIT","_id":"@ahmetkca/mcp-server-postgres@1.1.0","maintainers":[{"name":"ahmetkca","email":"akarapinrar@gmail.com"}],"homepage":"https://github.com/ahmetkca/mcp-server-postgres#readme","bugs":{"url":"https://github.com/ahmetkca/mcp-server-postgres/issues"},"bin":{"mcp-server-postgres":"dist/index.js"},"dist":{"shasum":"d6bf899490120c43d5f5865406112bdd56be214f","tarball":"https://registry.npmjs.org/@ahmetkca/mcp-server-postgres/-/mcp-server-postgres-1.1.0.tgz","fileCount":4,"integrity":"sha512-p9voRLr0AK2VHR8CSiWrin3xqpuAm0k6K/LZWr1FDjtjAOnlwstvPQLOrTt6nY+XWfk4SQMpJSir4aLwLglbcw==","signatures":[{"sig":"MEQCID4z/h6k1gwx5+uVRLxOelpCo0WuxYHYsDmG7PJl/VP7AiB/HqHJH3FljGptWSDpGSj+r70Pr45yJm0YVawTq9GLcA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44452},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"2618f672d1ba482ca4878a4b0b5449ce6dfe9627","scripts":{"dev":"tsc --watch","build":"shx rm -rf dist && tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"ahmetkca","email":"akarapinrar@gmail.com"},"repository":{"url":"git+https://github.com/ahmetkca/mcp-server-postgres.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive, read-only, multi-tenant PostgreSQL MCP server with advanced schema introspection and query capabilities","directories":{},"_nodeVersion":"22.17.1","dependencies":{"pg":"^8.16.3","zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.17.1"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","@types/pg":"^8.15.5","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-postgres_1.1.0_1754600560124_0.3818935796868024","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@ahmetkca/mcp-server-postgres","version":"1.1.1","keywords":["mcp","model-context-protocol","postgresql","postgres","database","multi-tenant","schema-introspection","read-only","ai","llm"],"author":{"name":"AHMET KARAPINAR","email":"akarapinar53@gmail.com"},"license":"MIT","_id":"@ahmetkca/mcp-server-postgres@1.1.1","maintainers":[{"name":"ahmetkca","email":"akarapinrar@gmail.com"}],"homepage":"https://github.com/ahmetkca/mcp-server-postgres#readme","bugs":{"url":"https://github.com/ahmetkca/mcp-server-postgres/issues"},"bin":{"mcp-server-postgres":"dist/index.js"},"dist":{"shasum":"06a976d0d4f31314a702331e206875848a48c5e3","tarball":"https://registry.npmjs.org/@ahmetkca/mcp-server-postgres/-/mcp-server-postgres-1.1.1.tgz","fileCount":4,"integrity":"sha512-8X5ET6PNGTJhEM7/0ITxum6LWiomn9u0T3sMRZgypP2swvRENwC1JReP5xrWDNygYdBszlu0I+Rln0urTm+fiw==","signatures":[{"sig":"MEUCIQC8KNeQSr7xXH63bymOTYRgtENE+4aWvyCJab0PwhODbwIgS61aFCqNZdtLiESlN2vVzNLW11rL3e/7qUVb0PhuuSg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45360},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"9767f0cd11e018b6994939ab8bd2827fa72df7df","scripts":{"dev":"tsc --watch","build":"shx rm -rf dist && tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"ahmetkca","email":"akarapinrar@gmail.com"},"repository":{"url":"git+https://github.com/ahmetkca/mcp-server-postgres.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive, read-only, multi-tenant PostgreSQL MCP server with advanced schema introspection and query capabilities","directories":{},"_nodeVersion":"22.17.1","dependencies":{"pg":"^8.16.3","zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.17.1"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","@types/pg":"^8.15.5","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-postgres_1.1.1_1754601918956_0.9605437705465607","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@ahmetkca/mcp-server-postgres","version":"1.2.0","description":"A comprehensive, read-only, multi-tenant PostgreSQL MCP server with advanced schema introspection and query capabilities","main":"dist/index.js","type":"module","bin":{"mcp-server-postgres":"dist/index.js"},"scripts":{"build":"shx rm -rf dist && tsc","start":"node dist/index.js","dev":"tsc --watch","prepublishOnly":"npm run build"},"keywords":["mcp","model-context-protocol","postgresql","postgres","database","multi-tenant","schema-introspection","read-only","ai","llm"],"author":{"name":"AHMET KARAPINAR","email":"akarapinar53@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ahmetkca/mcp-server-postgres.git"},"homepage":"https://github.com/ahmetkca/mcp-server-postgres#readme","bugs":{"url":"https://github.com/ahmetkca/mcp-server-postgres/issues"},"engines":{"node":">=18.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.17.1","pg":"^8.16.3","zod":"^3.23.8"},"devDependencies":{"@types/pg":"^8.15.5","shx":"^0.4.0","typescript":"^5.9.2"},"_id":"@ahmetkca/mcp-server-postgres@1.2.0","gitHead":"919a0717627240c18b820f844f181ca5e898e586","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-IJoJ8fa2XpnxJVXMByiAOqfJk/MVZ+6mUgOquceCijgZiaPFWScL1d3okOGbLZlINLgZLDAJm+qo0eodpIZBUg==","shasum":"1df2fcce4159501e7b004ae52cc834b9ae4c9768","tarball":"https://registry.npmjs.org/@ahmetkca/mcp-server-postgres/-/mcp-server-postgres-1.2.0.tgz","fileCount":4,"unpackedSize":55601,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDvzYAXWj9kwQdXVny62qL/2gOYJceJcCbk6FbebdcGBQIhALFFYieTFF0/AyPTAPhrhn+C+DpY4/E0Y822vutuIZz4"}]},"_npmUser":{"name":"ahmetkca","email":"akarapinrar@gmail.com"},"directories":{},"maintainers":[{"name":"ahmetkca","email":"akarapinrar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server-postgres_1.2.0_1754616947096_0.7356475570613936"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-06T01:59:27.191Z","modified":"2025-08-08T01:35:47.499Z","1.0.0":"2025-08-06T01:59:27.514Z","1.0.1":"2025-08-06T02:26:03.681Z","1.0.2":"2025-08-06T02:35:51.892Z","1.0.3":"2025-08-06T03:02:29.398Z","1.0.4":"2025-08-06T04:13:07.401Z","1.0.5":"2025-08-06T05:04:47.110Z","1.1.0":"2025-08-07T21:02:40.330Z","1.1.1":"2025-08-07T21:25:19.163Z","1.2.0":"2025-08-08T01:35:47.278Z"},"bugs":{"url":"https://github.com/ahmetkca/mcp-server-postgres/issues"},"author":{"name":"AHMET KARAPINAR","email":"akarapinar53@gmail.com"},"license":"MIT","homepage":"https://github.com/ahmetkca/mcp-server-postgres#readme","keywords":["mcp","model-context-protocol","postgresql","postgres","database","multi-tenant","schema-introspection","read-only","ai","llm"],"repository":{"type":"git","url":"git+https://github.com/ahmetkca/mcp-server-postgres.git"},"description":"A comprehensive, read-only, multi-tenant PostgreSQL MCP server with advanced schema introspection and query capabilities","maintainers":[{"name":"ahmetkca","email":"akarapinrar@gmail.com"}],"readme":"# Multi-Tenant PostgreSQL MCP Server\n\nA comprehensive, read-only Model Context Protocol (MCP) server for PostgreSQL databases with advanced multi-tenant support, schema introspection, and query capabilities.\n\n## Features\n\n- 🔒 **Read-only by design** - All queries run in read-only transactions for safety\n- 🏢 **Multi-tenant support** - Access tables and functions across different schemas\n- 🔍 **Advanced schema introspection** - Detailed table structures, constraints, indexes, and DDL\n- 🔧 **Function definitions** - Complete function metadata and source code access\n- 📊 **Flexible querying** - Execute SQL queries with optional schema context\n- 🌐 **Network-ready** - Connect to local or remote PostgreSQL instances\n\n## Installation\n\n### Via npm (recommended)\n```bash\nnpm install -g @ahmetkca/mcp-server-postgres\n```\n\n### Via npx (no installation required)\n### Run directly (no install)\n```bash\nnpx @ahmetkca/mcp-server-postgres \"postgres://user:password@host:port/database\"\n```\n\n### From source\n```bash\ngit clone https://github.com/ahmetkca/mcp-server-postgres.git\ncd mcp-server-postgres\nnpm install\nnpm run build\n```\n\n## Usage\n\n### Command Line\n\n### With global installation:\n```bash\nmcp-server-postgres \"postgres://user:password@host:port/database\"\n```\n\n### With npx (no installation required)\n### Direct execution (npx)\n```bash\nnpx @ahmetkca/mcp-server-postgres \"postgres://user:password@host:port/database\"\n```\n\n### With Claude Desktop\n\nAdd to your Claude Desktop MCP configuration (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):\n\n### Option 1: Using npx (recommended - no installation required):\n```json\n{\n  \"mcpServers\": {\n    \"postgres-multitenant\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@ahmetkca/mcp-server-postgres\", \"postgres://user:password@localhost:5432/mydb\"]\n    }\n  }\n}\n```\n\n### Option 2: Using global installation\n### Global install\n```json\n{\n  \"mcpServers\": {\n    \"postgres-multitenant\": {\n      \"command\": \"mcp-server-postgres\",\n      \"args\": [\"postgres://user:password@localhost:5432/mydb\"]\n    }\n  }\n}\n```\n\n### With other MCP clients\n\nThe server uses stdio transport, so it can be used with any MCP client that supports subprocess communication:\n\n```bash\n# Direct execution\nnpx @ahmetkca/mcp-server-postgres \"postgres://connection-string\"\n\n# Or with global install\nmcp-server-postgres \"postgres://connection-string\"\n```\n\n## Connection String Examples\n\n### Local PostgreSQL\n```bash\nmcp-server-postgres \"postgres://user:password@localhost:5432/mydb\"\n```\n\n### Remote PostgreSQL\n```bash\nmcp-server-postgres \"postgres://user:password@db.example.com:5432/mydb\"\n```\n\n### AWS RDS\n```bash\nmcp-server-postgres \"postgres://user:password@mydb.abc123.us-east-1.rds.amazonaws.com:5432/mydb\"\n```\n\n### Google Cloud SQL\n```bash\nmcp-server-postgres \"postgres://user:password@1.2.3.4:5432/mydb\"\n```\n\n### With SSL (recommended for production)\n```bash\nmcp-server-postgres \"postgres://user:password@host:5432/mydb?sslmode=require\"\n```\n\n## Available Resources\n\n### Schema Overview\n- **URI Pattern**: `pg-schema://{schemaName}/overview`\n- **Description**: High-level overview of a schema including counts (tables, views, functions) and quick links (URIs) to table structures and function definitions for drill-down\n- **Example**: `pg-schema://public/overview`\n- **Completions**: Supports typeahead for `schemaName`\n\n### Table Structures\n- **URI Pattern**: `pg-table://{schemaName}/{tableName}/structure`\n- **Description**: Comprehensive table metadata including columns, constraints, indexes, and DDL\n- **Example**: `pg-table://public/users/structure`\n\n### Function Definitions\n- **URI Pattern**: `pg-func://{schemaName}/{functionName}/(identityArgs)/definition`\n- **Description**: Complete function metadata, parameters, return types, and source code\n- **Example**: `pg-func://public/calculate_total/()/definition`\n- Overloads: identityArgs is the canonical PostgreSQL identity argument list (e.g. `(integer,integer)`). Example overload: `pg-func://public/add/(integer,integer)/definition`\n\n## Available Tools\n\n### 1. Multi-Tenant Database Query Tool\nExecute read-only SQL queries to retrieve, analyze, and explore PostgreSQL data across multiple tenant schemas. Supports complex SQL including JOINs, CTEs, window functions, and aggregations. All queries run in read-only transactions for safety.\n\n**Parameters:**\n- `sql` (string, required): The SQL query to execute. Can be any valid PostgreSQL SELECT statement including complex queries with JOINs, CTEs, window functions, aggregations, etc. Will be executed in a read-only transaction for safety.\n- `schema` (string, optional): Optional schema name (tenant) to set as search_path before executing the query. When specified, unqualified table names will resolve to tables in this schema. Use this for tenant-specific queries.\n- `explain` (boolean, optional): Set to true to return the query execution plan instead of query results. Useful for performance analysis and optimization. Returns PostgreSQL EXPLAIN output in JSON format.\n\n**Examples:**\n```sql\n-- Simple query with default schema\nSELECT * FROM users LIMIT 10;\n\n-- Complex query with JOINs and aggregations\nSELECT \n  u.name, \n  COUNT(o.id) as order_count,\n  SUM(o.total) as total_spent,\n  AVG(o.total) as avg_order_value\nFROM users u \nLEFT JOIN orders o ON u.id = o.user_id \nWHERE u.created_at > '2024-01-01'\nGROUP BY u.id, u.name\nORDER BY total_spent DESC;\n\n-- Query with CTE and window functions\nWITH monthly_sales AS (\n  SELECT \n    DATE_TRUNC('month', created_at) as month,\n    SUM(total) as monthly_total,\n    LAG(SUM(total)) OVER (ORDER BY DATE_TRUNC('month', created_at)) as prev_month\n  FROM orders \n  GROUP BY DATE_TRUNC('month', created_at)\n)\nSELECT \n  month,\n  monthly_total,\n  ROUND(((monthly_total - prev_month) / prev_month * 100)::numeric, 2) as growth_rate\nFROM monthly_sales\nWHERE prev_month IS NOT NULL;\n\n-- Tenant-specific query (set schema parameter to \"tenant_a\")\nSELECT * FROM orders WHERE status = 'pending';\n\n-- Performance analysis (set explain parameter to true)\nSELECT u.*, o.total FROM users u JOIN orders o ON u.id = o.user_id;\n```\n\n### 2. List Database Schemas\nDiscover all available database schemas (tenants) with statistics including table and function counts. Use this to explore the multi-tenant structure, identify available tenants, or get an overview of database organization.\n\n**Parameters:**\n- `include_system` (boolean, optional): Set to true to include PostgreSQL system schemas (information_schema, pg_catalog, pg_toast) in the results. Default false shows only user/tenant schemas. Use true for administrative or debugging purposes.\n\n**Use Cases:**\n- Explore multi-tenant database structure\n- Identify available tenant schemas\n- Get overview of database organization\n- Administrative schema analysis\n\n### 3. Describe Schema\nGet comprehensive information about a specific database schema (tenant) including detailed statistics, all tables, views, functions, and custom types. Use this to understand a tenant's database structure, analyze schema composition, or prepare for schema-specific operations.\n\n**Parameters:**\n- `schema_name` (string, required): Name of the database schema (tenant) to analyze. Must be an exact schema name from the database. Use list-schemas tool first to discover available schema names.\n\n**Returns:**\n- Schema statistics (table count, view count, function count, type count)\n- Detailed table information with column counts\n- Function definitions and metadata\n- Organized metadata perfect for schema analysis and documentation\n\n## Multi-Tenant Architecture\n\nThis server is designed for multi-tenant PostgreSQL setups where:\n\n- Different tenants have separate schemas (e.g., `tenant_a`, `tenant_b`, `public`)\n- Each schema contains tenant-specific tables and functions\n- You need to query across different tenant contexts\n\n### Example Multi-Tenant Usage\n\n```sql\n-- List all schemas\n-- Use \"list-schemas\" tool\n\n-- Describe a specific tenant schema\n-- Use \"describe-schema\" tool with schema_name: \"tenant_a\"\n\n-- Query tenant-specific data\n-- Use \"query\" tool with schema: \"tenant_a\"\nSELECT * FROM orders WHERE status = 'pending';\n\n-- Get table structure for a tenant\n-- Access resource: pg-table://tenant_a/orders/structure\n```\n\n## Security Features\n\n- **Read-only transactions**: All queries are wrapped in `BEGIN TRANSACTION READ ONLY`\n- **No data modification**: INSERT, UPDATE, DELETE, and DDL operations are blocked\n- **Schema isolation**: Optional schema context prevents cross-tenant data access\n- **Connection pooling**: Efficient resource management with automatic cleanup\n\n## Development\n\n### Prerequisites\n- Node.js 18+ \n- PostgreSQL database (local or remote)\n- TypeScript knowledge (for contributions)\n\n### Setup\n```bash\ngit clone https://github.com/ahmetkca/mcp-server-postgres.git\ncd mcp-server-postgres\nnpm install\n```\n\n### Development Commands\n```bash\nnpm run dev          # Watch mode for development\nnpm run build        # Build for production\nnpm run start        # Start the built server\n```\n\n### Testing\n### Start the server with a test database\n```bash\nnpm run build\nnpm start \"postgres://user:password@localhost:5432/testdb\"\n```\n\n### In another terminal, test with MCP Inspector\n```bash\nnpx @modelcontextprotocol/inspector\n```\n\n## Troubleshooting\n\n### Connection Issues\n- Verify your PostgreSQL connection string\n- Check network connectivity to the database\n- Ensure the database user has SELECT permissions\n- For remote connections, verify firewall settings\n\n### Permission Issues\n- The database user needs SELECT permissions on:\n  - All tables you want to query\n  - `information_schema` views\n  - `pg_catalog` system tables (for function definitions)\n\n### Schema Access\n- Ensure the database user has USAGE permission on schemas\n- For multi-tenant setups, grant access to relevant tenant schemas\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Changelog\n\n### v1.1.0 - 2025-08-07\n- Adopt custom resource URI schemes:\n  - Tables: `pg-table://{schemaName}/{tableName}/structure`\n  - Functions: `pg-func://{schemaName}/{functionName}/(identityArgs)/definition`\n- Per-overload function resources using canonical `identityArgs` to disambiguate overloads\n- Deterministic, deduplicated resource listings using `DISTINCT ON` and stable ordering\n- Exact overload resolution via `regprocedure`/OID for function metadata\n- README updated to reflect new URI schemes and best practices\n- TypeScript build fixes: NodeNext ESM config, top-level await, and `pg` Pool named import\n\n### v1.0.0\n- Initial release\n- Multi-tenant PostgreSQL support\n- Advanced schema introspection\n- Function definition access\n- Read-only query execution\n- Comprehensive documentation\n\n## Examples: listing and reading\n\nBelow are minimal examples of how resources appear in clients and how to read them. Actual UX varies by MCP client, but the URIs and fields are the same.\n\n#### 1) Listing resources (conceptual)\nClients request a list from the server and render entries like:\n\n```\nname: public\nuri:  pg-schema://public/overview\n—\nname: public.users\nuri:  pg-table://public/users/structure\n—\nname: tenant_a.app_event\nuri:  pg-table://tenant_a/app_event/structure\n—\nname: public.add(integer,integer)\nuri:  pg-func://public/add/(integer,integer)/definition\n—\nname: public.add(text,text)\nuri:  pg-func://public/add/(text,text)/definition\n```\n\n#### 2) Reading a schema overview\n- Select: `pg-schema://public/overview`\n- The client sends a read request and receives JSON with statistics and quick links (URIs) to tables and functions.\n\nJSON-RPC (abridged) example over stdio:\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"resources/read\",\n  \"params\": { \"uri\": \"pg-schema://public/overview\" }\n}\n```\nResponse (shape):\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"result\": {\n    \"contents\": [\n      {\n        \"uri\": \"pg-schema://public/overview\",\n        \"mimeType\": \"application/json\",\n        \"text\": \"{ ... statistics, tables.first_100 [{name, uri}], functions.first_100 [{name, uri}] ... }\"\n      }\n    ]\n  }\n}\n```\n\n#### 2) Reading a table structure\n- Select: `pg-table://tenant_a/app_event/structure`\n- Client sends a read request and receives JSON describing columns, constraints, indexes, relationships, and DDL.\n\nJSON-RPC (abridged) example over stdio:\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"resources/read\",\n  \"params\": { \"uri\": \"pg-table://tenant_a/app_event/structure\" }\n}\n```\nResponse (shape):\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"result\": {\n    \"contents\": [\n      {\n        \"uri\": \"pg-table://tenant_a/app_event/structure\",\n        \"mimeType\": \"application/json\",\n        \"text\": \"{ ... columns, constraints, indexes, ddl ... }\"\n      }\n    ]\n  }\n}\n```\n\n#### 3) Reading a specific function overload\n- Select: `pg-func://public/add/(integer,integer)/definition`\n- The server resolves the exact overload by `regprocedure` and returns the definition.\n\nJSON-RPC (abridged) example:\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 2,\n  \"method\": \"resources/read\",\n  \"params\": { \"uri\": \"pg-func://public/add/(integer,integer)/definition\" }\n}\n```\nResponse (shape):\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 2,\n  \"result\": {\n    \"contents\": [\n      {\n        \"uri\": \"pg-func://public/add/(integer,integer)/definition\",\n        \"mimeType\": \"application/json\",\n        \"text\": \"{ ... parameters, return_type, language, volatility, security, source, ddl ... }\"\n      }\n    ]\n  }\n}\n```\n\nTips\n- Choose the exact overload by picking the URI that includes the identity args in parentheses.\n- All identifiers in URIs are URL-encoded; clients decode them before invoking the handler.\n- Lists are deduplicated and ordered for a clean browsing experience.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","readmeFilename":"README.md"}