reoclo mcp
reoclo mcp [options]Starts the Model Context Protocol server embedded in the CLI binary. Reads MCP requests from stdin and writes responses to stdout. Uses OAuth credentials from your active CLI profile (populated by reoclo login). No API key required.
Options
Section titled “Options”| Flag | Default | Description |
|---|---|---|
--profile <name> | active profile | Use a specific profile’s stored credentials. |
REOCLO_PROFILE is honored as an env-var equivalent of --profile.
The global --org <slug>, $REOCLO_ORG and a .reoclo file bind the server to one organization. Without a binding, every tool takes an organization argument instead, and whoami lists the organizations you can act on. See Working across organizations.
Examples
Section titled “Examples”Run the server with the active profile:
reoclo mcpUse a non-default profile (handy when an editor’s MCP config targets a different tenant):
reoclo mcp --profile stagingEditor configuration
Section titled “Editor configuration”Add this to your editor’s MCP config (.mcp.json, .cursor/mcp.json, .vscode/mcp.json, and so on):
{ "mcpServers": { "reoclo": { "command": "npx", "args": ["-y", "@reoclo/cli", "mcp"] } }}If @reoclo/cli is installed globally, you can drop the npx -y wrapper:
{ "mcpServers": { "reoclo": { "command": "reoclo", "args": ["mcp"] } }}To target a specific profile from the editor config, add env:
{ "mcpServers": { "reoclo": { "command": "npx", "args": ["-y", "@reoclo/cli", "mcp"], "env": { "REOCLO_PROFILE": "staging" } } }}See MCP server (embedded in the CLI) and MCP Server Setup for editor-by-editor instructions and the full tool catalog.
Register with coding agents
Section titled “Register with coding agents”reoclo mcp agentsreoclo mcp install --agent <claude-code|codex|all> [--command <path>]reoclo mcp uninstall --agent <claude-code|codex|all>From CLI 0.118.0 the CLI writes the agent configuration for you. reoclo mcp agents lists the coding agents it finds on this Mac and whether Reoclo is registered in each. Add -o json for scripts.
| Agent | Config file |
|---|---|
claude-code | ~/.claude.json |
codex | ~/.codex/config.toml |
--agent all changes every agent found. The agent runs <command> mcp over stdio, where <command> is the path you ran reoclo by, so a link such as ~/.local/bin/reoclo keeps working across updates. --command <path> overrides it. The entry carries no --org, so the server starts unbound and every tool takes an organization argument.
Install is idempotent and updates an existing reoclo entry in place. Reoclo changes only its own entry and replaces the file atomically. The first change keeps a copy as <file>.reoclo-backup, and a config Reoclo cannot parse is reported and left untouched. uninstall removes only the reoclo entry.
The Reoclo desktop app runs these commands from its Connect your agents step.
reoclo mcp install --agent claude-codereoclo mcp uninstall --agent allTools available
Section titled “Tools available”The server exposes tenant-scoped tools for servers, applications, deployments, domains, logs, monitors, status pages, and scheduled operations. Tool visibility is filtered by the OAuth-authenticated user’s tenant role.
From CLI 0.94.0 it also serves the reoclo agent skills as guides: list_guides, get_guide, and one MCP prompt per guide. See Guides.
From CLI 0.101.0 it also exposes five tunnel tools: list_local_tunnels, open_tunnel, close_tunnel, tunnel_status and save_tunnel. They drive the tunnel daemon on your machine, and some requests wait for your approval. See Tunnel tools.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | Server exited cleanly (e.g. client closed stdin) |
| 1 | Bootstrap failure |
| 2 | A credential in the environment is malformed (for example a wrong prefix in REOCLO_MACHINE_TOKEN) |
| 3 | Authentication failure while running (token refresh failed; re-run reoclo login). The server refreshes its own session, under --org too, so this means the session itself ended. From CLI 0.114.0 a missing sign-in at start does not exit: the server starts and each tool answers with a tool error that says to run reoclo login. |
| 7 | Control plane unreachable: DNS, connection refused, or timeout (CLI 0.55.0+; earlier report 1) |
Related
Section titled “Related”- MCP server overview: why this exists and how it integrates with the CLI
- MCP Server Setup: editor-by-editor instructions
- CLI Authentication:
reoclo loginand profile management