> ## Documentation Index
> Fetch the complete documentation index at: https://docs.relaycloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# RelayCloud MCP server

> Connect an authenticated MCP client to RelayCloud and use tools to inspect and manage supported resources.

RelayCloud exposes an authenticated Model Context Protocol server for managing your RelayCloud resources through an MCP client.

## Endpoint

Configure your MCP client to use:

```text theme={null}
https://mcp.relaycloud.app/mcp
```

The server advertises itself as **RelayCloud MCP Server**.

The endpoint also provides OAuth routes for clients that support MCP OAuth discovery and authorization.

## Installation

<Tabs>
  <Tab title="OpenCode">
    Edit `~/.config/opencode/opencode.json` and add the MCP server:

    ```json theme={null}
    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "relaycloud": {
          "type": "remote",
          "url": "https://mcp.relaycloud.app/mcp",
          "oauth": {}
        }
      }
    }
    ```

    Authenticate with RelayCloud by running:

    ```sh theme={null}
    opencode mcp auth relaycloud
    ```
  </Tab>

  <Tab title="Codex">
    Open your terminal and run:

    ```sh theme={null}
    codex mcp add relaycloud --url https://mcp.relaycloud.app/mcp
    ```

    The next time you run `codex`, it automatically opens the OAuth flow to connect to your RelayCloud account.

    Alternatively, edit `~/.codex/config.toml` and add the MCP configuration:

    ```toml theme={null}
    [mcp_servers.relaycloud]
    url = "https://mcp.relaycloud.app/mcp"
    ```
  </Tab>

  <Tab title="Claude Code">
    Open your terminal and run:

    ```sh theme={null}
    claude mcp add --transport http relaycloud https://mcp.relaycloud.app/mcp
    ```

    This launches an OAuth authentication flow to connect Claude Code to your RelayCloud account.
  </Tab>

  <Tab title="Other">
    Any MCP client that supports OAuth authentication is supported. Run the following command to add the MCP server to your client:

    ```sh theme={null}
    npx add-mcp https://mcp.relaycloud.app/mcp
    ```
  </Tab>
</Tabs>

## Available tools

### Discover resources

* `list-organizations-tool`
* `list-projects-tool`
* `list-servers-tool`
* `list-server-services-tool`
* `list-server-service-ports-tool`
* `list-workspaces-tool`
* `list-workspace-domain-listeners-tool`
* `list-workspace-tls-configs-tool`
* `list-assistants-tool`
* `list-conversations-tool`

### Inspect resources

* `get-workspace-tool`
* `get-conversation-tool`
* `get-assistant-options-tool`
* `get-workspace-tls-config-tool`

### Create resources

* `create-project-tool`
* `create-server-tool`
* `create-workspace-tool`
* `generate-workspace-deploy-key-tool`

Workspace creation accepts repository, deployment, package manager, web target, and domain configuration. Deploy keys are handled as encrypted, one-time inputs during workspace creation.

The deploy key tool never returns the private key in plain text. It only returns an encrypted version of the private key along with the public key, so the agent can add the public key to your repository. The private key is never persisted on RelayCloud. When creating a workspace, the agent passes the encrypted version of the private key, which RelayCloud uses only to set up the workspace's git repository.

### Assistants and lifecycle actions

* `prompt-assistant-tool` sends a prompt to an OpenCode Assistant in a workspace or continues an existing conversation.
* `restart-server-service-tool` restarts a server service.
* `restart-workspace-domain-listener-tool` restarts a workspace domain listener.
* `archive-assistant-tool` archives an Assistant.
* `archive-workspace-tool` archives a workspace.
* `archive-server-tool` archives a server.

The prompt tool accepts a workspace ID or conversation ID and a prompt. It can also target an agent, model provider, model, and variant.

### TLS operations

* `issue-workspace-tls-tool`
* `activate-workspace-tls-config-tool`

These tools support the workspace TLS provisioning flow. Read the returned TLS configuration and follow the required challenge or activation state before treating a certificate as active.

## Resources

The server registers two guidance resources:

* `WorkspaceCreationGuideResource`
* `WorkspaceTlsProvisioningGuideResource`

Use these resources when your MCP client needs the expected sequence for workspace creation or TLS provisioning.

<Warning>
  Do not paste access tokens, client secrets, orchestrator credentials, or OpenCode passwords into prompts or documentation. Use your MCP client's secret storage.
</Warning>
