Rebase MCP: a Postgres backend for your agent
Rebase
Rebase MCP server: the agent edits the schema, documents and users of a Postgres backend, with writes limited to localhost
- 29 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- The agent writes and deletes documents, users and roles, and create_user and update_user can mint an admin
- Migration, schema push and cloud deploy tools change the database and the project, and the write guard works by address only
Install
- Works in
Manual install
pnpm dlx @rebasepro/cli init my-rebase-appThe command creates a project and writes .mcp.json with the rebase server.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The agent writes and deletes documents, users and roles, and create_user and update_user can mint an admin
- Migration, schema push and cloud deploy tools change the database and the project, and the write guard works by address only
This is third-party code. Review the repository files before installing.
What it does
Rebase is an open-source backend as a service over your PostgreSQL: REST, authentication, storage, realtime and backups, plus an optional admin panel built from collection definitions. The project is in public beta, so the API may change between minor versions. The @rebasepro/mcp package runs over stdio and gives the agent 53 tools in ten groups. They include schema and database (Drizzle schema generation, rebase_db_push, rebase_db_migrate, introspection of existing tables, database branches and their diffs, rebase_doctor drift checks), documents, users and roles, storage, cron jobs, function calls and cloud deploy. Collection definitions and generated schemas are exposed as MCP resources. The rebase init command writes .mcp.json itself. While rebase dev runs, the server takes the backend URL and key from .rebase/state.json, so no sign-in is needed. Every tool that changes the target environment refuses a non-loopback address until you set REBASE_MCP_ALLOW_REMOTE_WRITES=true.
Who it is for. Developers building a backend on Rebase who ask Claude Code or Cursor to change the schema, migrations and test data in a local database.
Good fit when
- A collection was added in code and the agent should apply the schema with rebase_db_push while rebase dev runs
- An existing Postgres database is waiting to be connected and collection definitions must come from its tables
- Before a migration you need to check drift between definitions, the Drizzle schema and the live database
- A data experiment needs a database branch with a review of differences in tables, indexes and access policies
- Test users and roles must be created without opening the admin panel
Not a fit when
- You need to change a production database: writes are blocked by default for any non-loopback address, and turning the guard off leaves only the agent's judgement
- The project is not on Rebase: the server works with the rebase command and the project's collection definitions
- You need API stability: the project is in public beta and minor versions may change it
Example request
Add an orders collection with status and amount fields, apply the schema and check for drift between the code and the databaseMCP
- Transport
- stdio
- Authentication
- not required
Environment variables
REBASE_PROJECT_DIR- Project root holding rebase.json, the current folder by default.
REBASE_BASE_URL- Backend address when rebase dev is not found, http://localhost:3001 by default.
REBASE_API_TOKENsecret- Token for calls to the app API.
REBASE_MCP_ALLOW_REMOTE_WRITES- A value of true lets write tools run against a non-loopback address.
Limitations
It needs Node 22.22 or newer and the package is ESM only. The server can manage several projects: the registry sits in ~/.rebase/projects.json, and when a rebase.json is present the working folder overrides the home cache.
The write guard checks the address: only loopback counts as local, and ranges like 10.x and 192.168.x are treated as remote. The service key that rebase dev discovers carries full admin rights, so setting a narrow rk_live_ key by hand is safer. Database branch tools need an admin role. Cloud tools run rebase cloud under your login.
How to disable. Remove the rebase entry from the project's .mcp.json or run claude mcp remove rebase. Stopping rebase dev also leaves the server without an address and key, since it reads them from .rebase/state.json.
FAQ
How do I connect the Rebase MCP server to Claude Code?
Create a project with pnpm dlx @rebasepro/cli init: it writes .mcp.json with the command pnpm exec rebase-mcp and REBASE_PROJECT_DIR. In an existing project add @rebasepro/mcp to devDependencies and the same block.
Do I need a login or token?
Not for local development: while rebase dev runs, the server takes the address and key from .rebase/state.json. For remote projects set REBASE_BASE_URL and REBASE_API_TOKEN.
Can the agent change a production database?
Not by default. Write tools refuse any non-loopback address. REBASE_MCP_ALLOW_REMOTE_WRITES=true removes the guard, and then the choice of project is on you.
What about data from tables, is it risky?
Rows and user records arrive inside an UNTRUSTED_DATA envelope that tells the model to treat the content as inert data. The authors call it a marker, and it is no guarantee.
How many tools does the server have?
53 in ten groups: schema and database, schema planning, documents, users, storage, cron, functions, cloud, development and the project registry.
Discussion
No questions or reviews yet.
Related
MCP serversA PostgreSQL MCP server with index tuning, EXPLAIN plans, database health checks and a read-only mode
Instant REST and MCP over PostgreSQL: the agent reads an existing database through an MCP endpoint with no backend to write
A PostgreSQL backend your agent builds over MCP, where the platform verifies every change and can roll it back.
Supabase's official MCP server: the agent manages tables, reads project config and queries data after an OAuth login
A single Go binary turns a SQL database into a REST API with roles and an MCP server for Claude Code, Cursor and VS Code
Two official Prisma MCP servers: a local one for migrations and Prisma Studio, and a remote one for managing Prisma Postgres databases
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Rebase MCP: a Postgres backend for your agent (this card) | yes | not required | 29 | |
| Supabase MCP Server | yes | OAuth | 3,008 | works with a cloud Supabase project, while Rebase MCP targets a local backend and blocks writes beyond localhost |
| Nhost MCP | yes | OAuth | 9,378 | drives a project on the Nhost platform with Hasura, whereas Rebase is a different backend over Postgres |
| Neon MCP Server | yes | OAuth | 663 | manages Neon databases and branches, whereas Rebase adds a REST, auth and storage layer |
README in short
The README presents Rebase as a Postgres backend with an admin panel and shows a quick start, SDKs, the package layers and a section on AI assistant support: rules in ai-instructions.md, files for each agent and the built-in MCP server. The license is MIT.