# Rebase

Gives your AI assistant access to a Rebase backend: schema, database, documents, users and the dev server. Useful when the agent has to touch project data.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 23
- Author: rebasepro
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/rebasepro/rebase/tree/HEAD/packages/mcp
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/mcp/rebase

## What it does

This server connects an assistant to a Rebase project over stdio. The agent can read the schema and collections, query the database, create and edit documents, manage users and roles, start the dev server and read its logs. Storage, cron jobs and functions have tools too.

Several projects can be registered at once, kept in `~/.rebase/projects.json`. With `rebase dev` running locally, the server picks up the port and service key from `.rebase/state.json` on its own. It needs Node `>=22.22.0` and ships as ESM only.

Write tools refuse any target that is not on loopback while `REBASE_MCP_ALLOW_REMOTE_WRITES` is `false`. One catch: with no token set, the tools run on the discovered service key, which is full admin access, and nothing warns you. Set a token first.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `REBASE_PROJECT_DIR`, `REBASE_BASE_URL`, `REBASE_API_TOKEN`, `REBASE_MCP_ALLOW_REMOTE_WRITES` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env REBASE_PROJECT_DIR=<REBASE_PROJECT_DIR> --env REBASE_BASE_URL=<REBASE_BASE_URL> --env REBASE_API_TOKEN=<REBASE_API_TOKEN> --env REBASE_MCP_ALLOW_REMOTE_WRITES=<REBASE_MCP_ALLOW_REMOTE_WRITES> --transport stdio mcp -- npx -y @rebasepro/mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add mcp --env REBASE_PROJECT_DIR=<REBASE_PROJECT_DIR> --env REBASE_BASE_URL=<REBASE_BASE_URL> --env REBASE_API_TOKEN=<REBASE_API_TOKEN> --env REBASE_MCP_ALLOW_REMOTE_WRITES=<REBASE_MCP_ALLOW_REMOTE_WRITES> -- npx -y @rebasepro/mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@rebasepro/mcp"
            ],
            "env": {
                "REBASE_PROJECT_DIR": "<REBASE_PROJECT_DIR>",
                "REBASE_BASE_URL": "<REBASE_BASE_URL>",
                "REBASE_API_TOKEN": "<REBASE_API_TOKEN>",
                "REBASE_MCP_ALLOW_REMOTE_WRITES": "<REBASE_MCP_ALLOW_REMOTE_WRITES>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@rebasepro/mcp"
            ],
            "env": {
                "REBASE_PROJECT_DIR": "<REBASE_PROJECT_DIR>",
                "REBASE_BASE_URL": "<REBASE_BASE_URL>",
                "REBASE_API_TOKEN": "<REBASE_API_TOKEN>",
                "REBASE_MCP_ALLOW_REMOTE_WRITES": "<REBASE_MCP_ALLOW_REMOTE_WRITES>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e REBASE_PROJECT_DIR=<REBASE_PROJECT_DIR> -e REBASE_BASE_URL=<REBASE_BASE_URL> -e REBASE_API_TOKEN=<REBASE_API_TOKEN> -e REBASE_MCP_ALLOW_REMOTE_WRITES=<REBASE_MCP_ALLOW_REMOTE_WRITES> mcp npx -y @rebasepro/mcp
```
Replace <…> with your own values

## When to use it
- Inspect the schema and collections without opening the code
- Create or update a document from chat
- Add a user and assign a role
- Start `rebase dev` and read its logs
- Preview a schema plan before touching the database

## Example prompts
- Use Rebase to list the users and their roles
- Start the Rebase dev server and show me the logs
- Run `rebase_schema_plan` and tell me what would change in the database

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24242
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7506

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
