{"_id":"ainative-postgres-mcp","_rev":"3-c6398dc415deca544a5919263535fb77","name":"ainative-postgres-mcp","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"ainative-postgres-mcp","version":"1.0.0","keywords":["mcp","mcp-server","mcp-server-hosting","model-context-protocol","model-context-protocol-server","modelcontextprotocol","postgres","postgresql","database","auto-provisioning","zerodb","ainative","managed-postgres","serverless-postgres","free-database","pgvector","vector-search","sql","query","schema","claude","claude-code","claude-desktop","claude-ai-agents","cursor","windsurf","codex","n8n-ai","server-postgres","server-postgres-alternative","neon-alternative","supabase-alternative","planetscale-alternative","zero-config","instant-database","ai-database","agent-database","agentic-ai","ai-agents","ai-tool-calling","production-ready","drop-in-replacement","free-tier","cloud-database"],"author":{"url":"https://ainative.studio","name":"AINative Studio","email":"toby@rely.ventures"},"license":"MIT","_id":"ainative-postgres-mcp@1.0.0","maintainers":[{"name":"ainative-studio","email":"toby@rely.ventures"}],"homepage":"https://github.com/AINative-Studio/ainative-postgres-mcp#readme","bugs":{"url":"https://github.com/AINative-Studio/ainative-postgres-mcp/issues"},"bin":{"ainative-postgres-mcp":"index.js"},"dist":{"shasum":"c2a49145db5fa0874d47a260266b98290472c3e5","tarball":"https://registry.npmjs.org/ainative-postgres-mcp/-/ainative-postgres-mcp-1.0.0.tgz","fileCount":6,"integrity":"sha512-sklGlHYxuVU0CyLzwsG6riGeuDgJ4hHaKBaZA0Fw5XiuWyiRFBgNWgwvB3xlpX39LDukpEPht16asxJVnMtCJQ==","signatures":[{"sig":"MEUCIER0rZWMDJAn4MbiYrVVO12KjvqnWI/5QnhH+4pvXoQZAiEAtoHCuOnaCb5mPi4dodCESHfkjrS3bA5XBGtoK+Agqcs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35146},"main":"index.js","type":"module","engines":{"npm":">=9.0.0","node":">=18.0.0"},"gitHead":"c1eb387de1835880c985bebc12d33eafa3c36519","scripts":{"test":"node --test tests/*.test.js","start":"node index.js"},"_npmUser":{"name":"ainative-studio","email":"toby@rely.ventures"},"repository":{"url":"git+https://github.com/AINative-Studio/ainative-postgres-mcp.git","type":"git"},"_npmVersion":"10.9.4","description":"Zero-config Postgres MCP server with auto-provisioning. Drop-in replacement for @modelcontextprotocol/server-postgres — no DATABASE_URL needed. Auto-provisions a managed PostgreSQL instance with pgvector on first run.","directories":{},"_nodeVersion":"22.21.0","dependencies":{"pg":"^8.13.0","dotenv":"^16.4.0","@modelcontextprotocol/sdk":"^1.24.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ainative-postgres-mcp_1.0.0_1781080013266_0.1902189190476089","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"ainative-postgres-mcp","version":"1.0.1","keywords":["mcp","mcp-server","mcp-server-hosting","model-context-protocol","model-context-protocol-server","modelcontextprotocol","postgres","postgresql","database","auto-provisioning","zerodb","ainative","managed-postgres","serverless-postgres","free-database","pgvector","vector-search","sql","query","schema","claude","claude-code","claude-desktop","claude-ai-agents","cursor","windsurf","codex","n8n-ai","server-postgres","server-postgres-alternative","neon-alternative","supabase-alternative","planetscale-alternative","zero-config","instant-database","ai-database","agent-database","agentic-ai","ai-agents","ai-tool-calling","production-ready","drop-in-replacement","free-tier","cloud-database"],"author":{"url":"https://ainative.studio","name":"AINative Studio","email":"toby@rely.ventures"},"license":"MIT","_id":"ainative-postgres-mcp@1.0.1","maintainers":[{"name":"ainative-studio","email":"toby@rely.ventures"}],"homepage":"https://github.com/AINative-Studio/ainative-postgres-mcp#readme","bugs":{"url":"https://github.com/AINative-Studio/ainative-postgres-mcp/issues"},"bin":{"ainative-postgres-mcp":"index.js"},"dist":{"shasum":"67e85fae207be5b9f25b4f458caab0ccfc0b1e28","tarball":"https://registry.npmjs.org/ainative-postgres-mcp/-/ainative-postgres-mcp-1.0.1.tgz","fileCount":6,"integrity":"sha512-9bf6QZK5LzEH4AEe8ueZITLXc//xt+ezySZMEgNiRPoMcoZLU+OD3y0b845oR9JP6DQT36Z3gJ57FAoReLothw==","signatures":[{"sig":"MEQCIAqmxk20DhHQ6f59KRG3RVZztj/rsk3ZHnmNHbgML3e4AiASHB2RPRi1h0s4xieeIA971FbfyOU2tj8Vl00i9XeOgg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36979},"main":"index.js","type":"module","engines":{"npm":">=9.0.0","node":">=18.0.0"},"gitHead":"761699962d55aadbdaba952971ce3e511e56bab6","mcpName":"io.github.AINative-Studio/ainative-postgres-mcp","scripts":{"test":"node --test tests/*.test.js","start":"node index.js"},"_npmUser":{"name":"ainative-studio","email":"toby@rely.ventures"},"repository":{"url":"git+https://github.com/AINative-Studio/ainative-postgres-mcp.git","type":"git"},"_npmVersion":"10.9.4","description":"Zero-config Postgres MCP server with auto-provisioning. Drop-in replacement for @modelcontextprotocol/server-postgres — no DATABASE_URL needed. Auto-provisions a managed PostgreSQL instance with pgvector on first run.","directories":{},"_nodeVersion":"22.21.0","dependencies":{"pg":"^8.13.0","dotenv":"^16.4.0","@modelcontextprotocol/sdk":"^1.24.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ainative-postgres-mcp_1.0.1_1785551083606_0.9687345222667911","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"_id":"ainative-postgres-mcp@1.0.2","bin":{"ainative-postgres-mcp":"index.js"},"bugs":{"url":"https://github.com/AINative-Studio/ainative-postgres-mcp/issues"},"dist":{"shasum":"cf41012379c970517552b7922907e9daca6142b3","tarball":"https://registry.npmjs.org/ainative-postgres-mcp/-/ainative-postgres-mcp-1.0.2.tgz","fileCount":6,"integrity":"sha512-0e0cL313ng8gNvLAoh0K+n9AjkacEwqJRfO91sjnO4Zqzn2DFAc3EYKbdTCN9YMWI07b+29dFQbe2FZo8ZEHoQ==","signatures":[{"sig":"MEUCIAOy9wZcttQuevpmhmPWYSxMZIGsLmxdUlnfOQD7NKFnAiEAzNZ2otz7FoZkyV54eSljAopPIx3doC4CAwQqpljWGqA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBeRwsd9PRDtWo6Rfvmna1rY92h1ZAB1rnMzPiSaZhYAAiEAp0jz9zrRf430LuWilDUCCnDi/+etxWjh0XcEJbhQLys="}],"unpackedSize":36955},"main":"index.js","name":"ainative-postgres-mcp","type":"module","author":{"url":"https://ainative.studio","name":"AINative Studio","email":"toby@rely.ventures"},"engines":{"npm":">=9.0.0","node":">=18.0.0"},"gitHead":"94c1dcb2e36926b4d5c3b7f521389be292bd9f15","license":"MIT","mcpName":"io.github.AINative-Studio/ainative-postgres-mcp","scripts":{"test":"node --test tests/*.test.js","start":"node index.js"},"version":"1.0.2","_npmUser":{"name":"ainative-studio","email":"toby@rely.ventures"},"homepage":"https://ainative.studio/products/zerodb","keywords":["mcp","mcp-server","mcp-server-hosting","model-context-protocol","model-context-protocol-server","modelcontextprotocol","postgres","postgresql","database","auto-provisioning","zerodb","ainative","managed-postgres","serverless-postgres","free-database","pgvector","vector-search","sql","query","schema","claude","claude-code","claude-desktop","claude-ai-agents","cursor","windsurf","codex","n8n-ai","server-postgres","server-postgres-alternative","neon-alternative","supabase-alternative","planetscale-alternative","zero-config","instant-database","ai-database","agent-database","agentic-ai","ai-agents","ai-tool-calling","production-ready","drop-in-replacement","free-tier","cloud-database"],"repository":{"url":"git+https://github.com/AINative-Studio/ainative-postgres-mcp.git","type":"git"},"_npmVersion":"10.9.4","description":"Zero-config Postgres MCP server with auto-provisioning. Drop-in replacement for @modelcontextprotocol/server-postgres — no DATABASE_URL needed. Auto-provisions a managed PostgreSQL instance with pgvector on first run.","directories":{},"maintainers":[{"name":"ainative-studio","email":"toby@rely.ventures"}],"_nodeVersion":"22.21.0","dependencies":{"pg":"^8.13.0","dotenv":"^16.4.0","@modelcontextprotocol/sdk":"^1.24.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ainative-postgres-mcp_1.0.2_1790310601537_0.4095572551984823"}}},"time":{"created":"2026-06-10T08:26:53.040Z","modified":"2026-09-25T04:30:01.782Z","1.0.0":"2026-06-10T08:26:53.536Z","1.0.1":"2026-08-01T02:24:43.746Z","1.0.2":"2026-09-25T04:30:01.612Z"},"bugs":{"url":"https://github.com/AINative-Studio/ainative-postgres-mcp/issues"},"author":{"url":"https://ainative.studio","name":"AINative Studio","email":"toby@rely.ventures"},"license":"MIT","homepage":"https://ainative.studio/products/zerodb","keywords":["mcp","mcp-server","mcp-server-hosting","model-context-protocol","model-context-protocol-server","modelcontextprotocol","postgres","postgresql","database","auto-provisioning","zerodb","ainative","managed-postgres","serverless-postgres","free-database","pgvector","vector-search","sql","query","schema","claude","claude-code","claude-desktop","claude-ai-agents","cursor","windsurf","codex","n8n-ai","server-postgres","server-postgres-alternative","neon-alternative","supabase-alternative","planetscale-alternative","zero-config","instant-database","ai-database","agent-database","agentic-ai","ai-agents","ai-tool-calling","production-ready","drop-in-replacement","free-tier","cloud-database"],"repository":{"url":"git+https://github.com/AINative-Studio/ainative-postgres-mcp.git","type":"git"},"description":"Zero-config Postgres MCP server with auto-provisioning. Drop-in replacement for @modelcontextprotocol/server-postgres — no DATABASE_URL needed. Auto-provisions a managed PostgreSQL instance with pgvector on first run.","maintainers":[{"name":"ainative-studio","email":"toby@rely.ventures"}],"readme":"# ainative-postgres-mcp\n\nZero-config PostgreSQL MCP server with auto-provisioning. Drop-in replacement for `@modelcontextprotocol/server-postgres` — no `DATABASE_URL` needed.\n\nThe official `@modelcontextprotocol/server-postgres` requires you to bring your own Postgres database and pass a connection string. This fork **auto-provisions a managed PostgreSQL instance** with pgvector on first run. Agents get a database instantly with zero configuration.\n\n## Quick Start\n\n```bash\nnpx ainative-postgres-mcp\n```\n\nThat's it. On first run:\n1. A free managed PostgreSQL instance is provisioned\n2. pgvector extension is enabled automatically\n3. Connection details are saved to `~/.ainative/postgres-config.json`, `.env`, and `.mcp.json`\n4. A claim URL is printed so you can take ownership of the database\n\n## MCP Configuration\n\n### Claude Code / Claude Desktop\n\nAdd to your `claude_desktop_config.json` or `.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"ainative-postgres-mcp\"]\n    }\n  }\n}\n```\n\n### With existing database\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"ainative-postgres-mcp\"],\n      \"env\": {\n        \"DATABASE_URL\": \"postgresql://user:pass@host:5432/mydb\"\n      }\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"ainative-postgres-mcp\"]\n    }\n  }\n}\n```\n\n### Windsurf\n\nAdd to `~/.windsurf/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"ainative-postgres-mcp\"]\n    }\n  }\n}\n```\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `query` | Execute read-only SQL queries (runs in READ ONLY transaction) |\n| `list_tables` | List all tables with schema, name, and type |\n| `describe_table` | Get full table schema: columns, types, constraints, indexes |\n| `create_table` | Create a new table with SQL DDL |\n| `insert` | Insert rows into a table (returns inserted rows) |\n\n### Comparison with official server-postgres\n\n| Feature | `@modelcontextprotocol/server-postgres` | `ainative-postgres-mcp` |\n|---------|----------------------------------------|------------------------|\n| Read queries | Yes | Yes |\n| Write queries | No | Yes (`create_table`, `insert`) |\n| Schema inspection | Via resources | Via `describe_table` tool |\n| Table listing | No | Yes (`list_tables`) |\n| Auto-provisioning | No | Yes |\n| pgvector | Manual setup | Auto-enabled |\n| Zero config | No (requires DATABASE_URL) | Yes |\n| Free tier | N/A | Yes |\n\n## How Auto-Provisioning Works\n\n```\nStart\n  |\n  v\nDATABASE_URL set? ----yes----> Connect directly\n  |\n  no\n  v\n~/.ainative/postgres-config.json exists? ----yes----> Load and connect\n  |\n  no\n  v\n.mcp.json has DATABASE_URL? ----yes----> Load and connect\n  |\n  no\n  v\nPOST /api/v1/public/instant-db   (get API key)\n  |\n  v\nPOST /api/v1/zerodb/postgres/provision   (get Postgres)\n  |\n  v\nSave to ~/.ainative/postgres-config.json + .env + .mcp.json\n  |\n  v\nConnect and enable pgvector\n```\n\n## pgvector Support\n\npgvector is automatically enabled on provisioned instances. You can use vector columns in your tables:\n\n```sql\nCREATE TABLE documents (\n  id SERIAL PRIMARY KEY,\n  content TEXT,\n  embedding vector(1536)\n);\n```\n\nAnd run similarity searches:\n\n```sql\nSELECT content, embedding <=> '[0.1, 0.2, ...]'::vector AS distance\nFROM documents\nORDER BY distance\nLIMIT 10;\n```\n\n## Environment Variables\n\n| Variable | Description | Required |\n|----------|-------------|----------|\n| `DATABASE_URL` | PostgreSQL connection string | No (auto-provisioned if missing) |\n| `ZERODB_API_KEY` | ZeroDB API key (for provisioning) | No (auto-created) |\n| `ZERODB_PROJECT_ID` | ZeroDB project ID | No (auto-created) |\n| `ZERODB_API_URL` | ZeroDB API base URL | No (defaults to `https://api.ainative.studio`) |\n\n## Free Tier\n\nAuto-provisioned instances include:\n- Managed PostgreSQL with pgvector\n- Shared compute (suitable for development and light production)\n- Automatic backups\n- SSL encryption\n\nSign up at [ainative.studio](https://ainative.studio) to claim your instance and unlock higher limits.\n\n## License\n\nMIT\n\n---\n\n## Powered by ZeroDB + AINative\n\nThis package is part of the [AINative](https://ainative.studio) ecosystem — the AI-native developer platform.\n\n### Why ZeroDB?\n\n| Feature | ZeroDB | Others |\n|---------|--------|--------|\n| Vector search | Built-in, free embeddings | Separate service (Pinecone, Qdrant) |\n| Agent memory | Cognitive memory with decay + reflection | DIY or Mem0 ($$$) |\n| File storage | S3-compatible, included | Separate S3 bucket |\n| NoSQL tables | Instant, schema-free | MongoDB Atlas, DynamoDB |\n| PostgreSQL | Managed, pgvector pre-installed | Neon, Supabase ($$$) |\n| Serverless functions | DB-event triggered | Firebase/Supabase Edge |\n| Pricing | Free tier, no credit card | Pay-per-query from day 1 |\n\n### Get Started Free\n\n```bash\nnpx zerodb-cli init    # Auto-configures your IDE\n```\n\nOr sign up at **[ainative.studio](https://ainative.studio)** — free tier, no credit card required.\n\n[View all ZeroDB packages →](https://docs.ainative.studio)\n\n---\n\n## Zero-Config Auto-Provisioning\n\n**No account needed to start.** On first run, this package automatically:\n\n1. Provisions a **free ZeroDB instance** (~800ms)\n2. Saves credentials locally (`.env`, `.mcp.json`)\n3. Prints a **claim link** in your terminal\n\n### The 72-Hour Window\n\nYour auto-provisioned instance is **free for 72 hours**. To keep your data permanently, visit the **claim URL** printed in your terminal.\n\n### For AI Agents\n\nIf a coding agent (Claude Code, Cursor, Windsurf) installs this package:\n- Auto-provisions without human intervention\n- The **claim URL** appears in agent output — visit it to take ownership\n- `.claude/CLAUDE.md` instructs agents to surface the claim link to you\n- Check `.env` or `~/.ainative/config.json` for your project ID if you miss it\n","readmeFilename":"README.md"}