Ainative Postgres Mcp

io.github.AINative-StudioPublished by GitHub account AINative-Studiov1.0.1Updated Oct 24, 2026

Zero-config Postgres MCP with auto-provisioning — drop-in for server-postgres.

VerifiedSTDIODesktop onlyDatabasesDeveloper Tools

Overview

AI-generated overview

A local PostgreSQL MCP server that auto-provisions a free managed Postgres instance with pgvector, letting an assistant query, inspect and modify tables.

What you can do
Run read-only SQL queries in a read-only transaction and run similarity searches on vector columns. List tables and inspect full table schemas, including columns, types, constraints and indexes. Create new tables with SQL DDL and insert rows, returning the inserted rows. On first run, provision a managed PostgreSQL instance with pgvector enabled and save connection details locally.
When to use it
Useful when an assistant needs a working Postgres database for development, prototyping or vector storage without supplying a connection string, or when you want a drop-in replacement for the official server-postgres with schema inspection and write tools.
Requirements
Runs locally via npx, so Node.js is needed. No account or key is required to start: without DATABASE_URL it provisions a managed instance through the ZeroDB API and writes credentials to a local config file, .env and .mcp.json. Optional variables: DATABASE_URL, ZERODB_API_KEY, ZERODB_PROJECT_ID, ZERODB_API_URL. Network access is required for provisioning.
Before you install
Auto-provisioning sends requests to a third-party service and stores the resulting credentials in local files. The free instance lasts 72 hours unless claimed via a printed claim URL, and claiming requires signing up. The server can create tables and insert rows, so it writes to the database. Review the saved credentials and the claim link before relying on the instance.

Installation

In SourceWeft

  1. Open Ainative Postgres Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

ainative-postgres-mcp

Zero-config PostgreSQL MCP server with auto-provisioning. Drop-in replacement for @modelcontextprotocol/server-postgres — no DATABASE_URL needed.

The 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.

Quick Start

bash
npx ainative-postgres-mcp

That's it. On first run:

  1. A free managed PostgreSQL instance is provisioned
  2. pgvector extension is enabled automatically
  3. Connection details are saved to ~/.ainative/postgres-config.json, .env, and .mcp.json
  4. A claim URL is printed so you can take ownership of the database

MCP Configuration

Claude Code / Claude Desktop

Add to your claude_desktop_config.json or .mcp.json:

json
{  "mcpServers": {    "postgres": {      "command": "npx",      "args": ["-y", "ainative-postgres-mcp"]    }  }}

With existing database

json
{  "mcpServers": {    "postgres": {      "command": "npx",      "args": ["-y", "ainative-postgres-mcp"],      "env": {        "DATABASE_URL": "postgresql://user:pass@host:5432/mydb"      }    }  }}

Cursor

Add to .cursor/mcp.json:

json
{  "mcpServers": {    "postgres": {      "command": "npx",      "args": ["-y", "ainative-postgres-mcp"]    }  }}

Windsurf

Add to ~/.windsurf/mcp.json:

json
{  "mcpServers": {    "postgres": {      "command": "npx",      "args": ["-y", "ainative-postgres-mcp"]    }  }}

Tools

ToolDescription
queryExecute read-only SQL queries (runs in READ ONLY transaction)
list_tablesList all tables with schema, name, and type
describe_tableGet full table schema: columns, types, constraints, indexes
create_tableCreate a new table with SQL DDL
insertInsert rows into a table (returns inserted rows)

Comparison with official server-postgres

Feature@modelcontextprotocol/server-postgresainative-postgres-mcp
Read queriesYesYes
Write queriesNoYes (create_table, insert)
Schema inspectionVia resourcesVia describe_table tool
Table listingNoYes (list_tables)
Auto-provisioningNoYes
pgvectorManual setupAuto-enabled
Zero configNo (requires DATABASE_URL)Yes
Free tierN/AYes

How Auto-Provisioning Works

Start  |  vDATABASE_URL set? ----yes----> Connect directly  |  no  v~/.ainative/postgres-config.json exists? ----yes----> Load and connect  |  no  v.mcp.json has DATABASE_URL? ----yes----> Load and connect  |  no  vPOST /api/v1/public/instant-db   (get API key)  |  vPOST /api/v1/zerodb/postgres/provision   (get Postgres)  |  vSave to ~/.ainative/postgres-config.json + .env + .mcp.json  |  vConnect and enable pgvector

pgvector Support

pgvector is automatically enabled on provisioned instances. You can use vector columns in your tables:

sql
CREATE TABLE documents (  id SERIAL PRIMARY KEY,  content TEXT,  embedding vector(1536));

And run similarity searches:

sql
SELECT content, embedding <=> '[0.1, 0.2, ...]'::vector AS distanceFROM documentsORDER BY distanceLIMIT 10;

Environment Variables

VariableDescriptionRequired
DATABASE_URLPostgreSQL connection stringNo (auto-provisioned if missing)
ZERODB_API_KEYZeroDB API key (for provisioning)No (auto-created)
ZERODB_PROJECT_IDZeroDB project IDNo (auto-created)
ZERODB_API_URLZeroDB API base URLNo (defaults to https://api.ainative.studio)

Free Tier

Auto-provisioned instances include:

  • Managed PostgreSQL with pgvector
  • Shared compute (suitable for development and light production)
  • Automatic backups
  • SSL encryption

Sign up at ainative.studio to claim your instance and unlock higher limits.

License

MIT


Powered by ZeroDB + AINative

This package is part of the AINative ecosystem — the AI-native developer platform.

Why ZeroDB?

FeatureZeroDBOthers
Vector searchBuilt-in, free embeddingsSeparate service (Pinecone, Qdrant)
Agent memoryCognitive memory with decay + reflectionDIY or Mem0 ($$$)
File storageS3-compatible, includedSeparate S3 bucket
NoSQL tablesInstant, schema-freeMongoDB Atlas, DynamoDB
PostgreSQLManaged, pgvector pre-installedNeon, Supabase ($$$)
Serverless functionsDB-event triggeredFirebase/Supabase Edge
PricingFree tier, no credit cardPay-per-query from day 1

Get Started Free

bash
npx zerodb-cli init    # Auto-configures your IDE

Or sign up at ainative.studio — free tier, no credit card required.

View all ZeroDB packages →


Zero-Config Auto-Provisioning

No account needed to start. On first run, this package automatically:

  1. Provisions a free ZeroDB instance (~800ms)
  2. Saves credentials locally (.env, .mcp.json)
  3. Prints a claim link in your terminal

The 72-Hour Window

Your auto-provisioned instance is free for 72 hours. To keep your data permanently, visit the claim URL printed in your terminal.

For AI Agents

If a coding agent (Claude Code, Cursor, Windsurf) installs this package:

  • Auto-provisions without human intervention
  • The claim URL appears in agent output — visit it to take ownership
  • .claude/CLAUDE.md instructs agents to surface the claim link to you
  • Check .env or ~/.ainative/config.json for your project ID if you miss it

Source: README.md at commit 395f19a

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts