# MCP server for AI agents

The Bitrise Dev Environments MCP server lets any AI agent that supports the [Model Context Protocol](https://modelcontextprotocol.io) — such as Claude Code, Claude Desktop, Cursor, or VS Code — create and drive Remote Dev Environment sessions for you. The server is open source.

## Connection options

There are two ways to connect to the MCP server: 

- **Hosted**: connect your MCP client to `https://mcp-rde.bitrise.io` and sign in with your browser the first time. There's nothing to install, and it's the recommended option.
- **Local**: run the server as a binary on your machine using a personal access token. This exposes the full tool set, including uploading and downloading files between the session and your computer.

## Adding the server to your MCP client

Set up the hosted server in the client you use:

**Claude Code**

```bash
claude mcp add --transport http bitrise-dev-environments https://mcp-rde.bitrise.io
```

Run `/mcp` and authenticate in your browser.

**Cursor**

Add the server to your `mcp.json`:

```json
{
  "mcpServers": {
    "bitrise-dev-environments": {
      "url": "https://mcp-rde.bitrise.io"
    }
  }
}
```

**VS Code**

Add the server to your MCP configuration:

```json
{
  "servers": {
    "bitrise-dev-environments": {
      "type": "http",
      "url": "https://mcp-rde.bitrise.io"
    }
  }
}
```

## Agent capabilities

Once connected, you can ask your agent in plain language to:

- Create, list, restore, terminate, and delete sessions.
- Boot an iOS simulator or Android emulator with a session, wait until it's ready, and drive it: install a build, tap through the UI, take screenshots, and run tests. See [Device sessions](/bitrise-rde/devices/device-sessions).
- Mint a [device preview link](/bitrise-rde/devices/device-preview-links) that opens an app build on a device in someone else's browser.
- Keep sessions ready in a [warm pool](/bitrise-rde/configuration/warm-pools) and claim one when it needs a machine right away.
- Create and edit templates with [lifecycle hooks](/bitrise-rde/configuration/lifecycle-hooks), wait for a session's setup to finish, read a hook's log to find out why it failed, and run it again.
- Run shell commands in a session over SSH.
- Take screenshots of, and control, the macOS desktop.
- Open SSH or VNC remote access.
- Report the workspace's active session and resource usage (workspace owners and billing managers only).
- Upload and download files (local server only).

For example: *"Spin up a macOS Xcode session, clone my repo, and run the unit tests."* Or: *"Create a session with an iPhone 16 simulator, build the app, and check the onboarding flow."*

The server also ships the guides an agent needs to drive a virtual device, as MCP resources and as a tool. See [Guides for AI agents](/bitrise-rde/devices/device-sessions#guides-for-ai-agents).

## Authentication

* The hosted server uses browser-based sign-in, so there's no token to manage. 
* The local server authenticates with a Bitrise [personal access token](https://app.bitrise.io/me/account/security) set as the `BITRISE_TOKEN` environment variable. If you belong to more than one workspace, set `BITRISE_WORKSPACE_ID`.

## Learn more

For the local setup, the full list of tools, and per-client install guides, see the open-source repository: [bitrise-io/bitrise-mcp-dev-environments](https://github.com/bitrise-io/bitrise-mcp-dev-environments).
