{"_id":"@calebmabry/postgres-mcp-server","_rev":"7-1e43bb54d7138257a7117d04aafdd192","name":"@calebmabry/postgres-mcp-server","dist-tags":{"latest":"0.1.5"},"versions":{"2.0.0":{"name":"@calebmabry/postgres-mcp-server","version":"2.0.0","keywords":["mcp","model-context-protocol","kysely","database","postgresql","postgres","sql","orm","typescript"],"author":{"name":"Caleb Mabry"},"license":"ISC","_id":"@calebmabry/postgres-mcp-server@2.0.0","maintainers":[{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"}],"homepage":"https://github.com/caleb-mabry/postgres-mcp#readme","bugs":{"url":"https://github.com/caleb-mabry/postgres-mcp/issues"},"bin":{"postgres-mcp-server":"dist/index.js"},"dist":{"shasum":"524e7b373f0a2bd86cb5bae6cb3da8df67cb8fee","tarball":"https://registry.npmjs.org/@calebmabry/postgres-mcp-server/-/postgres-mcp-server-2.0.0.tgz","fileCount":63,"integrity":"sha512-LkiFhqyBtcGES3qzajW0/75SodXdVttrtuJ6rozgUF0Af4qXDRoCorDCC+0kzdv2hZgbO0lnxCFMCQ5ANOYkaw==","signatures":[{"sig":"MEQCIBB9g49Ao5u1gXX3tcGwUTzs3KXsD+fIRzOiLAUg3t7yAiBdkQjmClG5swtkMbucu8YpeJBFlWDuKaRN5S+2f/yzlA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":133856},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"4fb1bc36e3b1aa7e3d360440ebe08e6c895cfa79","scripts":{"dev":"tsx src/index.ts","test":"jest","build":"tsc","start":"node dist/index.js","dev:http":"tsx src/http-server.ts","test:unit":"jest tests/unit","start:http":"node dist/http-server.js","test:watch":"jest --watch","release:major":"npm version major && npm publish --access public","release:minor":"npm version minor && npm publish --access public","release:patch":"npm version patch && npm publish --access public","test:coverage":"jest --coverage","coverage:clean":"rm -rf coverage","prepublishOnly":"npm run build && npm test","coverage:report":"npm run test:coverage && open coverage/lcov-report/index.html","test:integration":"jest tests/integration"},"_npmUser":{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"},"deprecated":"Accidental publish - please use v0.1.0 or later","repository":{"url":"git+https://github.com/caleb-mabry/postgres-mcp.git","type":"git"},"_npmVersion":"11.8.0","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"25.5.0","dependencies":{"pg":"^8.11.5","zod":"^3.22.4","dotenv":"^16.4.5","kysely":"^0.27.3","node-sql-parser":"^5.4.0","zod-to-json-schema":"^3.24.5","@modelcontextprotocol/sdk":"^1.26.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.2","jest":"^29.7.0","ts-jest":"^29.1.2","@types/pg":"^8.11.5","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.7","@types/express":"^5.0.6","@testcontainers/postgresql":"^11.11.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres-mcp-server_2.0.0_1770748841216_0.7660109153949566","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@calebmabry/postgres-mcp-server","version":"0.1.0","keywords":["mcp","model-context-protocol","kysely","database","postgresql","postgres","sql","orm","typescript"],"author":{"name":"Caleb Mabry"},"license":"ISC","_id":"@calebmabry/postgres-mcp-server@0.1.0","maintainers":[{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"}],"homepage":"https://github.com/caleb-mabry/postgres-mcp#readme","bugs":{"url":"https://github.com/caleb-mabry/postgres-mcp/issues"},"bin":{"postgres-mcp-server":"dist/index.js"},"dist":{"shasum":"da5316fa4838c00eb1be70f2eaf0ce1e5f3fe0ca","tarball":"https://registry.npmjs.org/@calebmabry/postgres-mcp-server/-/postgres-mcp-server-0.1.0.tgz","fileCount":63,"integrity":"sha512-6JVmfx00LR4jxuhczUKnvaM71l8wNDi9aFQ/+IwpGUauW6OtoDMrM4uW1ElurEzciEUAKRdQRVzRpTaDjv51UQ==","signatures":[{"sig":"MEUCIQDwWLjVhK7iBLOtvbglBskCSIxeAnrJYjawu85hO5ueMgIgAUxpO3hEasXcX8z6n6P1ceEbpyC2HxrUnAZ6BGgakww=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":135001},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"09252a05f3ba10ceed2410f7871bda6c9dae361e","scripts":{"dev":"tsx src/index.ts","test":"jest","build":"tsc","start":"node dist/index.js","dev:http":"tsx src/http-server.ts","test:unit":"jest tests/unit","start:http":"node dist/http-server.js","test:watch":"jest --watch","release:major":"npm version major && npm publish --access public","release:minor":"npm version minor && npm publish --access public","release:patch":"npm version patch && npm publish --access public","test:coverage":"jest --coverage","coverage:clean":"rm -rf coverage","prepublishOnly":"npm run build && npm test","coverage:report":"npm run test:coverage && open coverage/lcov-report/index.html","test:integration":"jest tests/integration"},"_npmUser":{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"},"repository":{"url":"git+https://github.com/caleb-mabry/postgres-mcp.git","type":"git"},"_npmVersion":"11.8.0","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"25.5.0","dependencies":{"pg":"^8.11.5","zod":"^3.22.4","dotenv":"^16.4.5","kysely":"^0.27.3","node-sql-parser":"^5.4.0","zod-to-json-schema":"^3.24.5","@modelcontextprotocol/sdk":"^1.26.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.2","jest":"^29.7.0","ts-jest":"^29.1.2","@types/pg":"^8.11.5","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.7","@types/express":"^5.0.6","@testcontainers/postgresql":"^11.11.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres-mcp-server_0.1.0_1770754719108_0.3668755570617661","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@calebmabry/postgres-mcp-server","version":"0.1.1","keywords":["mcp","model-context-protocol","kysely","database","postgresql","postgres","sql","orm","typescript"],"author":{"name":"Caleb Mabry"},"license":"ISC","_id":"@calebmabry/postgres-mcp-server@0.1.1","maintainers":[{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"}],"homepage":"https://github.com/caleb-mabry/postgres-mcp#readme","bugs":{"url":"https://github.com/caleb-mabry/postgres-mcp/issues"},"bin":{"postgres-mcp-server":"dist/index.js"},"dist":{"shasum":"705b38606d39596a791484edb518fbad53c17c56","tarball":"https://registry.npmjs.org/@calebmabry/postgres-mcp-server/-/postgres-mcp-server-0.1.1.tgz","fileCount":63,"integrity":"sha512-VBqrCHLoTTMdbYVoQNIMmOlyFSUR7iqycLeopQHvPIn9f5zAsHEgA0x3nZ+a3DcUjiTFfjy7uCjOT4bLhhBWxw==","signatures":[{"sig":"MEUCIQDfEFzDY1WBW52oLd60RjI8F/hSkA4LypuxfLJ8DpcKWQIgNqdWJED1iQsOptu0WkWGqO1vc9c+g+jh2M4Pcv28nEI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":135014},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"02a01b99db1e1f784fb49fc69079a86f5077be85","scripts":{"dev":"tsx src/index.ts","test":"jest","build":"tsc","start":"node dist/index.js","dev:http":"tsx src/http-server.ts","test:unit":"jest tests/unit","start:http":"node dist/http-server.js","test:watch":"jest --watch","release:major":"npm version major && npm publish --access public","release:minor":"npm version minor && npm publish --access public","release:patch":"npm version patch && npm publish --access public","test:coverage":"jest --coverage","coverage:clean":"rm -rf coverage","prepublishOnly":"npm run build && npm test","coverage:report":"npm run test:coverage && open coverage/lcov-report/index.html","test:integration":"jest tests/integration"},"_npmUser":{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"},"repository":{"url":"git+https://github.com/caleb-mabry/postgres-mcp.git","type":"git"},"_npmVersion":"11.8.0","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"25.5.0","dependencies":{"pg":"^8.11.5","zod":"^3.22.4","dotenv":"^16.4.5","kysely":"^0.27.3","node-sql-parser":"^5.4.0","zod-to-json-schema":"^3.24.5","@modelcontextprotocol/sdk":"^1.26.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.2","jest":"^29.7.0","ts-jest":"^29.1.2","@types/pg":"^8.11.5","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.7","@types/express":"^5.0.6","@testcontainers/postgresql":"^11.11.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres-mcp-server_0.1.1_1770754874845_0.3703333484426137","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@calebmabry/postgres-mcp-server","version":"0.1.2","keywords":["mcp","model-context-protocol","kysely","database","postgresql","postgres","sql","orm","typescript"],"author":{"name":"Caleb Mabry"},"license":"ISC","_id":"@calebmabry/postgres-mcp-server@0.1.2","maintainers":[{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"}],"homepage":"https://github.com/caleb-mabry/postgres-mcp#readme","bugs":{"url":"https://github.com/caleb-mabry/postgres-mcp/issues"},"bin":{"postgres-mcp-server":"dist/index.js"},"dist":{"shasum":"46bdf7bb342528e7d6ecfc5657375cbd2187ab03","tarball":"https://registry.npmjs.org/@calebmabry/postgres-mcp-server/-/postgres-mcp-server-0.1.2.tgz","fileCount":63,"integrity":"sha512-vNfW5s+lTWEPzTAJfbDtr/Ft6q0vkKTu3HZCzHnAnMCkwCCPD/CaAJjwYGJmtPJe4Xt3T5fknjiEYHle1in7YA==","signatures":[{"sig":"MEQCIF5A9rCjSItNEmoZd8BZSrjnKgrs5nOez4zj5QbMFnsVAiBZMZzTBlrlIhCEGpPWRKYNxbk/IPR9jGqeCRsYpFixdQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":135014},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"45f54569cddc52239f1905af0a93ecae46071634","scripts":{"dev":"tsx src/index.ts","test":"jest","build":"tsc","start":"node dist/index.js","dev:http":"tsx src/http-server.ts","test:unit":"jest tests/unit","start:http":"node dist/http-server.js","test:watch":"jest --watch","release:major":"npm version major && npm publish --access public","release:minor":"npm version minor && npm publish --access public","release:patch":"npm version patch && npm publish --access public","test:coverage":"jest --coverage","coverage:clean":"rm -rf coverage","prepublishOnly":"npm run build && npm test","coverage:report":"npm run test:coverage && open coverage/lcov-report/index.html","test:integration":"jest tests/integration"},"_npmUser":{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"},"repository":{"url":"git+https://github.com/caleb-mabry/postgres-mcp.git","type":"git"},"_npmVersion":"11.8.0","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"25.5.0","dependencies":{"pg":"^8.11.5","zod":"^3.22.4","dotenv":"^16.4.5","kysely":"^0.27.3","node-sql-parser":"^5.4.0","zod-to-json-schema":"^3.24.5","@modelcontextprotocol/sdk":"^1.26.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.2","jest":"^29.7.0","ts-jest":"^29.1.2","@types/pg":"^8.11.5","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.7","@types/express":"^5.0.6","@testcontainers/postgresql":"^11.11.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres-mcp-server_0.1.2_1770754998229_0.9498804374577421","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@calebmabry/postgres-mcp-server","version":"0.1.3","keywords":["mcp","model-context-protocol","kysely","database","postgresql","postgres","sql","orm","typescript"],"author":{"name":"Caleb Mabry"},"license":"ISC","_id":"@calebmabry/postgres-mcp-server@0.1.3","maintainers":[{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"}],"homepage":"https://github.com/caleb-mabry/postgres-mcp#readme","bugs":{"url":"https://github.com/caleb-mabry/postgres-mcp/issues"},"bin":{"postgres-mcp-http":"dist/http-server.js","postgres-mcp-server":"dist/index.js"},"dist":{"shasum":"bcce4a28e663995868f5add8bb67a4f5af957569","tarball":"https://registry.npmjs.org/@calebmabry/postgres-mcp-server/-/postgres-mcp-server-0.1.3.tgz","fileCount":63,"integrity":"sha512-IX3Nuuv1V/fkNzOrwf4Zvi+tMciIEEMz527+hQYs6hfMnQ6Bxo1nojoj8HMVAMmxq9yxk6Fi048b29N5M69S5g==","signatures":[{"sig":"MEUCIDVuu8ugXUcodZ7ez6slGLt6WePJ+W+fuOOAX/Oaobt0AiEA4sUzuK6dptQsNsRXosTaOZzFkETzeu85vgP8zQenk7Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":135062},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"df72b7926536ca2e749d89c04f14e65263c4389c","scripts":{"dev":"tsx src/index.ts","test":"jest","build":"tsc","start":"node dist/index.js","dev:http":"tsx src/http-server.ts","test:unit":"jest tests/unit","start:http":"node dist/http-server.js","test:watch":"jest --watch","release:major":"npm version major && npm publish --access public","release:minor":"npm version minor && npm publish --access public","release:patch":"npm version patch && npm publish --access public","test:coverage":"jest --coverage","coverage:clean":"rm -rf coverage","prepublishOnly":"npm run build && npm test","coverage:report":"npm run test:coverage && open coverage/lcov-report/index.html","test:integration":"jest tests/integration"},"_npmUser":{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"},"repository":{"url":"git+https://github.com/caleb-mabry/postgres-mcp.git","type":"git"},"_npmVersion":"11.8.0","description":"Model Context Protocol server for PostgreSQL database operations","directories":{},"_nodeVersion":"25.5.0","dependencies":{"pg":"^8.11.5","zod":"^3.22.4","dotenv":"^16.4.5","kysely":"^0.27.3","node-sql-parser":"^5.4.0","zod-to-json-schema":"^3.24.5","@modelcontextprotocol/sdk":"^1.26.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.2","jest":"^29.7.0","ts-jest":"^29.1.2","@types/pg":"^8.11.5","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.7","@types/express":"^5.0.6","@testcontainers/postgresql":"^11.11.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres-mcp-server_0.1.3_1770755274091_0.986794409186621","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@calebmabry/postgres-mcp-server","version":"0.1.5","description":"Model Context Protocol server for PostgreSQL database operations","type":"module","main":"dist/index.js","bin":{"postgres-mcp-server":"dist/index.js","postgres-mcp-http":"dist/http-server.js"},"scripts":{"build":"tsc","start":"node dist/index.js","start:http":"node dist/http-server.js","dev":"tsx src/index.ts","dev:http":"tsx src/http-server.ts","test":"jest","test:unit":"jest tests/unit","test:integration":"jest tests/integration","test:watch":"jest --watch","test:coverage":"jest --coverage","coverage:clean":"rm -rf coverage","coverage:report":"npm run test:coverage && open coverage/lcov-report/index.html","prepublishOnly":"npm run build && npm test","release:patch":"npm version patch && npm publish --access public","release:minor":"npm version minor && npm publish --access public","release:major":"npm version major && npm publish --access public"},"keywords":["mcp","model-context-protocol","kysely","database","postgresql","postgres","sql","orm","typescript"],"author":{"name":"Caleb Mabry"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/caleb-mabry/postgres-mcp.git"},"homepage":"https://github.com/caleb-mabry/postgres-mcp#readme","bugs":{"url":"https://github.com/caleb-mabry/postgres-mcp/issues"},"engines":{"node":">=20.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.26.0","dotenv":"^16.4.5","kysely":"^0.27.3","node-sql-parser":"^5.4.0","pg":"^8.11.5","zod":"^3.22.4","zod-to-json-schema":"^3.24.5"},"devDependencies":{"@testcontainers/postgresql":"^11.11.0","@types/express":"^5.0.6","@types/jest":"^29.5.12","@types/node":"^20.12.7","@types/pg":"^8.11.5","jest":"^29.7.0","ts-jest":"^29.1.2","tsx":"^4.7.2","typescript":"^5.4.5"},"gitHead":"91bee9406a3cc0e29818dd7ba09a915d9e5a81f9","types":"./dist/index.d.ts","_id":"@calebmabry/postgres-mcp-server@0.1.5","_nodeVersion":"25.5.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-nM6UUXIjAKJtzrlchxEyeZAYFNDCWFNvrA4iq9UyNTnEzX4r6KMb5Y6EkSxK7N282l8luaYXLfajGRLu9bdXxQ==","shasum":"f19e9f06128b6222ca33e53a676f7374e1b5b052","tarball":"https://registry.npmjs.org/@calebmabry/postgres-mcp-server/-/postgres-mcp-server-0.1.5.tgz","fileCount":63,"unpackedSize":135913,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBBFU9w7EIsjkGC/NlPztZ+RvZBxRllECOoSCkl9ykECAiAYIaB1gpTTj6xEFhApxoa27O77Wt+PKD6/1S9ixfSPrA=="}]},"_npmUser":{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"},"directories":{},"maintainers":[{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postgres-mcp-server_0.1.5_1770755744762_0.1930923139937859"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-10T18:40:41.112Z","modified":"2026-02-10T20:35:45.043Z","2.0.0":"2026-02-10T18:40:41.359Z","0.1.0":"2026-02-10T20:18:39.294Z","0.1.1":"2026-02-10T20:21:14.982Z","0.1.2":"2026-02-10T20:23:18.363Z","0.1.3":"2026-02-10T20:27:54.261Z","0.1.5":"2026-02-10T20:35:44.924Z"},"bugs":{"url":"https://github.com/caleb-mabry/postgres-mcp/issues"},"author":{"name":"Caleb Mabry"},"license":"ISC","homepage":"https://github.com/caleb-mabry/postgres-mcp#readme","keywords":["mcp","model-context-protocol","kysely","database","postgresql","postgres","sql","orm","typescript"],"repository":{"type":"git","url":"git+https://github.com/caleb-mabry/postgres-mcp.git"},"description":"Model Context Protocol server for PostgreSQL database operations","maintainers":[{"name":"calebmabry","email":"caleb.mabry.dev@gmail.com"}],"readme":"# Postgres MCP Server\n\n[![npm version](https://badge.fury.io/js/@calebmabry%2Fpostgres-mcp-server.svg)](https://www.npmjs.com/package/@calebmabry/postgres-mcp-server)\n[![Tests](https://github.com/caleb-mabry/postgres-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/caleb-mabry/postgres-mcp/actions/workflows/test.yml)\n[![GitHub issues](https://img.shields.io/github/issues/caleb-mabry/postgres-mcp)](https://github.com/caleb-mabry/postgres-mcp/issues)\n[![Documentation](https://img.shields.io/badge/docs-docusaurus-blue)](https://caleb-mabry.github.io/postgres-mcp/)\n\nA Model Context Protocol (MCP) server that provides secure database access to PostgreSQL through Kysely ORM. This server enables Claude Desktop to interact with PostgreSQL databases using natural language.\n\n## 📚 Documentation\n\n**Full documentation is available at: [caleb-mabry.github.io/postgres-mcp](https://caleb-mabry.github.io/postgres-mcp/)**\n\n### Quick Links\n- [Getting Started](https://caleb-mabry.github.io/postgres-mcp/docs/intro)\n- [Claude Desktop Setup](https://caleb-mabry.github.io/postgres-mcp/docs/setup/claude-desktop)\n- [HTTP Server Setup](https://caleb-mabry.github.io/postgres-mcp/docs/setup/http-server)\n- [Docker Setup](https://caleb-mabry.github.io/postgres-mcp/docs/setup/docker)\n- [Usage Modes](https://caleb-mabry.github.io/postgres-mcp/docs/guides/usage-modes)\n\n## Features\n\n- **MCP Tools**: Query execution, table listing, schema inspection, and constraint information\n- **Type Safety**: Full TypeScript support with typed inputs/outputs\n- **Connection Pooling**: Configurable connection limits with idle timeout\n- **Error Handling**: Graceful error messages for connection and query issues\n- **Security**: Parameterized queries to prevent SQL injection\n\n## Quick Start\n\n### For Claude Desktop Users\n\nSee the **[📖 Claude Desktop Setup Guide](https://caleb-mabry.github.io/postgres-mcp/docs/setup/claude-desktop)** for complete instructions.\n\n### For HTTP/API Usage\n\nSee the **[📖 HTTP Server Setup Guide](https://caleb-mabry.github.io/postgres-mcp/docs/setup/http-server)** for complete instructions.\n\n### For Docker\n\nSee the **[📖 Docker Setup Guide](https://caleb-mabry.github.io/postgres-mcp/docs/setup/docker)** for complete instructions.\n\n### Direct Installation\n\n```bash\nnpx -y @calebmabry/postgres-mcp-server\n```\n\n## Configuration\n\nCreate a `.env` file with your database credentials:\n\n```env\nDB_HOST=127.0.0.1\nDB_PORT=5432\nDB_USER=postgres\nDB_PASSWORD=your_password_here\nDB_NAME=postgres\nDB_SSL=true\n\n# HTTP Server mode only (optional)\nPORT=3000\nALLOWED_HOSTS=localhost,127.0.0.1\n```\n\n## Available Tools\n\n| Tool                  | Description                                 | Required Parameters                 | Optional Parameters                                         |\n| --------------------- | ------------------------------------------- | ----------------------------------- | ----------------------------------------------------------- |\n| **`query`**           | Execute SQL queries with pagination support | `sql` (string)                      | `pageSize` (1-500), `offset` (number), `parameters` (array) |\n| **`describe_table`**  | Get table structure and column details      | `schema` (string), `table` (string) | -                                                           |\n| **`list_tables`**     | List all tables in a schema                 | `schema` (string)                   | -                                                           |\n| **`list_schemas`**    | List all schemas in the database            | -                                   | `includeSystemSchemas` (boolean)                            |\n| **`get_constraints`** | Get table constraints (PK, FK, etc.)        | `schema` (string), `table` (string) | -                                                           |\n| **`list_indexes`**    | List indexes for a table or schema          | `schema` (string)                   | `table` (string)                                            |\n| **`list_views`**      | List views in a schema                      | `schema` (string)                   | -                                                           |\n| **`list_functions`**  | List functions and procedures               | `schema` (string)                   | -                                                           |\n| **`explain_query`**   | Get query execution plan                    | `sql` (string)                      | `analyze` (boolean), `format` (text/json/xml/yaml)          |\n| **`get_table_stats`** | Get table size and statistics               | `schema` (string)                   | `table` (string)                                            |\n\n### Key Features\n\n- **Pagination**: Query tool supports up to 500 rows per page with automatic LIMIT/OFFSET handling\n- **Security**: Parameterized queries prevent SQL injection, READ_ONLY mode by default\n- **Type Safety**: Full TypeScript support with Zod schema validation\n\n## Client Configuration\n\nThe postgres-mcp-server works with any MCP-compatible client. See configuration examples below:\n\n### Claude Desktop\n\nAdd to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres-mcp-server\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@calebmabry/postgres-mcp-server\"],\n      \"env\": {\n        \"DB_HOST\": \"127.0.0.1\",\n        \"DB_PORT\": \"5432\",\n        \"DB_USER\": \"postgres\",\n        \"DB_PASSWORD\": \"your_password_here\",\n        \"DB_NAME\": \"your_database_name\",\n        \"DB_SSL\": \"false\",\n        \"READ_ONLY\": \"true\"\n      }\n    }\n  }\n}\n```\n\n**Config locations:**\n- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\nSee [claude_config_example.json](./claude_config_example.json) for a full example.\n\n### Cline (VS Code)\n\nAdd to `.cline/mcp_settings.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres-mcp-server\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@calebmabry/postgres-mcp-server\"],\n      \"env\": {\n        \"DB_HOST\": \"localhost\",\n        \"DB_NAME\": \"your_database\",\n        \"DB_USER\": \"postgres\",\n        \"DB_PASSWORD\": \"your_password\"\n      }\n    }\n  }\n}\n```\n\nSee [cline_mcp_settings_example.json](./cline_mcp_settings_example.json) for a full example.\n\n### Zed Editor\n\nAdd to Zed settings (Settings → Context Servers):\n\n```json\n{\n  \"context_servers\": {\n    \"postgres-mcp-server\": {\n      \"command\": {\n        \"path\": \"npx\",\n        \"args\": [\"-y\", \"@calebmabry/postgres-mcp-server\"]\n      },\n      \"settings\": {\n        \"DB_HOST\": \"localhost\",\n        \"DB_NAME\": \"your_database\",\n        \"DB_USER\": \"postgres\",\n        \"DB_PASSWORD\": \"your_password\"\n      }\n    }\n  }\n}\n```\n\nSee [zed_settings_example.json](./zed_settings_example.json) for a full example.\n\n### Docker\n\nUse the included Dockerfile or docker-compose.yml:\n\n```bash\ndocker-compose up -d\n```\n\nSee [docker-compose.example.yml](./docker-compose.example.yml) for a full example.\n\n## Development\n\n```bash\n# Clone and install dependencies\ngit clone https://github.com/caleb-mabry/postgres-mcp.git\ncd postgres-mcp-server\nnpm install\n\n# Run in development mode with hot reload\nnpm run dev\n\n# Build for production\nnpm run build\n\n# Run tests\nnpm run test\n\n# Run specific test suites\nnpm run test:unit\nnpm run test:integration\n```\n\n## Environment Variables\n\n| Variable            | Default     | Description                             |\n| ------------------- | ----------- | --------------------------------------- |\n| `DB_HOST`           | `127.0.0.1` | PostgreSQL host                         |\n| `DB_PORT`           | `5432`      | PostgreSQL port                         |\n| `DB_USER`           | `postgres`  | Database user                           |\n| `DB_PASSWORD`       | _required_  | Database password                       |\n| `DB_NAME`           | `postgres`  | Database name                           |\n| `DB_SSL`            | `false`     | Enable SSL connection (set to `false` for local dev) |\n| `READ_ONLY`         | `true`      | Restrict to SELECT/WITH/EXPLAIN queries |\n| `QUERY_TIMEOUT`     | `30000`     | Query timeout in milliseconds           |\n| `MAX_PAGE_SIZE`     | `500`       | Maximum rows per page                   |\n| `DEFAULT_PAGE_SIZE` | `100`       | Default page size when not specified    |\n| `PORT`              | `3000`      | HTTP server port (HTTP mode only)       |\n| `ALLOWED_HOSTS`     | _none_      | Comma-separated allowed hosts (HTTP mode only). Example: `localhost,127.0.0.1,example.com` |\n| `MODE`              | `stdio`     | Server mode in Docker: `stdio` or `http` |\n\nFor detailed documentation on all features and setup options, visit **[caleb-mabry.github.io/postgres-mcp](https://caleb-mabry.github.io/postgres-mcp/)**.\n\n## License\n\nISC\n","readmeFilename":"README.md"}