MCP server (embedded in the CLI)
Reoclo speaks the Model Context Protocol in two ways: a hosted server at https://mcp.reoclo.com/mcp, and a local server embedded in the CLI. Both expose the same tenant-scoped tools with the same permissions and audit trail.
Hosted server (remote connector)
Section titled “Hosted server (remote connector)”Point a remote MCP client at https://mcp.reoclo.com/mcp. The server uses OAuth: the client identifies itself automatically (dynamic registration, or a client ID metadata document URL), then sends you through the Reoclo login and consent flow, where you select the organizations to grant.
In Claude, open Settings → Connectors → Add custom connector and enter the URL. In other MCP clients, add a remote server with Streamable HTTP transport and the same URL. No API key or manual client registration is needed.
The hosted server holds no credentials. It forwards each tool call to the Reoclo API with your own OAuth token, so your role and organization grants apply unchanged.
Working across organizations
Section titled “Working across organizations”The hosted server can act on every organization you selected when you authorized the connector. It never assumes one: every tool call names its organization.
- Call
whoami. Theaccessible_tenantslist shows each organization’sslugandid. - Pass
organization(the slug or the id) on every other tool call, for examplelist_serverswithorganization: "dortdash".
If a call omits organization, the tool returns an error that tells you to call whoami. If you name an organization the connector was not authorized for, re-authorize the Reoclo connector and select it during consent.
The local server (reoclo mcp) works the same way when nothing binds it to an organization: every tool takes organization (the slug), and whoami lists the ones you can act on. When reoclo init, --org or $REOCLO_ORG binds it to one, it uses that organization for the life of the process and its tools take no organization argument. Before CLI 0.113.0 an unbound reoclo mcp exited at start, which MCP clients show as a closed connection. The tunnel tools that need an organization, open_tunnel for an ad-hoc tunnel and save_tunnel for a tunnel to a server, take an optional organization slug in that mode (CLI 0.114.0). Before it they answered “tunnels need an organization”.
When nobody is signed in, reoclo mcp still starts, from CLI 0.114.0. Every tool, whoami included, then answers with a tool error that tells the person to run reoclo login in a terminal and restart the server; the guide tools keep working. Before that the process exited, which MCP clients show as a closed connection.
Local server (CLI, stdio)
Section titled “Local server (CLI, stdio)”Running reoclo mcp starts the server over stdio. It uses the OAuth credentials from your active CLI profile (populated by reoclo login). There are no API keys to manage.
Quick start
Section titled “Quick start”reoclo loginreoclo mcpThe server reads MCP requests from stdin and writes responses to stdout.
Editor configuration
Section titled “Editor configuration”The full set of editor-specific snippets lives in the MCP Server Setup guide. The common shape is:
{ "mcpServers": { "reoclo": { "command": "npx", "args": ["-y", "@reoclo/cli", "mcp"] } }}If you have the CLI installed globally (npm i -g @reoclo/cli), you can use:
{ "mcpServers": { "reoclo": { "command": "reoclo", "args": ["mcp"] } }}Claude Code
Section titled “Claude Code”claude mcp add reoclo -- npx -y @reoclo/cli mcpProfiles
Section titled “Profiles”The server uses your active profile by default. To target a different tenant from a specific editor without changing the global default:
reoclo mcp --profile stagingOr set REOCLO_PROFILE in the editor’s env block.
Tools available
Section titled “Tools available”reoclo mcp exposes tenant-scoped tools for servers, applications, deployments, domains, logs, monitors, status pages, dashboards, and scheduled operations. The visible tool set is filtered by the OAuth-authenticated user’s role. See MCP Server Setup for the full catalog.
Tunnel tools
Section titled “Tunnel tools”The local server also exposes five tools that drive the tunnel daemon on your machine. The hosted server does not have them, because it cannot reach your machine. They need CLI 0.101.0 or newer.
| Tool | What it does |
|---|---|
list_local_tunnels | Lists saved and ad-hoc tunnels with state, endpoint or URL, expiry, the transport path (relay or tailscale) and any tailnet share. |
open_tunnel | Brings up a saved tunnel by name, or opens an ad-hoc forward tunnel to server and target, with kind (tcp or udp) and ttl_minutes (default 60, at most 480). Waits up to 30 seconds for the connection. Returns the endpoint, the CA path for an HTTPS tunnel and the expiry. |
close_tunnel | Brings a saved tunnel down, or ends an ad-hoc one. |
tunnel_status | Returns one tunnel’s state, the reason and suggested action when it is not working, and its traffic. |
save_tunnel | Saves a tunnel, or changes the saved tunnel of the same name, and brings it up. Pass via (reoclo, tailscale or auto) and tailnet_host to use the Tailscale transport. |
An ad-hoc tunnel listens on a free port on 127.0.0.1. open_tunnel returns it as endpoint (http://127.0.0.1:<port>, or udp://127.0.0.1:<port>) and as address (127.0.0.1:<port>). It closes after its time to live and never touches your hosts file. See Ad-hoc tunnels.
The tools act on the profile and organization the server runs under. Pass --org, set $REOCLO_ORG or add a .reoclo file, as for any other command. A server with no organization bound takes an optional organization argument on open_tunnel and save_tunnel instead. The first tunnel tool call starts the daemon when it is not running.
Approvals
Section titled “Approvals”An agent needs a person’s approval to save, edit or bring up a reverse tunnel or a tunnel bound on all interfaces, to add, change or remove a hostname, and to trust the local CA. Sharing a tunnel on the tailnet and stopping a share need approval as well. When a call needs approval, the tool waits up to 60 seconds. If nobody answers, it returns pending_approval with an id, and the agent reports that to you. You answer with reoclo tunnel approvals, approve <id> or deny <id>. See Approvals for the full rules, and for how to turn them off.
If a tool fails because the sign-in expired, the result tells the agent to ask you to run reoclo login.
Guides
Section titled “Guides”Both servers serve the reoclo agent skills as guides, so an agent asks the server how to drive Reoclo instead of reading copies installed in your repository:
| Tool or prompt | Returns |
|---|---|
list_guides | Each guide’s name, description and section titles. |
get_guide | One guide (name), or one section of it (name plus section, matched without regard to case). |
Prompts reoclo-cli-usage, reoclo-github-actions | The same guides, for clients that offer MCP prompts as commands. |
The server’s instructions, sent when a client connects, tell the agent to read the matching guide before a first Reoclo task. They also say to sign in again only after a tool fails on authentication: sessions refresh on their own. The local server carries the guides as of its CLI release (0.94.0 and later); the hosted server updates with each deploy.
Staying signed in
Section titled “Staying signed in”The local server refreshes its session for as long as it runs. That holds under --org too: the CLI mints a new token for that organization from your profile’s session before the old one expires. Run reoclo login only when a tool reports an authentication failure.
Machine-readable manifest
Section titled “Machine-readable manifest”A server manifest in the MCP registry server.json format is published at https://reoclo.com/.well-known/mcp.json. Agent tooling can read it to discover the hosted endpoint (remotes), the npm package name, the transports, and the launch arguments without parsing this page.