cloud2local

cloud2local is a skill for Claude Code, Codex from plhys/Cloud2Local. It costs 46 tokens per session (1,402 once invoked), scanned A, original, MIT.

A connection guide for exposing a local Cloud2Local MCP server to cloud-based AI agents. It covers the public address, authentication headers, ports, exposure status, and security limits.

In plain words
What is it for?
Use it when configuring or troubleshooting cloud agents that need to connect to a local MCP server through Cloud2Local.
Why use it?
It prevents connection mistakes, such as using the local port instead of the public port, and helps diagnose why a cloud agent cannot reach the local server.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/plhys/cloud2local/cloud-to-local
Any agent
npx skills add plhys/Cloud2Local --skill cloud-to-local
Clone the repo
git clone --depth 1 https://github.com/plhys/Cloud2Local

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cloud2local

README.md
[![agentmods](https://agentmods.dev/badge/skills/plhys/cloud2local/cloud-to-local.svg)](https://agentmods.dev/skills/plhys/cloud2local/cloud-to-local)
Your own site
<a href="https://agentmods.dev/skills/plhys/cloud2local/cloud-to-local"><img src="https://agentmods.dev/badge/skills/plhys/cloud2local/cloud-to-local.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,402 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00046 $0.01402
Opus 5 $0.00023 $0.00701
Sonnet 5 $0.00009 $0.00280
Haiku 4.5 $0.00005 $0.00140

Measured 3d ago against content hash 7ce742773f8e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloud2local scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://127.0.0.1:8000/health
docs/cloud-to-local/SKILL.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cloud2Local 云端 MCP 接入

把本机 Cloud2Local 的 MCP Server 暴露给云端智能体:云端填公网 URL + Token 即可操作本机(受 fileRoot / 命令白名单约束)。

职责边界(别写歪)

  • Skill 只负责「怎么连上」:公网 URL、Token/headers、端口、暴露状态、排障、安全边界。
  • Skill 不负责「能干嘛」的工具清单:连上 MCP 后,客户端会走协议的 list_tools 自动发现工具与参数。
  • 不要在 Skill 里维护长篇 tools 目录(会过期、和协议重复)。最多一句话说明用途。
  • 本机已在跑的 Agent 不需要再绕这个 MCP;这套给云端/远程 Agent 用。

关键:两个端口别混

名称 默认 谁用 说明
本机端口 localPort 8000 本机 MCP 本机监听;云端不要直连
公网端口 remotePort 18000 云端智能体 公网入口;服务器必须放行

映射:

云端 http://PUBLIC_HOST:18000/mcp  -->  本机 127.0.0.1:8000/mcp

何时使用

  • 用户要让云端 Agent / WorkBuddy / Cursor 连本机 MCP(Cloud2Local)
  • 用户问云端 MCP URL、Token、headers 怎么填
  • 用户说「MCP 本机能用,云端连不上」
  • 用户问该用 8000 还是 18000

前置条件

  1. 本机 Cloud2Local 外网通道已就绪(应用首页已连接)
  2. MCP 页 Server 已启动(本机 8000 有服务)
  3. MCP 页暴露状态显示 已就绪
  4. 云端地址端口是 公网端口(默认 18000),不是本机 8000
  5. 已设置 Token(云端强烈建议)

接入地址规则

本机:

http://127.0.0.1:<localPort>/mcp

云端(优先):

http://<publicHost>:<remotePort>/mcp

旧客户端:

http://<publicHost>:<remotePort>/sse

字段来源:

字段 来源
localPort MCP「本机端口」,默认 8000
remotePort MCP「公网端口」,默认 180000 才表示等于 localPort
publicHost MCP「公网主机」;空则用应用配置页的服务器地址
proxy name 自动代理固定名 mcp-auto-expose

Token / Header

有 Token 时,请求必须带头之一:

Authorization: Bearer <token>

或:

X-MCP-Token: <token>

也兼容 query:?token=<token>(不推荐,易泄露)。

云端客户端配置模板

{
  "mcpServers": {
    "cloud2local": {
      "url": "http://PUBLIC_HOST:18000/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

WorkBuddy 自定义 MCP(~/.workbuddy/mcp.json)常见形态同上(key 名可自定,核心是 url + headers)。

若客户端只认 SSE,把路径改成 /sse 即可。

详细模板见 references/client-configs.md

本机侧标准操作

  1. 打开 Cloud2Local,确认外网通道在线
  2. MCP 页设置:
    • 自动公网暴露:开
    • 本机端口:8000(本机用)
    • 公网端口:18000(云端用)
    • 公网主机:有域名就填;否则留空
    • Token:必填(云端)
    • fileRoot / 允许命令:尽量收紧
  3. 保存配置 → 启动 Server
  4. 确认状态:
    • Server 运行中
    • 公网暴露 = 已就绪
    • 云端地址端口是 18000(不是 8000)
  5. 点「复制云端客户端配置」给云端使用

Read the full file on GitHub · 165 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 165 lines · 46 tokens per session scan A 7ce742773f8e

Subscribe to this mod's changes

cloud2local is a skill published in the GitHub repository plhys/Cloud2Local (0 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 1,402 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cloud-architect

Designs cloud architectures, creates migration plans, generates cost optimization recommendations, and produces disaster recovery strategies across AWS, Azure, and GCP. Use when designing cloud architectures, planning migrations, or optimizing multi-cloud deployments. Invoke for Well-Architected Framework, cost…

Jeffallan/claude-skills · 71 tokens

rule

Skill "rule" from x-cmd/x-cmd, covering rule — rules to rule, 核心命令, 规则文件格式, 示例 and 验证规则文件格式.

x-cmd/x-cmd · 0 tokens

cve

Look up CVE records via x cve — cached, zero-API-key, daily xz TSV. Load for cve, vulnerability id, kev, epss, nvd, cvelist, or security advisory.

x-cmd/x-cmd · 49 tokens

azmon-mirroredcatalogs-operations-cli

Brings Azure Monitor, Application Insights, and Log Analytics telemetry into Fabric as Eventhouse external delta tables and correlates it with business data. Use to onboard observability data, judge whether latency or availability affected revenue, or build a Real-Time dashboard and Operations Agent over it.

microsoft/skills-for-fabric · 66 tokens

atmos-auth

Authentication and identity management: providers (SSO/SAML/OIDC/GCP/Atmos Pro), identities, keyring, identity chaining, login/exec/shell/console, and github/sts for private GitHub access.

cloudposse/atmos · 48 tokens

terraform-search-import

Discover existing cloud resources using Terraform Search queries and bulk import them into Terraform management. Use when bringing unmanaged infrastructure under Terraform control, auditing cloud resources, or migrating to IaC.

hashicorp/agent-skills · 39 tokens