# Give Cline a real backend: Postgres, auth and storage

> Add Scribase to Cline as a remote Streamable HTTP MCP server, add the rules to .clinerules, and let it create the database, sign-in and storage for your app.

Source: https://scribase.com/agents/cline

Add Scribase through the Cline panel’s Remote Servers tab (or paste the JSON below) and Cline can create the backend, run migrations after a row-level-security test, and ask before merging into production.

## Connect Cline

_cline_mcp_settings.json_

```json
{
  "mcpServers": {
    "scribase": {
      "type": "streamableHttp",
      "url": "https://api.scribase.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:SCRIBASE_ACCESS_TOKEN}"
      }
    }
  }
}
```

For clients that need a header, create an agent token (it starts with scb_agt_: scoped, expiring and revocable) and keep it in the SCRIBASE_ACCESS_TOKEN environment variable, never in the repository. Never hand an agent a personal access token or a service-role key. Set "type": "streamableHttp" exactly (camelCase, no hyphen) — omitting it falls back to SSE and this server will answer 405. Or run `cline mcp add scribase https://api.scribase.com/mcp --transport http --yes` from a terminal.

## Project rules file: .clinerules

```markdown
## Scribase backend
- The backend is Scribase (Postgres, Auth, Storage, Realtime). App code uses @supabase/supabase-js with the URL and anon key that `npx scribase init` writes.
- Never ask me for keys. To sign in, run `scribase login --json`, show me the link and code, and wait for my approval.
- Schema changes are SQL files in supabase/migrations/, rehearsed on a preview branch; every new table enables row-level security with owner policies.
- Merging into production, deleting environments and rotating keys need my explicit approval for that operation.
- Never print, log or commit keys. Full rules: https://docs.scribase.com/llms.txt
```

## FAQ

**Where do I open the MCP settings?**

Click the stacked-server icon in the Cline panel toolbar, then Configure → Configure MCP Servers. The Remote Servers tab avoids hand-editing JSON entirely.

**Can the agent break production?**

Every write tool waits for an explicit confirm, and schema_apply only accepts a token that policy_test issued for the same schema, so an unproven row-level-security policy cannot be applied. Agent tokens are scoped and expiring, and every call is audited.

**What does it cost?**

Scribase is priced per project, with no usage surprises. See the pricing page for the current prices. Every new organization is free for 14 days, no card.

**Can I leave?**

Yes. export_run produces a portable bundle (Postgres dump, auth users, storage objects) you can restore anywhere Postgres runs.