{"_id":"@sarmadparvez/postgresql-mcp","_rev":"9-89ac44681623fb9c92408453b7ba530d","name":"@sarmadparvez/postgresql-mcp","dist-tags":{"latest":"1.0.8"},"versions":{"1.0.0":{"name":"@sarmadparvez/postgresql-mcp","version":"1.0.0","keywords":["mcp","model-context-protocol","postgresql","postgres","ai","claude","llm"],"author":{"name":"sarmadparvez"},"license":"ISC","_id":"@sarmadparvez/postgresql-mcp@1.0.0","maintainers":[{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"}],"homepage":"https://github.com/sarmadparvez/postgresql-mcp#readme","bugs":{"url":"https://github.com/sarmadparvez/postgresql-mcp/issues"},"bin":{"postgresql-mcp":"index.js"},"dist":{"shasum":"197d1c0ea1f574ab53216d5eca75c48127e8ddf1","tarball":"https://registry.npmjs.org/@sarmadparvez/postgresql-mcp/-/postgresql-mcp-1.0.0.tgz","fileCount":3,"integrity":"sha512-OKSnguvSUeBeuHacgnh8X7Br+LWdVsMcnpzuatbKFygoSiG9sL8Gej6jr65Brg3Qj4rD4Rp1i1X0415YpXTREQ==","signatures":[{"sig":"MEQCIFgBWGLkHPtcFz1/8EQzNxf7U1LX+JcEepP1/aKgK3N/AiBg4S6uJ1ga/E+AVvGtI5sBmv+epKxTXKse7nA3zG2Nhg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16048},"main":"index.js","type":"module","engines":{"node":">=18"},"gitHead":"e317447f430aa1cf9a9d0fec27f53ca07fc31b76","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"},"repository":{"url":"git+https://github.com/sarmadparvez/postgresql-mcp.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP server for PostgreSQL with full read-write support. Works with any PostgreSQL instance — local, Supabase, RDS, or self-hosted.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"pg":"^8.20.0","zod":"^4.3.6","@modelcontextprotocol/sdk":"^1.27.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/postgresql-mcp_1.0.0_1773002079898_0.5063908185539256","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@sarmadparvez/postgresql-mcp","version":"1.0.1","keywords":["mcp","model-context-protocol","postgresql","postgres","ai","claude","llm"],"author":{"name":"sarmadparvez"},"license":"ISC","_id":"@sarmadparvez/postgresql-mcp@1.0.1","maintainers":[{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"}],"homepage":"https://github.com/sarmadparvez/postgresql-mcp#readme","bugs":{"url":"https://github.com/sarmadparvez/postgresql-mcp/issues"},"bin":{"postgresql-mcp":"index.js"},"dist":{"shasum":"38758dd3a12b0b3c590aa22f57ffdc0b11589679","tarball":"https://registry.npmjs.org/@sarmadparvez/postgresql-mcp/-/postgresql-mcp-1.0.1.tgz","fileCount":3,"integrity":"sha512-8em4V9r4vuTe2e0d1Rn9U/xG0mLcvTHLuOEwzvA/MEXD6CH1sQdZkOp+TThaV0Qyjl9OTB3bX2vVOL8Ql5+ctg==","signatures":[{"sig":"MEYCIQCNegeqn9U36VSirHR8/mActU30qvkUnAqf8/LIb/Me6QIhAKj856rMwXQzRQl/0okMHhLxbN81IItW4ADRnTuT7Ytd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16048},"main":"index.js","type":"module","engines":{"node":">=18"},"gitHead":"e317447f430aa1cf9a9d0fec27f53ca07fc31b76","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"},"repository":{"url":"git+https://github.com/sarmadparvez/postgresql-mcp.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP server for PostgreSQL with full read-write support. Works with any PostgreSQL instance — local, Supabase, RDS, or self-hosted.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"pg":"^8.20.0","zod":"^4.3.6","@modelcontextprotocol/sdk":"^1.27.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/postgresql-mcp_1.0.1_1773002636767_0.6692163075019681","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@sarmadparvez/postgresql-mcp","version":"1.0.2","keywords":["mcp","model-context-protocol","postgresql","postgres","ai","claude","llm"],"author":{"name":"sarmadparvez"},"license":"ISC","_id":"@sarmadparvez/postgresql-mcp@1.0.2","maintainers":[{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"}],"homepage":"https://github.com/sarmadparvez/postgresql-mcp#readme","bugs":{"url":"https://github.com/sarmadparvez/postgresql-mcp/issues"},"bin":{"postgresql-mcp":"index.js"},"dist":{"shasum":"6ac099ce8071445c823f26b1370eeb1edbd2f685","tarball":"https://registry.npmjs.org/@sarmadparvez/postgresql-mcp/-/postgresql-mcp-1.0.2.tgz","fileCount":3,"integrity":"sha512-ltqQZZfRBupU30WsoQQ62WGGOuIT4X96C9KmZqGCMKFugjcyzbw7zLjAnkbfY60ZVJW9m8OKwnpApmHMnPAp6w==","signatures":[{"sig":"MEUCIEpUVzxiVbip8JIwTdbA5mkVBqNuQDl7bFiDBqP+dTFrAiEAz9dY/5PW3BNzNGPkPQ99AAafrGiGpknwQrzaHwjbOiU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16293},"main":"index.js","type":"module","engines":{"node":">=18"},"gitHead":"e317447f430aa1cf9a9d0fec27f53ca07fc31b76","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"},"repository":{"url":"git+https://github.com/sarmadparvez/postgresql-mcp.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP server for PostgreSQL with full read-write support. Works with any PostgreSQL instance — local, Supabase, RDS, or self-hosted.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"pg":"^8.20.0","zod":"^4.3.6","@modelcontextprotocol/sdk":"^1.27.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/postgresql-mcp_1.0.2_1773003101521_0.2660816447554266","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@sarmadparvez/postgresql-mcp","version":"1.0.3","keywords":["mcp","model-context-protocol","postgresql","postgres","ai","claude","llm"],"author":{"name":"sarmadparvez"},"license":"ISC","_id":"@sarmadparvez/postgresql-mcp@1.0.3","maintainers":[{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"}],"homepage":"https://github.com/sarmadparvez/postgresql-mcp#readme","bugs":{"url":"https://github.com/sarmadparvez/postgresql-mcp/issues"},"bin":{"postgresql-mcp":"index.js"},"dist":{"shasum":"60c8950dd6e1348c225edc169ed679f0b035239b","tarball":"https://registry.npmjs.org/@sarmadparvez/postgresql-mcp/-/postgresql-mcp-1.0.3.tgz","fileCount":3,"integrity":"sha512-sjq/CDHTxPN3y79ZwZmVTO3nSQV0+Zn8C+kaYHicepA8hIeLWVLLyeUjtqwzPiYtTnWox8r6U98M7rGEM7AWxw==","signatures":[{"sig":"MEYCIQDkp8dzeY3rLFkwLvwEBZWe9KaRnqJPJ3ySCtKU1NR1fAIhALDKzGyWySabrSemrHsVOrsk//iOvrMGUPqyHD+x8YpM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16468},"main":"index.js","type":"module","engines":{"node":">=18"},"gitHead":"4368ec4d3681204f8de269f3189212e5f911cebf","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"},"repository":{"url":"git+https://github.com/sarmadparvez/postgresql-mcp.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP server for PostgreSQL with full read-write support. Works with any PostgreSQL instance — local, Supabase, RDS, or self-hosted.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"pg":"^8.20.0","zod":"^4.3.6","@modelcontextprotocol/sdk":"^1.27.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/postgresql-mcp_1.0.3_1773003817835_0.20121358808210332","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@sarmadparvez/postgresql-mcp","version":"1.0.4","keywords":["mcp","model-context-protocol","postgresql","postgres","ai","claude","llm"],"author":{"name":"sarmadparvez"},"license":"ISC","_id":"@sarmadparvez/postgresql-mcp@1.0.4","maintainers":[{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"}],"homepage":"https://github.com/sarmadparvez/postgresql-mcp#readme","bugs":{"url":"https://github.com/sarmadparvez/postgresql-mcp/issues"},"bin":{"postgresql-mcp":"index.js"},"dist":{"shasum":"79f37c7b9825daf372befc13090ec68efcc0f45e","tarball":"https://registry.npmjs.org/@sarmadparvez/postgresql-mcp/-/postgresql-mcp-1.0.4.tgz","fileCount":3,"integrity":"sha512-5KxW2PWkO+8MjFbcaR17JeE2o1BtNrooE3aXc6tWzyxu4L/ww855T9ru6VVCHWYJSkPdwPr+qR5dhvZe5oedZQ==","signatures":[{"sig":"MEQCIEnDCxFoLhXkcriMHXfImIn5mKzZvUbelYUqQR0HGq6ZAiBUGkuxv+fY8cu1iC/H5Oex576ObUnmj+LpFggvfliryQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16515},"main":"index.js","type":"module","engines":{"node":">=18"},"gitHead":"4368ec4d3681204f8de269f3189212e5f911cebf","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"},"repository":{"url":"git+https://github.com/sarmadparvez/postgresql-mcp.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP server for PostgreSQL with full read-write support. Works with any PostgreSQL instance — local, Supabase, RDS, or self-hosted.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"pg":"^8.20.0","zod":"^4.3.6","@modelcontextprotocol/sdk":"^1.27.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/postgresql-mcp_1.0.4_1773004181548_0.5334861339980859","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@sarmadparvez/postgresql-mcp","version":"1.0.5","keywords":["mcp","model-context-protocol","postgresql","postgres","ai","claude","llm"],"author":{"name":"sarmadparvez"},"license":"ISC","_id":"@sarmadparvez/postgresql-mcp@1.0.5","maintainers":[{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"}],"homepage":"https://github.com/sarmadparvez/postgresql-mcp#readme","bugs":{"url":"https://github.com/sarmadparvez/postgresql-mcp/issues"},"bin":{"postgresql-mcp":"index.js"},"dist":{"shasum":"32b6382666e940652f32c02d861f0e1d9f9b721f","tarball":"https://registry.npmjs.org/@sarmadparvez/postgresql-mcp/-/postgresql-mcp-1.0.5.tgz","fileCount":3,"integrity":"sha512-m5qaW3eYzIyM5aSm1sKJF+5h4UjahYlxtc0QFX8zKtDgyjghYtrdcXqoC9PodL7aUhwEgH/wvzIdLF5GJQkQ1A==","signatures":[{"sig":"MEYCIQDhmCK+OU1tOK6A9ntW0sKguJX1JPe8xDtvr4vDX0a/NwIhAPYwbbGwH6Tuk6D36VQOZDEf7L9WsoTgY0lgtohHKujC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17118},"main":"index.js","type":"module","engines":{"node":">=18"},"gitHead":"7d7c20baa0bcb0e3e310ddebb3e9d27e8db8a31d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"},"repository":{"url":"git+https://github.com/sarmadparvez/postgresql-mcp.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP server for PostgreSQL with full read-write support. Works with any PostgreSQL instance — local, Supabase, RDS, or self-hosted.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"pg":"^8.20.0","zod":"^4.3.6","@modelcontextprotocol/sdk":"^1.27.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/postgresql-mcp_1.0.5_1773004524762_0.17671847156451204","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@sarmadparvez/postgresql-mcp","version":"1.0.6","keywords":["mcp","model-context-protocol","postgresql","postgres","ai","claude","llm"],"author":{"name":"sarmadparvez"},"license":"ISC","_id":"@sarmadparvez/postgresql-mcp@1.0.6","maintainers":[{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"}],"homepage":"https://github.com/sarmadparvez/postgresql-mcp#readme","bugs":{"url":"https://github.com/sarmadparvez/postgresql-mcp/issues"},"bin":{"postgresql-mcp":"index.js"},"dist":{"shasum":"849d166eaca060ab4d65747973b2d4cdeb60a505","tarball":"https://registry.npmjs.org/@sarmadparvez/postgresql-mcp/-/postgresql-mcp-1.0.6.tgz","fileCount":3,"integrity":"sha512-Tj9KuDAcqtEq4wYU7q+3faJApO931IPBj11aq5njA+GB5Axu2rugclgy67YDiSD2ZzC8Ie58MgsGyxoYmbEA7A==","signatures":[{"sig":"MEQCIA4klM6g2vYnzawAdm2zSzdCFYRivvDfsiL8MmlGj1KzAiBVtmdEDMMfmNADk+rIXUQsnshwUaXlCyu36Y6czQKL7w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17051},"main":"index.js","type":"module","engines":{"node":">=18"},"gitHead":"ff8daa83b46167234313e31b11ac590c6fe35c5b","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"},"repository":{"url":"git+https://github.com/sarmadparvez/postgresql-mcp.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP server for PostgreSQL with full read-write support. Works with any PostgreSQL instance — local, Supabase, RDS, or self-hosted.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"pg":"^8.20.0","zod":"^4.3.6","@modelcontextprotocol/sdk":"^1.27.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/postgresql-mcp_1.0.6_1773005492702_0.586197383068995","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@sarmadparvez/postgresql-mcp","version":"1.0.7","keywords":["mcp","mcp-server","model-context-protocol","postgresql","postgres","database","sql","ai","claude","cursor","windsurf","llm","supabase","rds","aws-rds","read-write","transactions","schema","anthropic","tool-use","ai-tools","postgres-mcp","postgresql-mcp"],"author":{"name":"sarmadparvez"},"license":"ISC","_id":"@sarmadparvez/postgresql-mcp@1.0.7","maintainers":[{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"}],"homepage":"https://github.com/sarmadparvez/postgresql-mcp#readme","bugs":{"url":"https://github.com/sarmadparvez/postgresql-mcp/issues"},"bin":{"postgresql-mcp":"index.js"},"dist":{"shasum":"c2ce1100a4da904c03a7e2259291f3e668f4689a","tarball":"https://registry.npmjs.org/@sarmadparvez/postgresql-mcp/-/postgresql-mcp-1.0.7.tgz","fileCount":3,"integrity":"sha512-fkH4c7y0EafTtwC2PH33NGocDX9CWk1RMiGiK23CDNvVH9OihvQli3At9Gh7GpyEjGrVeXwzaQHRgpPS2Btd4A==","signatures":[{"sig":"MEUCIQDSYJ0Dt+CmhHA/+eUgBtOZhO5Lp5dHyWwai/EVEoPeSwIgPikAkf2oxpb11V2o3g8ku+XgZYtYurWM+y7V4EbxqO4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18746},"main":"index.js","type":"module","engines":{"node":">=18"},"gitHead":"e296dd5aa51663f586b77305aa192811c91407c9","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"},"repository":{"url":"git+https://github.com/sarmadparvez/postgresql-mcp.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP server for PostgreSQL with full read-write support, transactions, and schema inspection. Works with any PostgreSQL instance — local, Supabase, AWS RDS, or self-hosted. Use with Claude, Cursor, Windsurf, and any MCP-compatible AI client.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"pg":"^8.20.0","zod":"^4.3.6","@modelcontextprotocol/sdk":"^1.27.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/postgresql-mcp_1.0.7_1773477986926_0.7140157657972745","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"name":"@sarmadparvez/postgresql-mcp","version":"1.0.8","description":"MCP server for PostgreSQL with full read-write support, transactions, and schema inspection. Works with any PostgreSQL instance — local, Supabase, AWS RDS, or self-hosted. Use with Claude, Cursor, Windsurf, and any MCP-compatible AI client.","main":"index.js","bin":{"postgresql-mcp":"index.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["mcp","mcp-server","model-context-protocol","postgresql","postgres","database","sql","ai","claude","cursor","windsurf","llm","supabase","rds","aws-rds","read-write","transactions","schema","anthropic","tool-use","ai-tools","postgres-mcp","postgresql-mcp"],"author":{"name":"sarmadparvez"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/sarmadparvez/postgresql-mcp.git"},"homepage":"https://github.com/sarmadparvez/postgresql-mcp#readme","engines":{"node":">=18"},"type":"module","dependencies":{"@modelcontextprotocol/sdk":"^1.27.1","pg":"^8.20.0","zod":"^4.3.6"},"_id":"@sarmadparvez/postgresql-mcp@1.0.8","gitHead":"16672c39e8864de30dfbc8df608157edbef8a102","bugs":{"url":"https://github.com/sarmadparvez/postgresql-mcp/issues"},"_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-a0MTFPK5F+r8KEg80/0Yud1WKi3aQVVM7eXfHvc4IhpLWG+dNASJW+BsmTnw+RS7TGDFCwrXSjrIBSN/VyF3gA==","shasum":"b9c687156bec74380c2574f7eb8f7e86b7b1e6be","tarball":"https://registry.npmjs.org/@sarmadparvez/postgresql-mcp/-/postgresql-mcp-1.0.8.tgz","fileCount":3,"unpackedSize":18748,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDCMjgP1Xp/lALchSxtHp+a8o5cy7vQMW9VdeMbhKoGUQIgZ/vZ83XmnOvf/37KdL4LBFbmnpRwPGQgb6Ds0OIPDnU="}]},"_npmUser":{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"},"directories":{},"maintainers":[{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postgresql-mcp_1.0.8_1773480211074_0.7303348137529706"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-08T20:34:39.833Z","modified":"2026-03-14T09:23:31.379Z","1.0.0":"2026-03-08T20:34:40.045Z","1.0.1":"2026-03-08T20:43:56.912Z","1.0.2":"2026-03-08T20:51:41.654Z","1.0.3":"2026-03-08T21:03:37.978Z","1.0.4":"2026-03-08T21:09:41.692Z","1.0.5":"2026-03-08T21:15:24.956Z","1.0.6":"2026-03-08T21:31:32.833Z","1.0.7":"2026-03-14T08:46:27.099Z","1.0.8":"2026-03-14T09:23:31.260Z"},"bugs":{"url":"https://github.com/sarmadparvez/postgresql-mcp/issues"},"author":{"name":"sarmadparvez"},"license":"ISC","homepage":"https://github.com/sarmadparvez/postgresql-mcp#readme","keywords":["mcp","mcp-server","model-context-protocol","postgresql","postgres","database","sql","ai","claude","cursor","windsurf","llm","supabase","rds","aws-rds","read-write","transactions","schema","anthropic","tool-use","ai-tools","postgres-mcp","postgresql-mcp"],"repository":{"type":"git","url":"git+https://github.com/sarmadparvez/postgresql-mcp.git"},"description":"MCP server for PostgreSQL with full read-write support, transactions, and schema inspection. Works with any PostgreSQL instance — local, Supabase, AWS RDS, or self-hosted. Use with Claude, Cursor, Windsurf, and any MCP-compatible AI client.","maintainers":[{"name":"sarmadparvez","email":"sarmadparvez92@gmail.com"}],"readme":"# postgresql-mcp\n\n[![npm version](https://img.shields.io/npm/v/@sarmadparvez/postgresql-mcp.svg)](https://www.npmjs.com/package/@sarmadparvez/postgresql-mcp)\n[![npm downloads](https://img.shields.io/npm/dm/@sarmadparvez/postgresql-mcp.svg)](https://www.npmjs.com/package/@sarmadparvez/postgresql-mcp)\n[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)\n\nA [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for PostgreSQL with full read-write support, atomic transactions, and schema inspection. Works with **Claude Desktop**, **Cursor**, **Windsurf**, and any MCP-compatible AI client.\n\nConnect any PostgreSQL database — **local**, **Supabase**, **AWS RDS**, or **self-hosted** — to your AI assistant in seconds.\n\n## Features\n\n- Full read-write SQL access (`SELECT`, `INSERT`, `UPDATE`, `DELETE`, `CREATE`, `DROP`)\n- Atomic multi-statement transactions with automatic rollback on failure\n- Schema inspection: columns, types, nullability, defaults, primary keys\n- Optional read-only mode via `?mode=readonly`\n- No cloud lock-in — works with any standard PostgreSQL connection string\n- Single file, minimal dependencies\n\n## Why this exists\n\nThere are two other PostgreSQL MCP servers worth knowing about, and neither fully covers the general-purpose use case:\n\n**Anthropic's official [`@modelcontextprotocol/server-postgres`](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/postgres)** is strictly read-only — it exposes only a single `query` tool that runs inside a `READ ONLY` transaction. No writes, no DDL, no transactions. It was also deprecated and archived in July 2025.\n\n**Microsoft's [`azure-postgresql-mcp`](https://github.com/Azure-Samples/azure-postgresql-mcp)** does support writes and DDL, but it is built specifically for Azure Database for PostgreSQL Flexible Server. While it technically accepts standard `PG*` environment variables (so a local connection may work), local use is untested and unsupported. Several tools require Microsoft Entra authentication and Azure-specific APIs that won't function outside Azure. It also pulls in Azure SDK dependencies you don't need for a non-Azure setup. It is currently in Preview.\n\nThis server is the alternative for everything else: local PostgreSQL, self-hosted, Supabase, RDS, or any standard PostgreSQL instance. It is a single dependency-light file with no cloud lock-in, full read-write support, atomic multi-statement transactions, and an optional `?mode=readonly` flag when you want to restrict access.\n\n## Requirements\n\n- Node.js 18+\n- A running PostgreSQL database\n\n## Installation\n\n```bash\nnpm install -g @sarmadparvez/postgresql-mcp\n```\n\nOr run directly without installing (requires npm 7+ / Node.js 18+):\n\n```bash\nnpx @sarmadparvez/postgresql-mcp <postgresql-connection-string>\n```\n\n## Usage\n\n```bash\npostgresql-mcp <postgresql-connection-string>\n```\n\n**Examples:**\n\n```bash\n# Read-write access\npostgresql-mcp postgresql://user:pass@localhost:5432/mydb\n\n# Read-only mode (disables execute and transaction tools)\npostgresql-mcp postgresql://user:pass@localhost:5432/mydb?mode=readonly\n```\n\nOr with `npx` (requires npm 7+ / Node.js 18+):\n\n```bash\nnpx @sarmadparvez/postgresql-mcp postgresql://user:pass@localhost:5432/mydb\nnpx @sarmadparvez/postgresql-mcp postgresql://user:pass@localhost:5432/mydb?mode=readonly\n```\n\n## Tools\n\n| Tool | Available in | Description |\n|------|-------------|-------------|\n| `query` | Always | Execute a read-only `SELECT` query. Runs inside a `READ ONLY` transaction. Returns rows as JSON. |\n| `execute` | Read-write mode | Execute a write SQL statement (`INSERT`, `UPDATE`, `DELETE`, `CREATE`, `DROP`, etc.). Returns rows affected. |\n| `schema` | Always | List columns, types, nullability, defaults, and primary keys for tables in a given schema. Optionally filter to a specific table. |\n| `list_tables` | Always | List all base tables in a schema with their disk size. |\n| `transaction` | Read-write mode | Execute multiple SQL statements atomically. Rolls back all statements if any one fails. |\n\n## Read-Only Mode\n\nAppend `?mode=readonly` to the connection string to start the server in read-only mode. This disables the `execute` and `transaction` tools, leaving only `query`, `schema`, and `list_tables`.\n\n## Claude Desktop Configuration\n\nFirst, install the package globally:\n\n```bash\nnpm install -g @sarmadparvez/postgresql-mcp\n```\n\nThen find the paths to `node` and the installed script:\n\n```bash\nwhich node\n# e.g. /usr/local/bin/node\n# nvm users: /Users/yourname/.nvm/versions/node/v22.12.0/bin/node\n\nnpm root -g\n# e.g. /usr/local/lib/node_modules\n# nvm users: /Users/yourname/.nvm/versions/node/v22.12.0/lib/node_modules\n```\n\nAdd this to your `claude_desktop_config.json`:\n\n- Replace `command` with the output of `which node`\n- Replace the prefix of the script path with the output of `npm root -g` — the suffix `/@sarmadparvez/postgresql-mcp/index.js` stays the same\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres\": {\n      \"command\": \"/usr/local/bin/node\",\n      \"args\": [\n        \"/usr/local/lib/node_modules/@sarmadparvez/postgresql-mcp/index.js\",\n        \"postgresql://user:pass@localhost:5432/mydb\"\n      ]\n    }\n  }\n}\n```\n\nFor read-only access, append `?mode=readonly` to the connection string:\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres-readonly\": {\n      \"command\": \"/usr/local/bin/node\",\n      \"args\": [\n        \"/usr/local/lib/node_modules/@sarmadparvez/postgresql-mcp/index.js\",\n        \"postgresql://user:pass@localhost:5432/mydb?mode=readonly\"\n      ]\n    }\n  }\n}\n```\n\n## Compatible AI Clients\n\nThis MCP server works with any client that supports the Model Context Protocol:\n\n- [Claude Desktop](https://claude.ai/download) (Anthropic)\n- [Cursor](https://www.cursor.com)\n- [Windsurf](https://windsurf.com)\n- Any other MCP-compatible client\n\n## Dependencies\n\n- [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk) — MCP server framework\n- [`pg`](https://node-postgres.com) — PostgreSQL client\n- [`zod`](https://zod.dev) — Schema validation for tool inputs\n","readmeFilename":"README.md"}