---
name: cedros-mcp-connect
description: Configure any supported coding harness to reconnect to one Cedros site across sessions without exposing its API key.
---

# Connect an MCP Client to Cedros

This public guide is the canonical client-configuration contract for a Cedros site. It never contains a credential. The short setup request that points here supplies the exact values for this site.

Cedros uses a fixed bearer API key for coding-client connections. Do not start an OAuth login for this server. The key is user-scoped, permission-scoped, revocable, and stored only as a hash by Cedros. The client receives the raw value once and must keep it outside chat and source control.

## Required Values

The setup request supplies:

- `MCP_URL`: the absolute Streamable HTTP endpoint for this site
- `SERVER_NAME`: the stable name for this site in the MCP client
- `TOKEN_ENV_VAR`: the name of the environment variable that already contains the bearer credential

The client to configure is the client or harness currently running this request. Identify which one you are from your own environment, then replace those placeholder names in exactly one matching client section below. If you cannot identify your client confidently, ask the user which one to configure — do not guess and do not configure more than one. The API key already carries its actor identity and permissions; do not add user or organization identity headers.

## Safety and Completion Rules

1. Preserve every existing setting and MCP server. Only add or update `SERVER_NAME`.
2. Configure only the currently running client. Do not create configuration files for unused clients.
3. Keep the bearer credential out of chat, tool arguments, logs, and git. Reference `TOKEN_ENV_VAR` using the running client's native syntax.
4. Never ask for, print, copy, generate, revoke, or persist the value of `TOKEN_ENV_VAR`. The user stores it outside the agent session.
5. If the environment variable is unavailable, finish the secret-safe configuration, then stop and tell the user the connection is not complete until the variable is available to the client. Never replace it with a literal credential or report a successful connection.
6. Validate syntax without exposing environment values. Restart the client, then confirm `SERVER_NAME` connects and can list tools. The connection is complete only after the restarted client lists the server's tools and reads `/skill.md`. If it reports authentication required, first confirm that `TOKEN_ENV_VAR` is present in the environment that launches the client.

## Conductor

Conductor is a launcher, not a separate MCP configuration format. Detect which client is running in the current Conductor session and use exactly one matching section below. Before claiming success, confirm only that `TOKEN_ENV_VAR` is present; never print its value.

The environment variable must be stored in Conductor's machine-local configuration before starting the new agent session so future sessions inherit it. A variable available only in the current terminal or agent process is not a durable Conductor connection.

Use the one-line Terminal command shown in Cedros admin. It downloads the trusted installer from `/connect/conductor.py`, prompts for the key without echoing it or placing it in shell history, then adds or updates `TOKEN_ENV_VAR` under `[environment_variables]` in the trusted repository's `.conductor/settings.local.toml`. That file must remain untracked and private. Other coding harnesses remain available under **Using another coding tool?**. **Conductor → Settings → Environment** is the manual fallback.

After saving it, start a new session and use **MCP status → Refresh status** in the session composer.

If the running client cannot be identified confidently, ask only which client Conductor launched. Do not guess and do not create multiple configuration files.

## Claude Code

Merge into the trusted repository's `.mcp.json`:

```json
{
  "mcpServers": {
    "SERVER_NAME": {
      "type": "http",
      "url": "MCP_URL",
      "headers": {
        "Authorization": "Bearer ${TOKEN_ENV_VAR}"
      }
    }
  }
}
```

## Codex

Merge into the trusted repository's `.codex/config.toml`:

```toml
[mcp_servers."SERVER_NAME"]
url = "MCP_URL"
bearer_token_env_var = "TOKEN_ENV_VAR"
required = false
default_tools_approval_mode = "writes"
```

## Gemini CLI

Merge into the trusted repository's `.gemini/settings.json`:

```json
{
  "mcpServers": {
    "SERVER_NAME": {
      "httpUrl": "MCP_URL",
      "headers": {
        "Authorization": "Bearer ${TOKEN_ENV_VAR}"
      }
    }
  }
}
```

Use the supplied environment-variable name exactly. Gemini CLI filters inherited variables with credential-like names such as `TOKEN`, `KEY`, and `AUTH`; Cedros setup names its variable to remain compatible.

## Hermes Agent

Merge into `~/.hermes/config.yaml`. Hermes can persist the environment assignment in `~/.hermes/.env`.

```yaml
mcp_servers:
  SERVER_NAME:
    url: "MCP_URL"
    headers:
      Authorization: "Bearer ${TOKEN_ENV_VAR}"
```

## OpenCode

Merge into the trusted repository's `opencode.json`:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "SERVER_NAME": {
      "type": "remote",
      "url": "MCP_URL",
      "enabled": true,
      "oauth": false,
      "headers": {
        "Authorization": "Bearer {env:TOKEN_ENV_VAR}"
      }
    }
  }
}
```

## OpenClaw

Merge into `~/.openclaw/openclaw.json`. OpenClaw can persist the environment assignment in `~/.openclaw/.env`.

```json
{
  "mcp": {
    "servers": {
      "SERVER_NAME": {
        "url": "MCP_URL",
        "transport": "streamable-http",
        "headers": {
          "Authorization": "Bearer ${TOKEN_ENV_VAR}"
        }
      }
    }
  }
}
```

## Cursor

Merge into the trusted repository's `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "SERVER_NAME": {
      "url": "MCP_URL",
      "headers": {
        "Authorization": "Bearer ${env:TOKEN_ENV_VAR}"
      }
    }
  }
}
```

## Other MCP Clients

Configure a Streamable HTTP server with:

```text
Name: SERVER_NAME
URL: MCP_URL
Authorization: Bearer <value supplied securely from TOKEN_ENV_VAR>
```

Use the client's native environment-variable, secret-store, or OAuth indirection. If it cannot keep the credential out of tracked configuration, stop and tell the user that this client needs a private credential store; do not write a literal credential into the repository.

## After Connecting

After the client lists tools, read `/skill.md` for the current Cedros capability landscape and operating rules. Runtime MCP discovery remains authoritative because available tools vary by Cedros version, enabled extensions, authenticated permissions, and credential scope.

Useful client checks:

- Conductor: use **MCP status → Refresh status** in the session composer.
- Claude Code: run `claude mcp get SERVER_NAME`, then inspect `/mcp` in a restarted session.
- Codex: run `codex mcp list` in a restarted terminal.
- Gemini CLI: inspect `/mcp list` in a restarted session.
- Hermes Agent: restart Hermes and inspect its MCP startup status.
- OpenCode: run `opencode mcp list`.
- OpenClaw: run `openclaw mcp doctor SERVER_NAME --probe`.
- Cursor: refresh the server in **Settings → MCP**.

## Maintainer Contract

These formats were verified against current first-party documentation on 2026-07-22. When a client changes its schema, update this guide and its contract tests together:

- [Conductor MCP](https://www.conductor.build/docs/reference/mcp)
- [Claude Code MCP](https://code.claude.com/docs/en/mcp)
- [Codex MCP](https://developers.openai.com/codex/mcp/)
- [Gemini CLI MCP](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md)
- [Hermes Agent MCP](https://hermes-agent.nousresearch.com/docs/user-guide/features/mcp)
- [OpenCode MCP](https://opencode.ai/docs/mcp-servers/)
- [OpenClaw MCP](https://docs.openclaw.ai/cli/mcp)
- [Cursor MCP](https://docs.cursor.com/context/model-context-protocol)
