Provides an auto-provisioned PostgreSQL database with pgvector support for AI agents to execute queries and manage schemas.
Also known as AINative-Studio/ainative-postgres-mcp
- Stars
- 0
- Tools
- 5
- Downloads, 30 days
- —
- Latest version
- 1.0.1
- Last commit
- Sep 25, 2026
- License
- MIT
What is ainative-postgres MCP?
ainative-postgres provides an auto-provisioned PostgreSQL database with pgvector support for AI agents to execute queries and manage schemas. It exposes 5 tools, such as query, list_tables, describe_table.
Summary generated from the project's README
About ainative-postgres MCP server
Providing an instant, managed PostgreSQL database for AI agents is what this server enables. It serves developers using Claude Desktop, Cursor, or Windsurf who need a database environment without the manual setup of connection strings or hosting. Unlike the standard postgres MCP server, this version automatically provisions a managed instance on its first run, meaning no DATABASE_URL is required to get started.
Users can interact with their data through specific tools like query, list_tables, describe_table, create_table, and insert. The server also automatically enables the pgvector extension, allowing agents to handle vector columns and similarity searches for AI applications. While it can connect to existing databases if a connection string is provided, its primary strength is the zero-config setup that saves credentials to local files like .env and .mcp.json.
Provisioned instances include shared compute, automatic backups, and SSL encryption. To maintain data beyond the initial 72-hour free window, users must follow a claim URL printed in the terminal to take ownership of the instance.
What you can do with it
- 1Instant database setup for agentsAn AI agent can set up a complete database environment without any manual configuration or connection strings.
- 2Performing vector similarity searchesDevelopers can implement AI memory or document retrieval by using the built-in pgvector support.
Written from the project's README. Every use case is checked against a quote from it.
How to install ainative-postgres MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall ainative-postgres MCP in Claude Code
$ claude mcp add ainative-postgres-mcp -- npx -y ainative-postgres-mcpInstall ainative-postgres MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"ainative-postgres-mcp": {
"command": "npx",
"args": [
"-y",
"ainative-postgres-mcp"
]
}
}
}Install ainative-postgres MCP in VS Code
.vscode/mcp.json
{
"servers": {
"ainative-postgres-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"ainative-postgres-mcp"
]
}
}
}Install ainative-postgres MCP in VS Code CLI
$ code --add-mcp '{"name":"ainative-postgres-mcp","type":"stdio","command":"npx","args":["-y","ainative-postgres-mcp"]}'Install ainative-postgres MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"ainative-postgres-mcp": {
"command": "npx",
"args": [
"-y",
"ainative-postgres-mcp"
]
}
}
}Install ainative-postgres MCP in Codex
$ codex mcp add ainative-postgres-mcp -- npx -y ainative-postgres-mcpInstall ainative-postgres MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.ainative-postgres-mcp] command = "npx" args = ["-y", "ainative-postgres-mcp"]
Install ainative-postgres MCP in Gemini CLI
$ gemini mcp add -s user ainative-postgres-mcp npx -- -y ainative-postgres-mcpInstall ainative-postgres MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"ainative-postgres-mcp": {
"command": "npx",
"args": [
"-y",
"ainative-postgres-mcp"
]
}
}
}ainative-postgres MCP tools 5
Detected from the READMEquerylist_tablesdescribe_tablecreate_tableinsert
| query | — | |
| list_tables | — | |
| describe_table | — | |
| create_table | — | |
| insert | — |
Configuration
DATABASE_URL
| Name | Description | |
|---|---|---|
| DATABASE_URL | — |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachableainative-studio/ainative-postgres-mcp is public and reachablegithub.com/ainative-studio/ainative-postgres-mcp ↗Pass
- Package names this repository as its sourceainative-postgres-mcp names ainative-studio/ainative-postgres-mcp as sourcenpmjs.com/package/ainative-postgres-mcp ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-09-25github.com/ainative-studio/ainative-postgres-mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from ainative-postgres-mcpPass
- No critical advisory in the package or its dependencies114 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model5 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubainative-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
npx ainative-postgres-mcp
That's it. On first run:
- A free managed PostgreSQL instance is provisioned
- pgvector extension is enabled automatically
- Connection details are saved to
~/.ainative/postgres-config.json,.env, and.mcp.json - 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:
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "ainative-postgres-mcp"]
}
}
}
With existing database
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "ainative-postgres-mcp"],
"env": {
"DATABASE_URL": "postgresql://user:pass@host:5432/mydb"
}
}
}
}
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "ainative-postgres-mcp"]
}
}
}
Windsurf
Add to ~/.windsurf/mcp.json:
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "ainative-postgres-mcp"]
}
}
}
Tools
| Tool | Description |
|---|---|
query |
Execute read-only SQL queries (runs in READ ONLY transaction) |
list_tables |
List all tables with schema, name, and type |
describe_table |
Get full table schema: columns, types, constraints, indexes |
create_table |
Create a new table with SQL DDL |
insert |
Insert rows into a table (returns inserted rows) |
Comparison with official server-postgres
| Feature | @modelcontextprotocol/server-postgres |
ainative-postgres-mcp |
|---|---|---|
| Read queries | Yes | Yes |
| Write queries | No | Yes (create_table, insert) |
| Schema inspection | Via resources | Via describe_table tool |
| Table listing | No | Yes (list_tables) |
| Auto-provisioning | No | Yes |
| pgvector | Manual setup | Auto-enabled |
| Zero config | No (requires DATABASE_URL) | Yes |
| Free tier | N/A | Yes |
How Auto-Provisioning Works
Start
|
v
DATABASE_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
v
POST /api/v1/public/instant-db (get API key)
|
v
POST /api/v1/zerodb/postgres/provision (get Postgres)
|
v
Save to ~/.ainative/postgres-config.json + .env + .mcp.json
|
v
Connect and enable pgvector
pgvector Support
pgvector is automatically enabled on provisioned instances. You can use vector columns in your tables:
CREATE TABLE documents (
id SERIAL PRIMARY KEY,
content TEXT,
embedding vector(1536)
);
And run similarity searches:
SELECT content, embedding <=> '[0.1, 0.2, ...]'::vector AS distance
FROM documents
ORDER BY distance
LIMIT 10;
Environment Variables
| Variable | Description | Required |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | No (auto-provisioned if missing) |
ZERODB_API_KEY |
ZeroDB API key (for provisioning) | No (auto-created) |
ZERODB_PROJECT_ID |
ZeroDB project ID | No (auto-created) |
ZERODB_API_URL |
ZeroDB API base URL | No (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?
| Feature | ZeroDB | Others |
|---|---|---|
| Vector search | Built-in, free embeddings | Separate service (Pinecone, Qdrant) |
| Agent memory | Cognitive memory with decay + reflection | DIY or Mem0 ($$$) |
| File storage | S3-compatible, included | Separate S3 bucket |
| NoSQL tables | Instant, schema-free | MongoDB Atlas, DynamoDB |
| PostgreSQL | Managed, pgvector pre-installed | Neon, Supabase ($$$) |
| Serverless functions | DB-event triggered | Firebase/Supabase Edge |
| Pricing | Free tier, no credit card | Pay-per-query from day 1 |
Get Started Free
npx zerodb-cli init # Auto-configures your IDE
Or sign up at ainative.studio — free tier, no credit card required.
Zero-Config Auto-Provisioning
No account needed to start. On first run, this package automatically:
- Provisions a free ZeroDB instance (~800ms)
- Saves credentials locally (
.env,.mcp.json) - 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.mdinstructs agents to surface the claim link to you- Check
.envor~/.ainative/config.jsonfor your project ID if you miss it
ainative-postgres MCP questions
How do I add ainative-postgres MCP to Claude Code?
Run claude mcp add ainative-postgres-mcp -- npx -y ainative-postgres-mcp in your terminal. Add --scope user to make it available in every project.
How do I add ainative-postgres MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does ainative-postgres MCP provide?
It exposes 5 tools, including query, list_tables, describe_table, create_table, insert.
Do I need to provide my own database connection string?
No, the server can auto-provision a managed PostgreSQL instance with pgvector on its first run if no DATABASE_URL is provided.
Does it support vector search?
Yes, pgvector is automatically enabled on provisioned instances, allowing for vector columns and similarity searches.