The SelfHost MCP server lets Claude, Cursor, and any MCP-compatible AI tool talk directly to your managed databases, query, inspect, migrate, and monitor without leaving your IDE.
npx @selfhost.dev/mcp-server
The Protocol
An open standard that lets AI assistants connect to external tools, one protocol, any client.
MCP in plain English
One protocol, any AI client
Instead of writing custom integrations per tool, MCP gives you one server definition that works with every client that speaks the protocol.
SelfHost MCP Server
Your databases, as AI-native tools
@selfhost.dev/mcp-server exposes your SelfHost databases as structured tools — query, inspect, migrate, and monitor, all from the IDE.
How it connects
Feature tiles
Six structured tools, exposed natively to your AI client.
Live database activity
Your agent sees this in real time. Ask anything about it.
142
queries/min
18ms
avg latency
99.9%
cache hit
Query databases
Run SQL and fetch results in natural language, without leaving your editor.
Inspect schema
Tables, columns, indexes, and relationships fetched on demand as live context.
Run migrations
Generate & apply schema migrations via a single prompt, you approve before anything runs.
Monitor metrics
Ask about IOPS, connections, and latency the same way you'd ask a colleague.
Debug slow queries
Surface explain plans and index suggestions from a single natural language prompt.
Manage instances
Scale, restart, and configure BYOC or platform-hosted databases through natural language.
Supports PostgreSQL for now, more coming soon.
Workflow impact
Every database question used to mean leaving your editor. Not anymore.
0
tab switches per query
< 2s
to first schema result
100%
stays in your IDE
Who it's for
You don't have a DBA and you don't need one. The MCP server gives you instant database context while you code, no tab-switching, no mental overhead, just answers.
Quickstart
An npm package and a config block. That's it.
Step 1 — Install the package
Install globally so it's available to any MCP client on your machine.
Terminal
npm install -g @selfhost.dev/mcp-server
Step 2 — Get your API key
Generate a key from your SelfHost dashboard — read-only or read-write.
Dashboard → Settings → API Keys → New key
SELFHOST_API_KEY=sh_live_xxxxxxxxxxxx
Step 3 — Add to claude_desktop_config.json
Add the server block to your AI client's MCP config and paste your API key.
{ "mcpServers": { "selfhost": { "command": "npx", "args": ["@selfhost.dev/mcp-server"], "env": { "SELFHOST_API_KEY": "your_key_here" } } } }
Need the full reference? View on npm →
A Teaser
Your agent queries your live database and returns structured results.
Try asking your agent:
Chat
MCP tools
Trust & safety
Built for teams that care about where their data lives, especially on BYOC.
Runs locally on your machine
The server process runs on your machine. Your queries and results never pass through our servers.
Scoped API key permissions
Read-only or read-write keys per environment. Revoke instantly. You control what the agent can access.
BYOC - data stays in your cloud
Your databases live in your own AWS, GCP, or Azure account. Nothing is routed through third-party infrastructure.
Data never leaves your boundary
By offering concise and informative responses, this section helps users find solutions without the need to contact customer support, saving time
Yes, both BYOC and SelfHost-Managed. For BYOC, the server connects directly to your database in your own cloud account. Traffic never leaves your infrastructure.
Claude Desktop, Cursor, Windsurf, and VS Code Copilot out of the box. Any future MCP-compatible client will work too, no changes needed.
The MCP server is currently only accessible as invite-only — ask an existing user or join the waitlist.
Currently PostgreSQL database engine is supported. More providers are coming soon.
No. The server runs locally, queries travel directly between your machine and your database, bypassing SelfHost's servers entirely.
Yes, it is available on all plans. Subscribe today and you just need a SelfHost.dev account to generate an API key.
Deploy self-hosted PostgreSQL and scalable cloud databases with automation, high availability, and full infrastructure control.