neondb
Manage Neon serverless Postgres databases. Create projects, branches, databases, and execute queries. Perfect for agent workflows needing persistent storage with branching (like git for databases), scale-to-zero, and instant provisioning.
Install
mkdir -p .claude/skills/neondb && curl -L -o skill.zip "https://mcp.directory/api/skills/download/7892" && unzip -o skill.zip -d .claude/skills/neondb && rm skill.zipInstalls to .claude/skills/neondb
About this skill
NeonDB
Neon is serverless Postgres — scales to zero, branches like git, instant provisioning. Perfect for AI agents needing databases without ops overhead.
Why Neon for Agents?
- Instant databases — Create in seconds, no server setup
- Branching — Fork your database like git (test without affecting prod)
- Scale-to-zero — Pay nothing when idle
- Connection pooling — Built-in, no PgBouncer needed
- Generous free tier — 0.5 GB storage, 190 compute hours/month
Quick Start
1. Install CLI
# Homebrew (recommended)
brew install neonctl
# Or npm
npm i -g neonctl
2. Authenticate
# Interactive (opens browser)
neonctl auth
# Or with API key (get from console.neon.tech)
export NEON_API_KEY=your_api_key_here
3. Create Your First Project
neonctl projects create --name "my-agent-db"
Core Commands
Projects (top-level container)
# List all projects
neonctl projects list
# Create project
neonctl projects create --name "project-name"
# Delete project
neonctl projects delete <project-id>
# Get project details
neonctl projects get <project-id>
Branches (database snapshots)
# List branches
neonctl branches list --project-id <project-id>
# Create branch (fork from main)
neonctl branches create --project-id <project-id> --name "dev-branch"
# Create branch from specific point
neonctl branches create --project-id <project-id> --name "restore-test" --parent main --timestamp "2024-01-15T10:00:00Z"
# Reset branch to parent
neonctl branches reset <branch-id> --project-id <project-id> --parent
# Delete branch
neonctl branches delete <branch-id> --project-id <project-id>
# Compare schemas
neonctl branches schema-diff --project-id <project-id> --base-branch main --compare-branch dev
Databases
# List databases
neonctl databases list --project-id <project-id> --branch <branch-name>
# Create database
neonctl databases create --project-id <project-id> --branch <branch-name> --name "mydb"
# Delete database
neonctl databases delete <db-name> --project-id <project-id> --branch <branch-name>
Connection Strings
# Get connection string (default branch)
neonctl connection-string --project-id <project-id>
# Get connection string for specific branch
neonctl connection-string <branch-name> --project-id <project-id>
# Pooled connection (recommended for serverless)
neonctl connection-string --project-id <project-id> --pooled
# Extended format (with all details)
neonctl connection-string --project-id <project-id> --extended
Roles (database users)
# List roles
neonctl roles list --project-id <project-id> --branch <branch-name>
# Create role
neonctl roles create --project-id <project-id> --branch <branch-name> --name "app_user"
Executing Queries
Using psql
# Get connection string and connect
neonctl connection-string --project-id <project-id> | xargs psql
# Or direct
psql "$(neonctl connection-string --project-id <project-id>)"
Using the connection string in code
# Get the string
CONNECTION_STRING=$(neonctl connection-string --project-id <project-id> --pooled)
# Use in any Postgres client
psql "$CONNECTION_STRING" -c "SELECT * FROM users LIMIT 5;"
Context (Avoid Repeating Project ID)
Set context to avoid passing --project-id every time:
# Set project context
neonctl set-context --project-id <project-id>
# Now commands use that project automatically
neonctl branches list
neonctl databases list
neonctl connection-string
Agent Workflow Examples
Create org database with branches
# Create project for org
neonctl projects create --name "website-org-db" -o json
# Create production branch (main is created by default)
# Create dev branch for testing
neonctl branches create --name "dev" --project-id <id>
# Get connection strings
neonctl connection-string main --project-id <id> --pooled # for prod
neonctl connection-string dev --project-id <id> --pooled # for dev
Create leads table
# Connect and create schema
psql "$(neonctl cs --project-id <id>)" <<EOF
CREATE TABLE leads (
id SERIAL PRIMARY KEY,
business_name VARCHAR(255) NOT NULL,
category VARCHAR(100),
location VARCHAR(255),
phone VARCHAR(50),
email VARCHAR(255),
website VARCHAR(255),
status VARCHAR(50) DEFAULT 'identified',
priority VARCHAR(20) DEFAULT 'medium',
notes TEXT,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
CREATE INDEX idx_leads_status ON leads(status);
CREATE INDEX idx_leads_category ON leads(category);
EOF
Branch for experiments
# Create a branch to test schema changes
neonctl branches create --name "schema-experiment" --project-id <id>
# Test your changes on the branch
psql "$(neonctl cs schema-experiment --project-id <id>)" -c "ALTER TABLE leads ADD COLUMN score INT;"
# If it works, apply to main. If not, just delete the branch
neonctl branches delete schema-experiment --project-id <id>
Output Formats
# JSON (for parsing)
neonctl projects list -o json
# YAML
neonctl projects list -o yaml
# Table (default, human-readable)
neonctl projects list -o table
Environment Variables
# API key (required if not using `neonctl auth`)
export NEON_API_KEY=your_key
# Default project (alternative to set-context)
export NEON_PROJECT_ID=your_project_id
Common Patterns
Check if neonctl is configured
neonctl me -o json 2>/dev/null && echo "Authenticated" || echo "Need to run: neonctl auth"
Quick database query
# One-liner query
psql "$(neonctl cs)" -c "SELECT COUNT(*) FROM leads WHERE status='contacted';"
Export to CSV
psql "$(neonctl cs)" -c "COPY (SELECT * FROM leads) TO STDOUT WITH CSV HEADER" > leads.csv
Import from CSV
psql "$(neonctl cs)" -c "\COPY leads(business_name,category,location) FROM 'import.csv' WITH CSV HEADER"
Troubleshooting
"Connection refused"
- Check if branch compute is active (scale-to-zero may have paused it)
- Use
--pooledconnection string for serverless workloads
"Permission denied"
- Verify API key:
neonctl me - Re-authenticate:
neonctl auth
Slow first connection
- Normal for scale-to-zero. First connection wakes the compute (~1-2 seconds)
- Use connection pooling to maintain warm connections
Links
- Neon Console — Web dashboard
- API Docs — REST API reference
- CLI Reference — Full CLI docs
- GitHub — CLI source code
More by openclaw
View all skills by openclaw →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversEasily manage serverless Postgres databases on Neon, with seamless AWS integration for scalable, efficient database solu
Easily manage Neon's serverless Postgres databases on AWS. Streamline your cloud database deployment with reliable, scal
Boost Postgres performance with Postgres MCP Pro—AI-driven index tuning, health checks, and safe, intelligent SQL optimi
ToolFront is a knowledge database software and db management system offering unified access to databases with advanced t
Legion Database: natural-language SQL for multi-database querying. Explore PostgreSQL, MySQL, SQL Server & BigQuery with
Connect and manage your PostgreSQL database with support for SQL queries, table management, and schema inspection, inclu
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.