MCP Server

PostgreSQL MCP Server:

Your AI Coding Agent, Now Connected.

The SelfHost PostgreSQL MCP server gives Claude, Cursor, and VS Code direct access to your database infrastructure. Provision, scale, monitor, and backup - without leaving your editor. Manage PostgreSQL from Claude with 76 production-ready tools.

$ npx @selfhost.dev/mcp-server
Works with
Claude
Cursor
Windsurf
VS Code
+ any MCP client
claude - selfhost workspace

What we believe

The SelfHost
PostgreSQL MCP Server.

MCP, explained simply

One protocol. Total control.

MCP is the standard that lets your AI tools work with the system through a controlled interface, enabling actions, not direct access.

AI database management tools

Operate through AI

SelfHost exposes your database infrastructure through MCP, so AI can provision, scale, monitor, and manage your databases. No other PostgreSQL MCP server offers this depth - see how competitors compare.

How it connects

AI Client Claude · Cursor · Windsurf
MCP protocol
SELFHOST MCP SERVER @selfhost.dev/mcp-server
list_instances get_metrics
connection...
Your hosted DB AWS · Postgres
BYOC safe encrypted

76 MCP tools PostgreSQL, 8 modules

Everything your
infrastructure needs.

Create, scale, reboot, fork, and delete database instances. Platform-managed or BYOC.

mcp · instances

$ Create a Postgres 18 in us-east-1 with 4GB RAM

⚡ calling create_instance ...

✓ Instance created: prod-pg-18

  us-east-1 · t4g.medium · 4 GB · PostgreSQL 18

  Status: launching

Quickstart

Three steps,
that's it.

mcp · instances

$ npm install -g @selfhost.dev/mcp-server

✓ Installed @selfhost.dev/[email protected]

# Add to your MCP config:

# "selfhost": { "command": "npx", "args": ["@selfhost.dev/mcp-server"] }

$ npx @selfhost.dev/mcp-server

Opening browser for authentication...

✓ Signed in as [email protected]

✓ Organization: Swatantra Cloud Systems

✓ 76 tools registered. Ready.

Security

Your data stays
where you put it.

The MCP server database management runs on your machine. It talks to the SelfHost API to manage infrastructure - it never connects to your databases directly. Credentials are stored locally with owner-only permissions.

01

Runs locally on your machine

Service process stays in your terminal, not our cloud

02

No database connection

Manages infrastructure via API - never touches your data

03

Destructive ops require confirmation

delete, stop, reboot - Claude will always ask before acting

04

Credentials stored with chmod 600

~/.selfhost/credentials.json - owner-only access

Frequently Asked Questions

What is the SelfHost PostgreSQL MCP server?
The SelfHost PostgreSQL MCP server is an AI-powered toolkit with 76 tools that lets you manage your entire database infrastructure from Claude, Cursor, or VS Code using natural language. It covers provisioning, backups, monitoring, alerts, networking, PG configuration, and team management - no other PostgreSQL MCP server offers this scope.
How many MCP tools does SelfHost provide for PostgreSQL?
SelfHost provides 76 MCP tools for PostgreSQL across 8 modules: Instances (14 tools), Backups (10), Alerts (13), Networking (8), PG Config (3), Teams (11), and additional monitoring and scaling tools. Free tier includes 11 read-only tools, Starter includes 38, and Pro/Enterprise includes all 76. See tier details.
Which AI tools work with the SelfHost PostgreSQL MCP server?
The SelfHost PostgreSQL MCP server works with Claude (Desktop and Code), Cursor, Windsurf, VS Code, and any MCP-compatible client. Install with npx @selfhost.dev/mcp-server, authenticate via browser, and all 76 tools become available in your AI editor immediately.
Can I manage PostgreSQL from Claude using SelfHost MCP?
Yes - you can manage PostgreSQL from Claude using SelfHost's MCP server. Ask Claude to create databases, run backups, configure alerts, tune PostgreSQL settings, check metrics, and manage team access - all in plain English. Claude executes these through the MCP protocol with full confirmation on destructive operations.
How does the SelfHost MCP server compare to other PostgreSQL MCP servers?
Most PostgreSQL MCP servers (Anthropic's reference server, pgEdge, Crystal DBA) focus on queries and schema access - typically 5-15 tools. SelfHost provides 76 tools covering full infrastructure lifecycle: provisioning, backups, PITR, monitoring, alerts, networking, configuration, and team management. See full comparisons.
Is the SelfHost MCP server safe for production databases?
Yes - the MCP server runs locally on your machine and communicates with the SelfHost API to manage infrastructure. It never connects to your databases directly. Destructive operations (delete, stop, reboot) require explicit confirmation. Credentials are stored locally with chmod 600 owner-only permissions.
How do I install the SelfHost PostgreSQL MCP server?
Run npx @selfhost.dev/mcp-server to install. Add it to your MCP config file, then run the server - it opens your browser for authentication. Once signed in, all 76 tools register automatically. The entire setup takes under 2 minutes. Available on npm at @selfhost.dev/mcp-server.
What can I do with PostgreSQL MCP tools for backups?
SelfHost's 10 backup MCP tools let you create on-demand snapshots, set up automated DLM backup policies with custom retention, configure S3 backup targets, and perform point-in-time restores - all via natural language. Ask your AI: "Set up daily backups with 7-day retention" and it handles the rest.
What PostgreSQL AI tools does SelfHost offer for monitoring?
SelfHost's alert module includes 13 PostgreSQL AI tools for monitoring CPU, memory, disk usage, replication lag, cache hit ratio, and custom PostgreSQL metrics. Set up multi-channel notifications via email, Slack, or webhooks - all through natural language commands in Claude, Cursor, or VS Code.
Is the SelfHost MCP server free?
The MCP server is included on all SelfHost plans at no extra cost. Free tier includes 11 read-only tools for viewing instances, metrics, and status. Starter ($19/mo) unlocks 38 tools including backups and alerts. Pro ($79/mo) and Enterprise ($249/mo) include all 76 tools with full read-write access. See pricing.
Can I use the SelfHost MCP server with BYOC (Bring Your Own Cloud)?
Yes - all 76 MCP tools work with both Managed and BYOC deployments. On BYOC, the MCP server manages databases running in your own AWS account through the SelfHost API. This means you get AI native database management while maintaining full infrastructure ownership. BYOC is available on Pro ($79/mo).
What MCP modules does the SelfHost PostgreSQL server include?
The SelfHost PostgreSQL MCP server includes 8 modules: Instances (14 tools - create, scale, fork, delete), Backups (10 - snapshots, DLM, PITR), Alerts (13 - metrics, thresholds, notifications), Networking (8 - VPC, subnets, security groups), PG Config (3 - parameter tuning), Teams (11 - orgs, roles, audit logs), plus monitoring and scaling tools.

Try the SelfHost
PostgreSQL MCP Server today.

Available on all plans
Free tier includes 11 read-only tools