---
title: Connect Codex and Claude Code
description: Configure hosted HTTP or local stdio OpenTester MCP for your coding agent.
---

# Connect Codex and Claude Code {#connect-codex-and-claude-code}

Prepare an app token using the [MCP quick start](/mcp/). Choose hosted HTTP or build the local server and configure its three environment variables. Replace example absolute paths with your own checkout path.

## Remote HTTP connection {#remote-http}

Use Streamable HTTP at `https://mcp.opentester.app/mcp`. Configure a client that supports remote MCP and custom headers:

| Setting | Value |
| --- | --- |
| URL | `https://mcp.opentester.app/mcp` |
| Authorization | `Bearer <app agent token>` |
| X-OpenTester-App-Id | App UUID from the console |

Use the client's secret store or environment variables for the token. Do not put it in URL queries or commit it in plain text. MCP OAuth login is unsupported. Real tool calls become available after Google login and token issuance are configured in the hosted service. `/health` only reports the MCP transport server's health.

The stdio examples below are for local execution.

## Codex {#codex}

Add this server to `~/.codex/config.toml`, preserving existing settings:

```toml
[mcp_servers.opentester]
command = "node"
args = ["/absolute/path/to/opentester-mcp/dist/index.js"]
env_vars = ["OPENTESTER_API_URL", "OPENTESTER_APP_ID", "OPENTESTER_AGENT_TOKEN"]
```

`env_vars` forwards values from the Codex process environment. Start Codex with all three variables set. Desktop apps may not inherit terminal variables; verify that the spawned MCP receives them.

```sh
codex mcp list
```

Use `/mcp` during a conversation to check status. If Node is not on PATH, set `command` to its absolute path. This stdio configuration does not use `codex mcp login`. See the [official MCP documentation](https://learn.chatgpt.com/docs/extend/mcp) for configuration details.

## Claude Code {#claude-code}

Add this to your working repository's `.mcp.json`. Merge `opentester` into existing `mcpServers` if needed:

```json
{
  "mcpServers": {
    "opentester": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/opentester-mcp/dist/index.js"],
      "env": {
        "OPENTESTER_API_URL": "${OPENTESTER_API_URL}",
        "OPENTESTER_APP_ID": "${OPENTESTER_APP_ID}",
        "OPENTESTER_AGENT_TOKEN": "${OPENTESTER_AGENT_TOKEN}"
      }
    }
  }
}
```

Claude Code expands `${…}` from the environment. Do not replace references with raw tokens. Launch Claude Code from the configured shell and enable the project's MCP configuration.

```sh
claude mcp list
```

Use `/mcp` to inspect status. Reconnect after changing variables or tokens. See [Claude Code's MCP documentation](https://code.claude.com/docs/en/mcp#environment-variable-expansion-in-mcpjson) for expansion and configuration scope.

## Verify the connection {#verify-the-connection}

The server provides six tools:

```text
list_feedback
get_feedback
create_change_request
list_change_requests
get_change_request
attach_pull_request
```

Ask: “List up to five OpenTester feedback reports.” An empty `feedback` array with `total: 0` is valid. If tools appear but calls fail, check [troubleshooting](/mcp/troubleshooting) for scopes and API configuration.

## Connect multiple apps {#connect-multiple-apps}

Use separate server names such as `opentester_android` and `opentester_tablet`. Each local process's `OPENTESTER_APP_ID` and `OPENTESTER_AGENT_TOKEN` must match the target app. For HTTP, configure a separate connection with matching headers for each app.

Do not add `appId` to tool inputs. All tools share the app configured for their connection.

## Execution command {#execution-command}

Configure the local host to run the built file directly with `node`. An `npm run` banner or arbitrary `echo` on stdout can break stdio communication. Stdout is reserved for MCP messages; startup errors go to stderr.
