OpenApps runs as a Model Context Protocol server, so any agent that speaks MCP can use the apps as an environment: Claude Code, Claude Desktop, Cursor, VS Code, Codex, or your own harness. The agent gets tools to reset the apps, act with pixel actions, read screenshots, and score itself against any OpenApps task. It needs no BrowserGym, no Hydra, and no launch scripts.

One server process is one environment: every app, served behind one headless browser that starts on the launcher, as a BrowserGym episode does. --app is optional; it only makes the browser start inside one app (see why you usually shouldn't).

Set up once

git clone https://github.com/facebookresearch/OpenApps.git
cd OpenApps
uv sync
uv run playwright install chromium

Check it starts. It prints "Setting environment for ..." once per app and then waits, silently, for a client on stdin: it is a stdio server, not something to type into. Stop it with Ctrl-C:

uv run python -m open_apps.mcp

Add it to your agent

Every client below launches the same command, so it works from any directory:

uv run --directory /path/to/OpenApps python -m open_apps.mcp

Replace /path/to/OpenApps with your clone. Clients start the server from their own working directory (often / or your home directory), so keep --directory: without it uv runs outside the project and the server dies with No module named 'open_apps' before the client can connect.

claude mcp add openapps -- uv run --directory /path/to/OpenApps python -m open_apps.mcp

--scope project writes it to .mcp.json to share with your team, and --scope user makes it available in every project. /mcp in a session shows whether it connected. Startup takes a few seconds. If a slow machine times out, raise the limit, e.g. MCP_TIMEOUT=60000 claude.

Settings → Developer → Edit Config, which opens claude_desktop_config.json:

{
  "mcpServers": {
    "openapps": {
      "command": "/absolute/path/to/uv",
      "args": ["run", "--directory", "/path/to/OpenApps",
               "python", "-m", "open_apps.mcp",]
    }
  }
}

Desktop apps do not inherit your shell's PATH, so give uv's full path (which uv). Restart Claude Desktop afterwards.

.cursor/mcp.json in a project, or ~/.cursor/mcp.json for all of them:

{
  "mcpServers": {
    "openapps": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/OpenApps",
               "python", "-m", "open_apps.mcp",]
    }
  }
}

.vscode/mcp.json (Copilot agent mode):

{
  "servers": {
    "openapps": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "--directory", "/path/to/OpenApps",
               "python", "-m", "open_apps.mcp",]
    }
  }
}
codex mcp add openapps -- uv run --directory /path/to/OpenApps python -m open_apps.mcp

Use the MCP Python SDK. The reference has a complete client, and Session drives the same environment in-process, without MCP.

from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client

params = StdioServerParameters(
    command="uv",
    args=["run", "--directory", "/path/to/OpenApps",
          "python", "-m", "open_apps.mcp",],
)
async with stdio_client(params) as (read, write):
    async with ClientSession(read, write) as s:
        await s.initialize()
        print(await s.call_tool("list_task_groups", {}))

A server another machine connects to

Over HTTP, one long-running server can take clients from elsewhere, for example a GPU node driving apps that run on a CPU box:

uv run python -m open_apps.mcp --transport http --host 0.0.0.0 --port 8000
claude mcp add --transport http openapps http://<host>:8000/mcp

It has no authentication, so keep it on a trusted network, or bind to 127.0.0.1 and tunnel over ssh -L 8000:localhost:8000.

More than one app or session

Each process is one environment. For parallel episodes, add one server per environment, each under its own name (openapps-1, openapps-2, ...). With --transport http, also give each one its own --port.

Debug with the MCP Inspector

The MCP Inspector lets you call each tool by hand and look at the screenshots that come back. Point it at the same --directory command:

npx @modelcontextprotocol/inspector uv run --directory /path/to/OpenApps python -m open_apps.mcp

It opens a browser tab. Click Connect, then Tools → list_task_groups, load_task, reset, act. For the Inspector's terminal-only mode, add --cli and a method, e.g. --cli ... --method tools/list.

If it won't connect:

  • No module named 'open_apps' in the server's stderr: the Inspector started the server outside the project. Keep --directory, or run the Inspector from the repo root.
  • PORT IS IN USE at http://127.0.0.1:6274: an earlier Inspector is still running, and the browser tab is talking to it, not to your new one. Stop it (lsof -ti tcp:6274 | xargs kill) and launch again.
  • The connection times out: the server starts every app and a browser before answering, which takes a few seconds and longer on a cold uv cache. Run the plain command once to warm it, or raise the request timeout in the Inspector's Configuration panel.

Run a task

Ask your agent for an episode in plain words, e.g. "Using the openapps tools, load the task label_printer_price, reset, complete it, and tell me the reward." Underneath, an episode is these calls:

  1. Find a task. list_task_groups() names the task sets: all_tasks (the paper's), files, openbanking, contacts, passwords, payments, longer_horizon, abstention_examples. list_tasks(app="files") lists the tasks that touch an app, and list_tasks(group="files") lists one set.
  2. Bind it. load_task(key) returns the goal to pursue. Then call reset(), which restores every app, opens the launcher, and snapshots the starting state that the reward diffs against.
  3. Act. act("mouse_click(375, 292)"), act("keyboard_type('Call Mom')"), ... Each action returns a screenshot and {url, reward, done, step_count, error}. describe_actions() gives the full action grammar.
  4. Reply when the task asks a question. Some tasks are scored on what the agent says, not on what it changes. act("send_msg_to_user('It cost $99.90.')") answers (the AnswerTasks in files) or asks a clarifying question, and act("report_infeasible('There is no such event.')") says it can't be done (the abstention tasks). A reply ends the episode right or wrong, as it does under BrowserGym: the score is the same through both harnesses.
  5. Score. get_reward() returns 1.0 for a completed task and 0.0 otherwise, computed from the apps' state and never from the screenshot.

reconfigure(theme=..., app=..., layout=..., content=..., seed=...) switches the variation live, so one server can sweep themes and languages between episodes. theme applies to every app; layout and content apply to app. list_variants(app, group) lists the choices.

Watching an episode

The browser is headless, but the apps are an ordinary web server. app_url() returns its address; open it in your own browser to watch the state change as the agent works. Don't click around while an episode is being scored: your changes count as the agent's.

The online shop

The shop tasks (the purchases in openbanking) need the shop served. That is the default, unless its content pack has no products or it is disabled (apps.onlineshop.enable=False). If it isn't served, load_task refuses a task that needs it (and --app onlineshop refuses to start), each with the reason, so an episode never runs against a missing app.

Reference

The MCP reference covers every tool, the launch flags (--device phone renders the apps for a phone and sizes the browser to match), the observation format, a minimal client, and the in-process Session API.