MCP Server · npm package

Your AI coding agent,
now connected to your database.

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
Works with
Claude
Cursor
Windsurf
VS Code
+ any MCP client
claude — your-project
// You type a natural language prompt
> Show me which tables in production have grown most in the last 7 days.
Calling selfhost.list_tables via MCP...
table rows size 7d growth
events_log4.8M1.2 GB+18.4%
sessions1.2M340 MB+9.1%
orders210K64 MB+3.2%
events_log is growing fastest. Want me to check if it has a retention policy or suggest archiving?

The Protocol

What is MCP, and why does it matter?

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

AI Client Claude · Cursor · Windsurf MCP protocol SELFHOST MCP SERVER @selfhost.dev/mcp-server list_tables run_query direct conn. Your DB AWS · GCP · Azure BYOC safe encrypted

Feature tiles

Everything your AI agent
needs to work with data.

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

Stop switching tabs.
Stay in the flow.

Every database question used to mean leaving your editor. Not anymore.

Without SelfHost MCP
IDE
DB Console
AI Chat
Dashboard
Switch tabs to run a query
Copy-paste schema manually
Check metrics in a separate dashboard
Write migration scripts from scratch
With SelfHost MCP
IDE
> Show me all slow queries
MCP: list_slow_queries called
Ask your agent — results inline
Schema auto-loaded as context
Metrics surfaced without leaving the IDE
Migrations generated and previewed for approval

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

Connected in three steps.

An npm package and a config block. That's it.

1
Install
2
API key
3
Configure client

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

Need the full reference? View on npm →

A Teaser

Ask anything.
Get real answers.

Your agent queries your live database and returns structured results.

Try asking your agent:

Claude — chat with your database

Chat

MCP tools

Trust & safety

Your data stays where you put it.

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

YOUR MACHINE IDE / Claude prompt → response MCP MCP Server @selfhost.dev runs locally direct Your Database AWS / GCP / Azure ✓ data stays inside your boundary SelfHost cloud infra no data flows here
FAQ'S

Commonly asked questions

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.

Get started

Run Production Databases
On Your Terms

Deploy self-hosted PostgreSQL and scalable cloud databases with automation, high availability, and full infrastructure control.

  • No credit card required
  • Join waitlist today