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

# Connect an Agent

> Add the Rebind MCP server to Claude Code, Cursor, Codex, opencode, or any MCP client that runs stdio servers.

An agent reaches Rebind through the [Rebind MCP server](https://docs.rebind.gg/remote-control/mcp.md),
which needs [Remote Control](https://docs.rebind.gg/remote-control/overview.md#run-the-server) running
and [Bun](https://bun.sh) 1.1 or later.

## Add it with add-mcp

[`add-mcp`](https://github.com/neon-solutions/add-mcp) writes the configuration
for the clients you name, in each one's own format:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
npx add-mcp "bunx @rebind.gg/mcp-server" --name rebind \
  --env REBIND_URL=ws://127.0.0.1:19561 \
  -g -a claude-code -a cursor -a codex -a opencode
```

List the clients you use with `-a`, or pass `--all`. `-g` writes global
configuration; leave it out for configuration in the current project. Restart
the client afterward.

## Add it by hand

Any MCP client that runs stdio servers takes this block directly:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "mcpServers": {
    "rebind": {
      "command": "bunx",
      "args": ["@rebind.gg/mcp-server"],
      "env": {
        "REBIND_URL": "ws://127.0.0.1:19561",
        "REBIND_TOKEN": "your Remote Control auth token"
      }
    }
  }
}
```

## An agent on another computer

When the agent runs on another computer, or inside WSL on Windows, turn off
[**Local only**](https://docs.rebind.gg/remote-control/overview.md#options), restart Remote Control, and
set `REBIND_URL` to the Rebind computer's address.

## Next

* [Check the connection](https://docs.rebind.gg/remote-control/mcp.md#check-the-connection) before the agent's first task.
* [Settings](https://docs.rebind.gg/remote-control/mcp.md#settings) lists the server's environment variables.
* [Security](https://docs.rebind.gg/remote-control/mcp.md#security) covers the auth token and which **Allow** options to turn on.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.