Agents

Connect agents with MCP

Give Claude Code, Codex and other agents the Nems browser and simulator through MCP.

Nems has an MCP server, so agents can drive a browser pane and the iOS Simulator with tools instead of commands.

Tip

Agents can also use the browser through the nems browser command, which the skills teach them. Use MCP, the skills, or both.

Connect Claude Code or Codex

  1. Open Settings › Agents.
  2. In MCP server, click Connect next to Claude Code or Codex.
  3. Start a new agent session. The nems tools are now available.

The row then says Connected, and the button changes to Disconnect. If the agent isn't installed, the row says so.

Nems connects it with the agent's own command, so you can also do it yourself:

# Claude Code
claude mcp add --scope user nems -- "$HOME/Library/Application Support/Nems/shell-integration/bin/nems" mcp

# Codex
codex mcp add nems -- "$HOME/Library/Application Support/Nems/shell-integration/bin/nems" mcp

To disconnect: claude mcp remove --scope user nems or codex mcp remove nems.

Other agents

Any agent that supports MCP servers over stdio can use Nems. Add a server named nems with this command, which is also shown in the Command row in Settings › Agents:

"$HOME/Library/Application Support/Nems/shell-integration/bin/nems" mcp

For agents configured with JSON, that's usually:

{
  "mcpServers": {
    "nems": {
      "command": "/Users/you/Library/Application Support/Nems/shell-integration/bin/nems",
      "args": ["mcp"]
    }
  }
}

The path stays the same if you move the Nems app.

The tools

Tool What it does
browser_open Load a URL, opening a browser pane if there isn't one.
browser_snapshot The page as text, with a ref for every element.
browser_click, browser_hover Click or hover an element.
browser_type, browser_press Type into a field, press a key.
browser_find Find elements by role and name.
browser_wait_for Wait for text or an element.
browser_screenshot Take a screenshot; the image comes back to the agent.
browser_console Read console errors and warnings.
browser_viewport Size the page: phone (390×844), tablet, laptop, desktop or any size.
browser_emulate Dark or light color scheme, reduced motion.
browser_eval Run JavaScript in the page, after you approve it.
browser_state_save, browser_state_load Save and restore cookies and local storage.
browser_back, browser_forward, browser_reload, browser_url Navigation.
sim_open, sim_device, sim_list Open and pick an iOS Simulator device.

Elements are picked by ref from a snapshot, a CSS selector, or a role and name.

Which browser pane it uses

  • An agent running in a Nems pane uses the browser pane in its own tab.
  • An agent running outside Nems uses the browser pane in the tab you're looking at. If there isn't one, browser_open opens a new browser tab.

The MCP server has the browser and simulator tools. To start and talk to other agents, use the nems command.

Something missing or unclear? Tell us