# Install Allbase MCP

Set up Allbase for the agent runtime you are running in. Complete the setup
yourself wherever the runtime permits; do not send the user away to copy and
run commands that you can run. The only expected user interaction is approving
the browser OAuth grant and explicitly consenting to the global instruction
adapter before you write it.

Allbase is a hosted Streamable HTTP MCP server at https://allbase.ai/mcp. Use OAuth.
Do not install a local Allbase server, ask for API keys, create token headers,
or configure ALLBASE_* environment variables.

## 1. Detect this runtime and configure the global MCP server

First inspect the existing MCP configuration. If an `allbase` entry already
points to https://allbase.ai/mcp, keep it. If it conflicts, explain the conflict
before replacing only that entry. Never overwrite unrelated MCP servers.

### Claude Code

Run:

```sh
claude mcp add --transport http --scope user allbase https://allbase.ai/mcp
claude mcp login allbase
```

If the server already exists at user scope, do not add a duplicate; verify it
with `claude mcp get allbase` and run only the login command if needed.
On versions before Claude Code 2.1.186, use `/mcp` inside an interactive
Claude Code session, select Allbase, and complete the browser sign-in instead.

### Codex

Run:

```sh
codex mcp add allbase --url https://allbase.ai/mcp
codex mcp login allbase
```

If the server already exists, do not add a duplicate; verify it with
`codex mcp list` and run only the login command if needed.

### Cursor editor or Cursor CLI

Merge this entry into the existing global `~/.cursor/mcp.json`. Parse and
write JSON safely; preserve every unrelated key and MCP server:

```json
{
  "mcpServers": {
    "allbase": {
      "url": "https://allbase.ai/mcp"
    }
  }
}
```

If the Cursor CLI is available, run `agent mcp login allbase`. Otherwise use
Cursor's MCP settings to enable Allbase and complete its OAuth prompt. An
interactive alternative is this official Cursor install deeplink:
cursor://anysphere.cursor-deeplink/mcp/install?name=allbase&config=eyJ1cmwiOiJodHRwczovL2FsbGJhc2UuYWkvbWNwIn0%3D

## 2. Offer the durable Allbase instruction adapter

Fetch the adapter matching this runtime and show its exact contents to the
user before writing it:

- Claude Code: https://allbase.ai/agent-setup/adapters/claude-code.md →
  `~/.claude/CLAUDE.md`
- Codex: https://allbase.ai/agent-setup/adapters/codex.md →
  `~/.codex/AGENTS.md`
- Cursor: https://allbase.ai/agent-setup/adapters/cursor.mdc →
  `~/.cursor/rules/allbase.mdc`

State the target path and ask for explicit consent. Only after consent, make
the marker-scoped write: append the document if no marker exists, or replace
only the existing Allbase marker block, from the line starting
`<!-- allbase:adapter` (any version) through `<!-- /allbase:adapter -->`.
For Cursor, the fetched document is
the complete dedicated `allbase.mdc` file; create or replace only that file
and do not change other rules.

## 3. Reload and verify

Reconnect or restart the MCP client so it refreshes its tool list. Claude Code
can use `/mcp`; the Codex IDE extension should be restarted and the Codex CLI
needs a new session; Cursor should reload its window or start a new CLI session.
Confirm the client reports `allbase` as connected. When the tools are visible,
call `allbase_status` with no arguments and report the connected workspace,
actor, role, and granted scopes. Do not claim success until both the client
connection and `allbase_status` verification pass. If a restart requires the
user to begin a new session, say exactly what remains to verify.

## Other surfaces

You cannot configure browser apps from here. If the user also wants Allbase in
Claude (web, desktop, or mobile), ChatGPT, or another MCP client, point them at
the human setup guide: https://allbase.ai/connect
