@rebasepro/mcp 0.21.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,8 +9,8 @@ pnpm add @rebasepro/mcp
|
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
ESM-only: `"type": "module"` with no CommonJS build, so it is loaded with
|
|
12
|
-
`import`.
|
|
13
|
-
`require(esm)
|
|
12
|
+
`import`. It needs Node `>=22.22.0` (its `engines` floor), where `require()`
|
|
13
|
+
of it resolves too: Node has supported `require(esm)` since 22.12.
|
|
14
14
|
|
|
15
15
|
Or run directly:
|
|
16
16
|
|
|
@@ -39,7 +39,7 @@ One precedence, in this order:
|
|
|
39
39
|
|
|
40
40
|
A `default` derived from 1 or 2 is never written back to the registry: it is recomputed at every start, and persisting it would put one project's directory, backend URL and dev service key in the file every other project on the machine reads.
|
|
41
41
|
|
|
42
|
-
Auto-discovery fills gaps in all three cases and **never overrules** a value one of them supplied — not the token and not the `baseUrl`. Discovery reads the dev server's *service key*, which is an unscoped admin secret, so a narrow `rk_live_*` key you registered is what gets used even while `rebase dev` is running; likewise a project registered against `https://staging.example.com` stays there rather than being silently redirected to the local dev port. A disagreement between the two is reported on stderr.
|
|
42
|
+
Auto-discovery fills gaps in all three cases and **never overrules** a value one of them supplied — not the token and not the `baseUrl`. Discovery reads the dev server's *service key*, which is an unscoped admin secret, so a narrow `rk_live_*` key you registered is what gets used even while `rebase dev` is running; likewise a project registered against `https://staging.example.com` stays there rather than being silently redirected to the local dev port. A `baseUrl` disagreement between the two is reported on stderr. Filling a gap is not: with no token registered, the SDK tools run on the discovered service key — full admin — and nothing says so.
|
|
43
43
|
|
|
44
44
|
`rebase init` writes `"env": { "REBASE_PROJECT_DIR": "." }` into the scaffolded `.mcp.json` — relative to the client's working directory, which for a project-level config file is the project.
|
|
45
45
|
|
|
@@ -62,8 +62,8 @@ The server attempts to load `.env` from `$REBASE_PROJECT_DIR/.env` or `$REBASE_P
|
|
|
62
62
|
|
|
63
63
|
**Every tool that changes the target environment is refused unless that target is on the loopback interface.** The gate is a list of what is *not* gated, so a newly added tool is protected by default:
|
|
64
64
|
|
|
65
|
-
- **Not gated — reads:** `
|
|
66
|
-
- **Not gated — local only:** `rebase_schema_generate`, `rebase_db_generate`, `rebase_generate_sdk`, the dev-server tools, and the project-registry tools. These write local files or local state and have no remote target to check.
|
|
65
|
+
- **Not gated — reads:** `rebase_schema_plan`, `rebase_doctor`, `rebase_db_branch_list`, `rebase_db_branch_info`, `list_documents`, `get_document`, `list_users`, `list_roles`, `storage_list_objects`, `storage_get_download_url`, `cron_list_jobs`, `cron_get_job`, `cron_get_job_logs`, `rebase_dev_logs`.
|
|
66
|
+
- **Not gated — local only:** `rebase_schema_introspect`, `rebase_db_branch_switch`, `rebase_schema_generate`, `rebase_db_generate`, `rebase_generate_sdk`, the dev-server tools, and the project-registry tools. These write local files or local state and have no remote target to check.
|
|
67
67
|
- **Gated against `DATABASE_URL`:** every other CLI tool — `rebase_db_push`, `rebase_db_migrate`, `rebase_db_branch_create`, `rebase_db_branch_delete`.
|
|
68
68
|
- **Gated against the project `baseUrl`:** every other SDK tool — `create_document`, `update_document`, `delete_document`, `create_user`, `update_user`, `delete_user`, `rebase_auth_reset_password`, `storage_delete_object`, `cron_trigger_job`, `cron_toggle_job`, `invoke_function`.
|
|
69
69
|
|
|
@@ -71,10 +71,12 @@ The two targets are not interchangeable: CLI tools never see `baseUrl`, so a loc
|
|
|
71
71
|
|
|
72
72
|
The `DATABASE_URL` the gate checks is resolved the way the spawned CLI resolves it — ambient environment first, then `<root>/.env`, `<root>/backend/.env`, `DOTENV_CONFIG_PATH` and the parent directory, including the `ADMIN_CONNECTION_STRING` fallback the branch commands accept. **If no connection string can be resolved at all, the DB tools are refused**: an unverifiable target is not a safe one, and the child does its own resolution from files this process may not see.
|
|
73
73
|
|
|
74
|
-
Only loopback (`localhost`, `127.0.0.0/8`, `::1`) counts as local — private ranges like `10.x` and `192.168.x` do not, since those are as likely to be a shared staging cluster as a laptop.
|
|
74
|
+
Only loopback (`localhost` and `*.localhost`, `127.0.0.0/8`, `::1`, `0.0.0.0`) counts as local — private ranges like `10.x` and `192.168.x` do not, since those are as likely to be a shared staging cluster as a laptop.
|
|
75
75
|
|
|
76
76
|
Set `REBASE_MCP_ALLOW_REMOTE_WRITES=true` to opt out.
|
|
77
77
|
|
|
78
|
+
The branch tools (`rebase_db_branch_*`) also require an admin, checked through `GET /auth/me` — which answers a signed-in user's access token only, so with a service key (including the one discovery supplies) or an `rk_live_*` API key every branch tool fails with "Admin authorization failed".
|
|
79
|
+
|
|
78
80
|
## Untrusted Data Marking
|
|
79
81
|
|
|
80
82
|
Rows, user records, storage listings, cron jobs, function responses and CLI output are returned inside an explicit `<<<UNTRUSTED_DATA …>>>` envelope. Anything stored in your database was written by somebody, and it arrives on the same channel as the tool contract the assistant is following; the envelope tells the model to treat it as inert content rather than instructions. It is a marker, not a sandbox — an assistant with these tools is only as safe as the content you let it read.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebasepro/mcp",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"description": "Model Context Protocol Server for Rebase — exposes schema, DB, document, and user management tools to AI assistants.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rebase",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
42
42
|
"dotenv": "^17.4.2",
|
|
43
|
-
"@rebasepro/client": "0.21.
|
|
43
|
+
"@rebasepro/client": "0.21.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "^26.1.2",
|