> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beta.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the MCP server

Connect Claude, Cursor or Codex to the B3OS MCP server so your agent can scrape, run sandboxes and call marketplace actions.

You need a key in `B3OS_API_KEY` ([get one](/quickstart#get-a-key)) and Node.js for `npx`.

**Register the server with your client**

The CLI writes the B3OS server into your client's MCP configuration:

    ```bash
    npx b3os mcp install --client claude
    ```

    `--client` takes `claude`, `cursor` or `codex`. The entry starts the local server, `npx -y @b3os/mcp`, which reads `B3OS_API_KEY` from your environment (or the token from `b3os login`), so the client's configuration holds no secret. Restart the client afterwards.
  **Ask for something that needs a tool**

Try a prompt that needs the web:

    ```text
    Scrape https://example.com and tell me in one sentence what the page is for.
    ```

    The client calls `vision_scrape`, gets the page as Markdown and answers from it. B3OS tool names start with the product they call, such as `vision_scrape`, `render_screenshot` and `sandbox_exec`; the [MCP server](/sdks/mcp#tools) page lists them all.
  **Reach a marketplace action**

Pack actions do not crowd the tool list. The agent finds them in three calls:

    ```text
    Find a B3OS action that creates a GitHub issue and tell me which inputs it needs.
    ```

    It calls `actions_search` with your words, `actions_describe` for the input schema of the best match, and `actions_call` to run it once you store a GitHub connection in the [vault](/vault).

## Configure it by hand

The remote server lives at `https://beta-api.b3os.org/mcp`: stateless Streamable HTTP, authenticated with your key as a bearer token. The local server runs on your machine over stdio. The two list slightly different tools in this beta; see [the tool table](/sdks/mcp#tools).

**Claude Code**

```bash
    claude mcp add --transport http b3os https://beta-api.b3os.org/mcp \
      --header "Authorization: Bearer $B3OS_API_KEY"
    ```
  **JSON config**

For clients that read an `mcpServers` JSON file, such as Cursor's `~/.cursor/mcp.json`:

    ```json
    {
      "mcpServers": {
        "b3os": {
          "url": "https://beta-api.b3os.org/mcp",
          "headers": { "Authorization": "Bearer b3os_sk_..." }
        }
      }
    }
    ```
  **Local stdio**

`@b3os/mcp` is the local stdio server, the one `b3os mcp install` sets up:

    ```json
    {
      "mcpServers": {
        "b3os": {
          "command": "npx",
          "args": ["-y", "@b3os/mcp"],
          "env": { "B3OS_API_KEY": "b3os_sk_..." }
        }
      }
    }
    ```

Paste your own key where the examples show `b3os_sk_...`. A key with fewer scopes gives the agent fewer powers: tools whose operations need a scope the key lacks fail with [`forbidden`](/errors#forbidden).

## Next

- [MCP server reference](/sdks/mcp): the tools each server lists, exposing chosen packs directly, and running routines.
- [Run an agent in a sandbox](/quickstart/sandbox-agent) to put the agent itself on the node.