PluginBench
MCP Server
Active
MIT

Rebase MCP Server

io.github.rebasepro/rebase

Open-source Backend-as-a-Service for PostgreSQL with schema-driven admin panel and built-in MCP server for AI development.

What is the Rebase MCP server?

The Rebase MCP server provides AI assistants with tools to manage a Rebase backend project, including database schema queries, document CRUD operations, user and role management, and data model introspection. Rebase is an open-source, self-hosted backend-as-a-service built on PostgreSQL that combines REST APIs, authentication, storage, realtime, and backups with an optional admin panel and developer studio.

Rebase MCP server enables AI-assisted development of Rebase backend projects. It exposes tools for querying and managing your PostgreSQL database schema, creating and managing documents and users, and introspecting your data model. This allows Claude, Cursor, and other AI agents to help you build, modify, and maintain your Rebase backend with full type safety and schema awareness.

How to install Rebase

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • REBASE_PROJECT_DIR

    Project root — the directory holding rebase.json. Defaults to the working directory.

  • REBASE_BASE_URL

    Backend URL, used when no local dev server is discovered.

  • REBASE_API_TOKEN
    secret

    API token for the target project. Not needed against a local dev server.

  • REBASE_MCP_ALLOW_REMOTE_WRITES

    Allow destructive tools to run against a non-local target. Off by default.

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "rebase": {
      "command": "npx",
      "args": [
        "-y",
        "@rebasepro/mcp"
      ],
      "env": {
        "REBASE_PROJECT_DIR": "<YOUR_REBASE_PROJECT_DIR>",
        "REBASE_BASE_URL": "<YOUR_REBASE_BASE_URL>",
        "REBASE_API_TOKEN": "<YOUR_REBASE_API_TOKEN>",
        "REBASE_MCP_ALLOW_REMOTE_WRITES": "<YOUR_REBASE_MCP_ALLOW_REMOTE_WRITES>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • Schema Query — Query and introspect your database schema, including tables, columns, relations, and constraints
  • Document CRUD — Create, read, update, and delete documents in your collections
  • User Management — Manage users and roles with role-based access control
  • Data Model Introspection — Inspect your data model structure and relationships

Use cases

  • Generate TypeScript SDKs from your collection definitions with AI assistance
  • Automate database schema migrations and updates through AI prompts
  • Create and manage database records and user accounts via natural language
  • Build custom admin views and React components with AI code generation
  • Query and analyze your database structure to inform development decisions

Rebase MCP server FAQ

What is the Rebase MCP server?

The Rebase MCP server is a Model Context Protocol integration that gives AI assistants like Claude and Cursor access to your Rebase backend project. It enables AI to query schemas, manage data, handle users, and introspect your data model to assist with development.

Is Rebase free?

Yes, Rebase is open-source under the MIT license. You can self-host it anywhere and own your data and code completely.

How do I install the Rebase MCP server in Cursor or Claude?

Install via npm: `npm install @rebasepro/mcp`. Then configure it in your AI assistant's MCP settings to connect to your Rebase backend project.

What authentication does Rebase support?

Rebase supports email/password, OAuth (Google, Apple, GitHub, GitLab, Bitbucket, Microsoft, Facebook, LinkedIn, Discord, Slack, Spotify, X), magic links, one-time codes, MFA with TOTP, anonymous access, and API keys.

Can I use Rebase with my existing PostgreSQL database?

Yes. You can point Rebase at an existing PostgreSQL database via the DATABASE_URL environment variable, and it will automatically generate collection definitions from your schema.

What databases does Rebase support?

Rebase is PostgreSQL-first with full support via Drizzle ORM. It also includes adapters for MongoDB and Firebase/Firestore.

README (reference)

Source of truth, from the repository.

<p align="center"> <a href="https://rebase.pro"> <img src="https://rebase.pro/img/logo_small.png" width="240px" alt="Rebase logo" /> </a> </p> <h1 align="center">Rebase</h1> <h3 align="center">The Open-Source Backend-as-a-Service for Postgres — with the Admin Panel that comes with it</h3> <p align="center"> <strong>Point it at a database and get a working backend in minutes.</strong><br/> REST, auth, storage, realtime and backups over your own Postgres — then add a schema-driven admin panel, or don't.<br/> Own your data, own your code. The absolute easiest way to build on PostgreSQL. </p> <p align="center"> <strong>Public beta.</strong> The API you write against can change in a minor, with a changelog entry. Your data cannot break quietly.<br/> <a href="https://rebase.pro/docs/compatibility">What that promise rests on, and which subsystems are ready</a> </p> <p align="center"> <a href="https://demo.rebase.pro">Live Demo</a> • <a href="https://rebase.pro/docs">Documentation</a> • <a href="https://rebase.pro/product">Features</a> • <a href="https://discord.gg/fxy7xsQm3m">Discord</a> </p> <p align="center"> <a href="https://github.com/rebasepro/rebase/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/rebasepro/rebase/ci.yml?branch=main&style=flat-square&label=CI" alt="CI" /></a> <a href="https://www.npmjs.com/package/@rebasepro/app"><img src="https://img.shields.io/npm/v/@rebasepro/app.svg?style=flat-square&color=orange" alt="NPM Version" /></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-purple.svg?style=flat-square" alt="License: MIT" /></a> <a href="https://www.npmjs.com/package/@rebasepro/app"><img src="https://img.shields.io/npm/dw/@rebasepro/app?style=flat-square&color=blue" alt="NPM Downloads" /></a> <a href="https://discord.gg/fxy7xsQm3m"><img src="https://img.shields.io/discord/1013768502458470442?style=flat-square&logo=discord&logoColor=white&label=Discord" alt="Discord" /></a> </p> <br/> <p align="center"> <img src="https://rebase.pro/img/demo_products.png" width="800px" alt="Rebase Dashboard" /> </p>

What is Rebase?

Rebase is a developer-first, open-source backend-as-a-service built on PostgreSQL — authentication, S3-compatible storage, realtime, backups and auto-generated REST APIs over a database you own. It is self-hosted and agent-native, with a built-in MCP server for AI-assisted development.

The admin panel is the second layer of the same definition: add collection definitions and you get a schema-driven back-office built from them, extensible with your own React components, serverless functions, and scripts.

Adopt only what you want

Three modes, same packages, wired differently — see MODULAR-ARCHITECTURE.md.

ModeYou getComparable to
BaaSREST + auth + storage + realtime + backups over your database. No config files, no UI, no React in the dependency tree.Supabase
CMSBaaS + a schema-driven admin UI built from your collection definitions.Payload, Directus
FullCMS + Studio (SQL editor, schema visualizer, RLS editor, logs, API explorer).Supabase + Payload

✨ Key Highlights

  • 🔓 No Vendor Lock-in — Self-host anywhere. Full control over your infrastructure, code, and database.
  • 🧱 Modular — Start as a pure API and add the admin panel later, or never. Nothing is bundled that you didn't ask for.
  • ⚡ Instant Setup — pnpm dlx @rebasepro/cli init scaffolds a complete project in seconds.
  • 🗄️ PostgreSQL First — First-class Postgres support with Drizzle ORM, schema introspection, and automatic migrations.
  • 🔒 Secure by Default — Authorization is Postgres RLS, not application code. Tables without row-level security aren't served.
  • 🧩 Radical Extensibility — Not constrained to pre-built widgets. If you can build it in React, you can build it in Rebase.
  • 🎨 Premium UI — Fast, accessible design system built on Tailwind CSS v4 and Radix UI.
  • 🤖 AI-Ready — MCP server for AI-assisted database management, plus data enhancement and insights plugins.

⚡ Quick Start

Scaffold a complete, self-hosted Rebase application connected to your database:

pnpm dlx @rebasepro/cli init my-rebase-app
cd my-rebase-app
pnpm install
pnpm run dev

That is the whole first run — no database to install, no schema step. With no DATABASE_URL set, rebase dev starts a managed PostgreSQL (PGlite) that lives in the project directory, generates the schema from your collections, and creates the tables at boot.

Read the URLs from its output. rebase dev picks a free port per project rather than fixed ones, so they differ between projects. PORT and VITE_API_URL in .env apply to rebase start, not here.

Useful flags: --yes (required when there is no terminal to prompt, such as CI), --headless (see below), --template <name>, and --install / --no-install on init; --docker on dev to use the compose Postgres in this project instead, and --no-db to start nothing — set DATABASE_URL yourself.

To use your own Postgres instead: uncomment DATABASE_URL in .env and run pnpm run dev again. Nothing else changes — a DATABASE_URL that is set is never touched, and one pointing anywhere other than this machine is left alone entirely.

Just want the API?

Rebase is modular — take only the parts you want:

pnpm dlx @rebasepro/cli init my-api --headless

That scaffolds a headless backend: REST, auth, storage, realtime and backups over your database, with no collection files and no UI. Tables are served automatically, derived from your schema at boot — change the schema with a migration and the API follows. No React anywhere in the dependency tree.

A fresh headless project has no tables yet, so /api/data/* answers 404 NO_COLLECTIONS until you create some. Point it at a database that already has tables, or add them with a migration, and they appear.

The three adoption modes — BaaS (like Supabase), CMS (like Payload/Directus), and both together — are described in MODULAR-ARCHITECTURE.md.


Features

🏓 Full Admin Panel & CMS

An incredibly fast, windowed spreadsheet view to manage your database with inline editing, real-time updates, filtering, sorting, and text search. Switch between multiple view modes:

  • Spreadsheet table — Inline editing, column reordering, drag-and-drop
  • Card grid — Visual overview with image previews
  • List view — Compact, scannable layout
  • Kanban board — Cards grouped into columns by a property, dragged between them
  • Custom views — Build any React component as a collection view

🔒 Typed Schema & Database Migrations

Define your data models using pure TypeScript collections. Rebase automatically generates your Drizzle ORM schema, handles PostgreSQL migrations, and keeps your live database perfectly in sync using built-in tooling like rebase doctor.

💾 Backups & Restore

First-class database backups for self-hosted Postgres, built on pg_dump / pg_restore:

  • rebase db backup --out <path|s3://…> — compressed, custom-format dumps
  • rebase db restore <backup> — confirmation-gated, with --create-db / --target-db to restore into a fresh database
  • Scheduled backups via the built-in cron system, uploading to your configured storage backend with retention pruning
  • Studio Backups panel — browse and download backups from the admin UI

See docs/backups.md for the full guide, including security and PITR notes.

🔐 Authentication & Access Control

Built-in authentication with multiple providers:

  • Email/Password — With password reset flow
  • OAuth — Google, Apple, GitHub, GitLab, Bitbucket, Microsoft, Facebook, LinkedIn, Discord, Slack, Spotify and X
  • Magic link and one-time codes — Passwordless sign-in by email
  • MFA — TOTP second factor with recovery codes
  • Anonymous — For guest access, opt-in
  • Captcha and API keys — Bot protection on sign-up and the routes that send mail; scoped keys for scripts and agents

Granular role-based access control (RBAC) with customizable permissions per collection, field, and action.

📦 S3-Compatible Storage

Native S3-compatible file storage with:

  • Drag-and-drop uploads with progress tracking
  • Automatic image resizing and optimization
  • File metadata management
  • Storage browser in Studio

🛠️ Studio — Developer Toolbox

A full developer environment built into the admin panel — SQL and JS editors, RLS policies, a schema visualizer, database branches, backups, request logs, cron jobs, a storage browser, an API explorer and API keys. What each tool does →

🔌 Realtime Engine

A full WebSocket engine built into every Rebase backend:

  • Live data subscriptions — Subscribe to collection queries or individual entities. Changes propagate instantly with RLS-aware security.
  • Broadcast channels — Send typed messages between connected clients. Build chat, notifications, or collaborative features.
  • Presence tracking — Track who's online, sync user state across clients (typing indicators, cursor positions, online status).
  • Auto-reconnect — Exponential backoff, automatic resubscription, and token refresh on reconnect.

📴 Offline & Local-First Sync

Opt in with offline: true and the client SDK keeps a local database of rows instead of a cache of responses:

  • Reads survive a dropped connection — filters, sorting and pagination are evaluated against the local rows, so lists keep rendering.
  • Writes apply instantly — a write made offline lands locally, queues, and replays in order when the connection returns. One the server rejects is rolled back.
  • Live queries — observe() emits from the local database before any request, and re-emits on local writes, replays, rollbacks, realtime events, and changes from other tabs.

⚡ Extensible API & Edge Functions

Drop custom Hono routes or scheduled tasks into the functions/ and crons/ directories. Rebase auto-loads them with database access and JWT authentication middleware injected automatically.

🧬 SDK Generator

Auto-generate fully typed TypeScript SDKs from your collection definitions. Use them in any frontend, script, or service to interact with your Rebase backend with complete type safety.

pnpm dlx @rebasepro/cli generate-sdk

🤖 MCP Server

A built-in Model Context Protocol server that enables AI assistants to:

  • Query and manage your database schema
  • Create, read, update, and delete documents
  • Manage users and roles
  • Introspect your data model

🔍 Schema Inference & Introspection

Point Rebase at an existing PostgreSQL database and automatically generate collection definitions from your tables — including types, relations, validation constraints, and more.

📥📤 Import & Export

Import data from CSV, JSON, and Excel with an intuitive field mapper. Export your data in multiple formats with configurable column selection.

🧩 Plugins

Extend the admin experience with first-party plugins:

  • Data Enhancement — AI-powered field suggestions and auto-fill
  • Insights — Analytics dashboards and usage metrics

📜 Standalone Scripting

Write standalone data manipulation scripts that connect directly to your running backend using the @rebasepro/client SDK. The CLI persists the dev server URL to .rebase-dev-url for zero-config local development.

🧩 Custom Views & React Extensibility

Build entirely custom views — dashboards, previews, charts — and drop them into the main navigation or as entity-level tabs. Use built-in hooks to interact with Rebase's internal state.


🛠️ Core Technologies

Built entirely on modern, battle-tested web standards:

TechnologyWhat we use it for
💙 TypeScript 6End-to-end type safety
⚛️ React 19Component-driven UI
🌊 Tailwind CSS v4Utility-first styling
🔌 WebSocketsReal-time synchronization
🗄️ Drizzle ORMType-safe SQL migrations and queries
🧱 Radix UIAccessible UI primitives
📝 ProseMirrorRich text editing engine
🌐 HonoUltrafast HTTP server framework

📦 Packages

Rebase is structured as a modular monorepo — install only the layers you need:

PackageDescription
@rebasepro/typesCore TypeScript type definitions
@rebasepro/cms-typesThe admin block — presentation types, declared as an augmentation so a headless project pays nothing
@rebasepro/utilsShared utility functions
@rebasepro/commonCommon modules shared across packages
@rebasepro/formsLightweight form management library
@rebasepro/uiStandalone React component library (Tailwind + Radix)
@rebasepro/appCore app logic, controllers, and the auth/login views
@rebasepro/clientClient-side data access layer
@rebasepro/firebaseFirebase/Firestore client adapter
@rebasepro/serverServer framework and middleware (Hono)
@rebasepro/server-postgresPostgreSQL server adapter with Drizzle
@rebasepro/server-mongoMongoDB server adapter
@rebasepro/cmsFull admin panel interface
@rebasepro/studioSQL editor, RLS editor, schema visualizer, API explorer
@rebasepro/cliCLI for project scaffolding and management
@rebasepro/codegenTypeScript SDK code generation
@rebasepro/mcpMCP server for AI integrations
@rebasepro/inferenceDatabase schema introspection and inference
@rebasepro/rls-checkStatic audit of a database's row-level security
@rebasepro/plugin-aiAI-powered data enhancement plugin
@rebasepro/plugin-insightsAnalytics and insights plugin

ESM only

Every @rebasepro/* package ships ES modules and nothing else — "type": "module", no CommonJS build, no require() entry point. A CommonJS project reaches them with a dynamic await import(); require("@rebasepro/client") throws ERR_REQUIRE_ESM. This is stated here because the failure names the loader rather than the decision, and because it is not recoverable by configuration: there is no dual build to fall back to.

Node 22.22 is the floor, from .nvmrc and enforced by pnpm check:floors.

Versioning

Rebase is 0.x: the authored TypeScript API can still change in a minor, and every such change is in the changelog.

Separately, a small set of contracts is versioned and enforced — the bundle format, the bundle↔runtime contract, the auth schema version, and the hash identifying which collection schema a generated SDK was built against. These are stamped into built artifacts and live databases, checked at boot, and fail with a specific message rather than degrading. They are also the only things Rebase Cloud depends on, which is what lets a project move between self-hosting and the cloud. See docs/compatibility.md.


🎨 Standalone UI Library

Rebase exposes its design system as a completely independent library. Fully typed, accessible, and customizable via Tailwind CSS v4:

pnpm add @rebasepro/ui

Demo

Explore a live interactive sandbox with all features — data resets periodically:

👉 demo.rebase.pro


🤖 AI Coding Assistants & Agent Support

Rebase is designed from the ground up to be AI-agent ready. When developing a Rebase project using AI coding assistants (like Cursor, Windsurf, or Copilot):

1. Built-in Agent Guidelines (ai-instructions.md)

Every project scaffolded with rebase init carries its agent rules in ai-instructions.md, plus a short pointer file for each assistant that reads its own — AGENTS.md, CLAUDE.md, .cursorrules, .windsurfrules and .github/copilot-instructions.md. Each pointer names ai-instructions.md and the rebase skills install --agent <name> command for that assistant. The rules cover:

  • Using the Rebase SDK instead of raw SQL / direct Drizzle queries against application tables (which skip validation, hooks and row-level security).
  • Applying a collection change: while pnpm dev runs, saving the collection file is the whole step; db:push is for what boot leaves alone, and production uses db:generate then db:migrate.
  • Guarding custom functions, and what an agent must never do — deploy, edit .env, or hand-edit generated files.

2. Built-in MCP Server

rebase init writes .mcp.json, so Claude Code, Cursor and any other MCP client can drive the project the moment it is scaffolded:

{
  "mcpServers": {
    "rebase": {
      "command": "npx",
      "args": ["-y", "@rebasepro/mcp"],
      "env": {
        "REBASE_PROJECT_DIR": "."
      }
    }
  }
}

It speaks MCP over stdio and needs no login: while rebase dev is running it reads the backend URL and service key from .rebase/state.json. Write tools are refused against anything that is not on the loopback interface, which is the single most valuable thing in the package.

Setup, the tool list, and what the server can reach → — copy-paste blocks for Claude Code, Cursor, Gemini CLI, Codex and Kiro, and the credential model to read before pointing an assistant at a database you care about.

3. Troubleshooting Database Permissions in Studio

If your AI coding agent or database role permissions cause a permission denied for table <table_name> error when executing queries in the Rebase Studio SQL Editor:

  • Add DISABLE_DB_ROLE_SWITCHING=true to your .env file.
  • This forces the SQL Editor queries to execute under the default connection owner user (e.g. rebase) rather than trying to perform a PostgreSQL role switch to a non-existent database-level role.

Contributing

Bug fixes, features and documentation are all welcome. CONTRIBUTING.md is the whole path: clone, install, start the database, run the app, and the one command — pnpm ci:static — that runs what CI runs. It also covers commits and the changelog rule, and how to run one package's tests.

Two more worth knowing before a first pull request:

  • .agent/workflows/coding-standards.md — the engineering rules this codebase is held to, and the reasons behind them. No as any, no dynamic require, no polling on a realtime framework, no hidden dunder properties on data objects. Written for an AI agent, and exactly as binding on a person.
  • docs/gates.md — every automated check, what it protects, and how to bank its baseline when it has one.

Who builds Rebase?

Built and maintained by Camberi, a product engineering studio in Madrid and Munich that also builds for clients.


Support & Community


⭐ Star Us

If you find Rebase useful, please consider giving us a star on GitHub — it helps more developers discover the project!


License

Rebase is open-source and licensed under the MIT License. See the full License for details.

Related MCP servers

Policy-gated MCP treasury for AI agents — x402 subscribe, 50+ tools, multi-chain.

View repository →

Patent-pending diagnostic + decisions-ledger engine with operator briefs and an MCP console.

0
View repository →

Consequence evaluation for AI agents. Check recoverability before destructive actions.

View repository →
RERedditAPIs logo

Reddit API as MCP tools: search, subreddits, posts, comments, users, monitors, webhooks, feedback.

0
JavaScript
MIT
View repository →

Natural language interface designed for agentic applications to manage and search data in Redis.

LS Securities OpenAPI MCP server: Korean + overseas stocks, charts, screeners, portfolio, accounts.

2
C#
MIT
View repository →