Skip to content
API
On this pageServer URL

MCP

Connect an AI agent such as Claude Code or Codex to MyRemotely through MCP.

MyRemotely has an MCP server. MCP (Model Context Protocol) lets an AI agent, such as Claude Code or Codex, use MyRemotely tools for you. The agent signs in as you. It can do only what your role and your consent allow.

The MCP server is different from the /v1 API. The /v1 API is read-only and uses an organization API key. MCP uses your own sign-in, and some MCP tools can change data after you approve the change.

Server URL

Use this URL in your agent:

text
https://mcp.myremotely.ai/mcp
  • Transport: Streamable HTTP.

  • Sign-in: OAuth with dynamic client registration. You do not need an API key.

  • Use the mcp.myremotely.ai host. Do not use https://app.myremotely.ai/api/mcp. That address answers, but MCP clients refuse its sign-in data, so the connection fails.

Before you start

  1. Sign in to MyRemotely.

  2. Open Settings → MCP.

  3. Read the line "Your role can use N MyRemotely tools through MCP." N is the number of tools your agent gets.

  4. Select Copy prompt.

You can paste this prompt into any agent. It tells the agent the server URL, the sign-in address, the scopes and your tool names. The agent then adds the server itself. If the page says that MCP access is not available, ask your MyRemotely administrator.

Connect Claude Code

  1. Add the server:

    sh
    claude mcp add --transport http myremotely https://mcp.myremotely.ai/mcp
  2. Start Claude Code and run /mcp.

  3. Select myremotely, then Authenticate. Your browser opens the MyRemotely sign-in page.

  4. Sign in if MyRemotely asks you to. Check the consent page, then select Allow access.

  5. In /mcp, make sure that myremotely shows as connected with N tools.

Connect Codex

  1. Add the server to ~/.codex/config.toml. Use a free local port in both callback fields:

    toml
    [mcp_servers.myremotely]
    url = "https://mcp.myremotely.ai/mcp"
    
    [mcp_servers.myremotely.oauth]
    callback_url = "http://localhost:5555/callback"
    callback_port = 5555
  2. Sign in with the scopes from the Scopes: line of the copied prompt. Put commas between the scopes, not spaces:

    sh
    codex mcp login myremotely --oauth-client-registration dcr --scopes <scope,scope,…,offline_access>
  3. Make sure that the command shows Successfully logged in. If the browser tab closes too soon, read the result in the terminal.

  4. Run codex mcp list. Start a new chat, run /mcp and make sure that myremotely has N tools.

Use localhost in the callback URL, not 127.0.0.1. MyRemotely refuses a return address on 127.0.0.1.

The agent signs you in with OAuth. Your browser opens https://app.myremotely.ai. You sign in there, never in the agent. Do not give your password to an agent.

The consent page shows:

  • your account and your organization;

  • one plain-words line for each scope that the agent asks for;

  • offline_access: the agent can get a new short-lived token until you revoke access;

  • the client ID and a localhost return address.

The client name always shows as Unknown client. MyRemotely does not verify client names.

Endpoints

URLTools
https://mcp.myremotely.ai/mcpOne tool for each MyRemotely action that you can use. Use this URL with Claude Code: Claude Code loads long tool lists itself.
https://mcp.myremotely.ai/mcp/compactThree tools: search_tools, describe_tool and call_tool. They reach the same actions. Use this URL if your agent cannot hold many tools.

Tools

  • A tool name is a MyRemotely action name with a dot, for example units.search or units.read_day_code.

  • Some agents show the dot as an underscore: units_search. Both names are the same tool.

  • The agent picks a tool by its description.

  • The tools that you get depend on the permissions of your role and on the scopes that you allowed. Settings → MCP shows how many tools your role can use.

  • A tool that you are not allowed to use does not exist for your agent. A call to it answers Tool <name> not found, not "forbidden".

  • A tool can only read the data of your own organization.

  • The agent reports a door code or PIN only when a tool returns one.

Scopes

There is one scope for each permission. A scope has the form <resource>:<verb>, for example units:read, locks:write, tours:read or messages:send_sms. The consent page shows each scope in plain words.

A tool runs only when your role has its permission and your consent includes its scope. Add offline_access if your agent can refresh tokens.

An older connection can have only the scopes units:read and day-code:read. It sees only a few unit tools. To get all your tools, remove the connection in Settings → MCP and connect again with the copied prompt.

Approval for changes

Some tools change data, for example a lock write or a role change. Before such a tool runs, MyRemotely asks you to approve that exact call:

  1. The server asks the agent for input (input_required) with a yes/no form. The form shows the action and its arguments.

  2. If you select yes, the tool runs one time, with the same arguments.

  3. If you select no, the tool answers APPROVAL_DENIED and nothing changes.

Some agents cannot show this form. Then the tool answers APPROVAL_REQUIRED immediately, and nothing changes. This is the safe result. It is not an error in MyRemotely.

If a call is refused, the agent must tell you. It must not look for a different way to make the change.

Rate limit

Each person can make 60 tool calls in one minute and 600 tool calls in one hour. The limit counts calls to /mcp and /mcp/compact together. Over the limit, the call answers RATE_LIMITED with the number of seconds to wait, and the tool does not run.

No session

The server keeps no session. Each request stands alone.

  • The server does not send an Mcp-Session-Id header, and it ignores one on a request.

  • GET and DELETE on the MCP URL answer 405.

Revoke access

  1. Open Settings → MCP.

  2. Find the client ID of the agent under Connected agents.

  3. Select Revoke access and confirm.

The next call from that agent fails with 401. If the agent asks you to sign in again, do not do it unless you want to give access again.

To remove the server from your agent, run claude mcp remove myremotely or codex mcp remove myremotely. This does not revoke access. Only Revoke access in Settings does.

Common answers

AnswerMeaning
401The token is missing, expired or revoked. Sign in again from the agent.
Tool <name> not foundYour role or your consent does not allow this tool.
APPROVAL_DENIEDYou declined the approval form. Nothing changed.
APPROVAL_REQUIREDThe agent cannot show the approval form. Nothing changed.
RATE_LIMITEDToo many calls. Wait the number of seconds in the answer.

Last updated Sep 28, 2026