
Ainative Postgres Mcp
io.github.AINative-Studio由 GitHub 账号 AINative-Studio 发布v1.0.1更新于 Oct 24, 2026
Zero-config Postgres MCP with auto-provisioning — drop-in for server-postgres.
概览
本地 PostgreSQL MCP 服务器,自动开通带 pgvector 的免费托管 Postgres 实例,让助手查询、查看和修改数据表。
- 可以做什么
- 在只读事务中执行只读 SQL 查询,并对向量列进行相似度搜索。列出所有数据表,并查看完整表结构,包括列、类型、约束和索引。用 SQL DDL 创建新表并插入数据行,返回插入的行。首次运行时自动开通启用 pgvector 的托管 PostgreSQL 实例,并将连接信息保存到本地。
- 适用场景
- 适合助手需要一个可用的 Postgres 数据库用于开发、原型验证或向量存储,但不想提供连接字符串的场景;也适合作为官方 server-postgres 的替代品,获得表结构查看和写入工具。
- 运行要求
- 通过 npx 在本地运行,需要 Node.js。启动无需账号或密钥:未设置 DATABASE_URL 时会通过 ZeroDB API 开通托管实例,并把凭据写入本地配置文件、.env 和 .mcp.json。可选变量:DATABASE_URL、ZERODB_API_KEY、ZERODB_PROJECT_ID、ZERODB_API_URL。开通实例需要网络访问。
安装
在 SourceWeft 中
- 打开 控制台中的 Ainative Postgres Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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
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:
With existing database
Cursor
Add to .cursor/mcp.json:
Windsurf
Add to ~/.windsurf/mcp.json:
Tools
Comparison with official server-postgres
How Auto-Provisioning Works
pgvector Support
pgvector is automatically enabled on provisioned instances. You can use vector columns in your tables:
And run similarity searches:
Environment Variables
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?
Get Started Free
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
来源:README.md,提交 395f19a
工具
0版本历史
1- v1.0.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
