Agents & MCP

Postgres your AI agent can manage.

Rivestack runs a hosted MCP server at mcp.rivestack.io/mcp. Add it to Claude Code, Cursor, or any MCP client that supports remote servers. It works with dedicated plans, Solo and up, not Hobby databases.

Read-only until you set read_only=false.

What it does

Read-only by default

SQL runs inside a READ ONLY transaction. Tools that write appear only when you set read_only=false. The homepage example uses ?read_only=true.

Vector tools built in

The agent can create pgvector tables, build HNSW or DiskANN indexes, run similarity search, and read index stats.

Provision with a preview

create_database returns the price first. Nothing runs until the agent confirms.

Same handlers as the dashboard

Migrations and index builds land in the cluster activity log, next to backups and restores.

Sign in with OAuth, or send an rsk_ API key as a Bearer token. OAuth works without a key pasted into the page.

18 tools

Thirteen tools are on by default. Five write tools appear only when read_only=false.

Read-only by default

ToolWhat it does
list_databasesList the databases on the account.
get_databaseRead one database.
get_connection_stringReturn the connection string for a database.
execute_sqlRun SQL. It runs inside a READ ONLY transaction by default.
explainShow how Postgres plans a statement.
list_tablesList the tables in a database.
describe_tableDescribe one table.
similarity_searchSearch rows by vector similarity.
index_statsRead statistics for an index.
list_backupsList backups for a database.
get_metricsRead database metrics.
get_logsRead database logs.
search_docsSearch the Rivestack docs.

Write tools, only when read_only=false

ToolWhat it does
create_databaseShows a price preview, then requires a confirmed call.
apply_migrationApply a migration.
create_vector_tableCreate a table for vectors.
create_indexCreate an index.
restore_from_backupPreview and confirm. The restore overwrites the database.

Setup

The snippets below are the Claude Code and Cursor setup already published on the homepage. Both point at the read-only URL.

// Cursor · .cursor/mcp.json
{
  "mcpServers": {
    "rivestack": {
      "url": "https://mcp.rivestack.io/mcp?read_only=true"
    }
  }
}
# Claude Code
claude mcp add --transport http rivestack \
  "https://mcp.rivestack.io/mcp?read_only=true"

Agents & MCP

Give your agent the database.

Solo is 7 days free for new customers, then $29/month. Card required.