Model Context Protocol

Ask your own AI assistant about your databases

MyDBA includes an MCP server. An assistant you already use, such as Claude Code, Cursor or Claude desktop, can read the monitoring data MyDBA has collected and answer questions about your PostgreSQL databases.

It is read-only. MyDBA never runs anything on your databases, and it runs no model of its own: the assistant you choose does the reasoning, over evidence MyDBA has already gathered.

What it is

MCP, the Model Context Protocol, is a standard way for an AI assistant to ask another program for information. MyDBA's MCP server offers a set of read-only briefings on the things a DBA asks about: health, queries, plans, indexes, incidents, capacity and settings. Each answer comes with notes on how to read it, so your assistant reasons from evidence rather than guessing.

What you can ask

What's wrong right now

  • “Use MyDBA: what is wrong with my database right now?”
  • “Who is blocking whom at the moment, and for how long?”

Slow queries and plans

  • “Which queries used the most time over the last 24 hours, and has any of them got worse?”
  • “Show me the captured EXPLAIN plans for this query and tell me what stands out.”

Indexes

  • “Which indexes does MyDBA suggest creating, dropping or merging, and which of those are safe to run?”

Incidents

  • “Explain the incident between 02:00 and 03:00 using the evidence MyDBA collected.”

Health and capacity

  • “What are the worst health findings on this cluster, and what should I do first?”
  • “How long until this disk fills up at the current rate of growth?”

Extensions such as pgvector

  • “Is my vector search set up well? Show me the indexes, settings and slow vector queries.”

MyDBA also ships ready-made prompts for common jobs: triaging a slow database, explaining an incident, tuning a query, reviewing a schema change before you make it, capacity, configuration, right-sizing and pgvector reviews.

How it stays safe

Read-only, over data MyDBA already holds

It reads the monitoring data MyDBA has collected. It never runs anything on your databases and it cannot change anything. MyDBA runs no model of its own here: your assistant does the reasoning.

Two token scopes

A restricted_read token withholds raw query samples and the literal values in query plans. A read token includes them. Choose the narrower one unless your assistant needs the detail.

Per-user tokens you can revoke

Each token acts as the person who created it, with the same access they have in the dashboard. Tokens expire, and you can revoke one at any time from Settings.

An administrator can switch it off

An administrator can stop MCP access for the whole organisation with one setting. Tokens stop working at once.

Set up in three steps

  1. 1

    Create a token

    Open Settings, then AI assistant access (MCP). Name the token, choose a scope and how long it lasts, then create it. The token is shown once, so copy it then.

  2. 2

    Paste the snippet into your assistant

    The same card gives you ready-made snippets for Claude Code, Cursor and Claude desktop. For Claude Code it looks like the command below, with your own address and token.

    claude mcp add --transport http mydba https://mydba.example.com/mcp \
      --header "Authorization: Bearer dbt_pat_…"
  3. 3

    Ask a question

    For example: "Use MyDBA: what is wrong with my database right now?"

Hosted or self-hosted

The MCP server is part of the hosted service, where it is available on paid plans, and part of self-hosted MyDBA, including free mode. See self-hosted MyDBA for running the whole product inside your own network.

Related capabilities

See it in action

Start free with one primary or standalone PostgreSQL instance and all its databases. Monitoring, alerts, query insights, index advice, team access and every non-AI feature included. No replicas. No credit card required. New Free connections get seven days of full collection, then reduced sampling. Free and Pro include 30 days of monitoring history.