Rebase — Claude Code MCP server: what it does, how to install
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.
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/mcpWhat Rebase 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.
What it helps with
- 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 devand read its logs - Preview a schema plan before touching the database
Example prompts for the agent
- Use Rebase to list the users and their roles
- Start the Rebase dev server and show me the logs
- Run
rebase_schema_planand tell me what would change in the database
How to install Rebase
Platform CLI
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/mcpReplace <…> with your own values
Platform CLI
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/mcpReplace <…> with your own values
Config file
{
"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
Config file
{
"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
Platform CLI
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/mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Rebase
How do I install Rebase in Claude Code?
Run claude mcp add rebase -e REBASE_API_TOKEN=<REBASE_API_TOKEN> -- npx -y @rebasepro/mcp with your own token in place of the placeholder.
What does the Rebase MCP server do?
It gives the agent tools for a Rebase project: schema, database, documents, users, storage, cron jobs and the dev server.
Can it write to a production database?
Not by default. Tools that change data refuse non-loopback targets until REBASE_MCP_ALLOW_REMOTE_WRITES is turned on. Read tools are not limited by that rule.