easynet.run · 全部问题场景

Mac mini 上的 Codex 刚写好一个功能,MacBook 上的 Claude 却不知道。

Mac mini 上的 Codex 刚帮你写好一套图片处理函数,模型和依赖也都调通了。你回到 MacBook,用 Claude 准备发布内容,它却不知道这项功能存在,又开始建议安装工具或重写代码。两边的工作都属于你,连接它们的那个人却仍然只能是你。

如果只是偶尔执行一次,SSH 或远程桌面就能解决;一段没有特殊依赖的代码,也可以直接同步过去。你真正想省掉的是反复介绍这件事:另一台机器有什么、处理什么、接受哪些输入、应该怎样调用。

例如,你已经调好了商品图抠图函数,希望在写商品介绍时顺手用它,而不是再下载一次模型。EasyRemote 的接入动作是在原函数上加 @node.register,并运行提供方进程;原来的图片处理代码不必重写。它解决的是函数接入,接下来还要把这个入口接到 MacBook 上的 Claude Code。

工具描述决定了它有没有机会被正确使用。只写一个内部函数名不够,还应说明它适合处理什么图片、需要什么格式、会返回什么结果。助手需要时可以根据这些信息选择;选择后是否允许执行,还要经过独立授权,不能因为看得见就默认用得了。

这里有一段尚未接通:当前 MCP bridge 在启动时读取 MacBook 本机的能力目录,Mac mini 上新发布的函数不会自动变成其中的直接工具。重新连接也只是重读目录;learn 导入描述,不会安装远程执行代理。下方命令可以连接 Claude Code 与 EasyNet,但不能单独完成这次跨设备抠图。

图片本身也需要一条明确路径。如果函数接收图片引用,就先让素材进入双方获准访问的位置,返回结果也提供调用端能读取的入口;不能把 MacBook 的本地路径直接当成 Mac mini 上的文件。接着在 MacBook 上提出一个普通图片任务,看 Claude 是否会选择这个工具、能否取回正确结果。最后让 Mac mini 离线一次,确认另一端会说明服务不可用,而不是继续等待或报告完成。

这条接入链真正完成的标准很具体:在 MacBook 附上一张商品图,Claude Code 调用 mini 上已有的函数,拿回能打开的透明 PNG,全程不重新安装模型。随附 AGENTS.md 会逐步检查这条链,缺少远端工具入口时就指出缺在哪里,不把“客户端已连接”当成图片已经处理成功。

  1. 01

    MacBook上的图片

    选择允许传给提供端的图片。

  2. 02

    Mac mini上的函数

    收到可访问的图片后运行现有模型。

  3. 03

    回到当前助手

    返回结果和可访问的输出位置。

先让图片能到达提供方,再调用处理函数。

在 MacBook 的 Claude Code 中接入 EasyNet

先确认 MacBook 的 Runtime 可响应,再在需要使用工具的项目中运行。EASYNET_CLI_PATH 要填写实际 CLI 绝对路径;add 会修改 Claude Code 的当前项目本地配置,需先确认,已有同名入口不要覆盖。本例是 Claude Code,不是 claude.ai 网页端。

Runtime 命令 · bash
easynet mcp status
# After approval, for a new local Claude Code entry:
claude mcp add --scope local --transport stdio easynet -- \
  "${EASYNET_CLI_PATH:?Set the actual absolute EasyNet CLI path}" mcp serve

预期结果:只完成客户端入口配置。用 Claude Code 的 /mcp 检查实际连接与工具;mcp status 的退出码为 0 也可能伴随 Runtime 未运行提示。找到工具、成功调用、Claude 主动选用要分别验证。

逐步验证它是否真的知道这个功能

英文 AGENTS.md 要求使用已有函数和获准样图,检查真实目录、调用与输出,再用不点名工具的任务测试选择。它不会安装新模型或假装已经生成图片。

下载 AGENTS.md
阅读完整交接任务
# Let Claude Code use an existing provider function

The user already has a working function on a provider such as a Mac mini and
wants Claude Code on their MacBook to reuse it. Do not install another model,
copy the provider's environment, or build a second implementation merely to
make this demonstration pass. Do not create a second device requirement when
the actual work is on one device.

This guide covers Claude Code's local stdio MCP connection, not claude.ai or
Claude Desktop. Official client setup reference:
https://code.claude.com/docs/en/mcp

## Establish the real function before changing client configuration

Ask for the provider's existing code or its version-matched function guide,
actual publication metadata, intended caller and approved test input. A proposed
JSON object with input_ref is not an implemented image reader. Confirm how the
provider reads the image and how the caller retrieves the output. A local
MacBook path does not name a file on the Mac mini.

Use an existing non-sensitive sample with a known local result. If the function
removes backgrounds, retain the original and its verified transparent PNG as
the comparison. Do not invent a successful image or install a new model without
approval. If no function or sample exists, report that missing prerequisite.

Confirm the provider Runtime and function are running and that the intended
caller is authorized. Do not borrow the provider's account or copy credentials.
Read installed CLI help. Publication, ability discovery and invocation are
separate checks; document each with actual results.

## Connect the MacBook client after approval

Run on the MacBook:

```bash
easynet mcp status
```

Inspect the status text: the current command may return exit 0 even when it
reports that the Runtime is not running. Do not treat exit status alone as
proof that tools can be served. Do not restart shared services automatically.

Read `claude mcp add --help`. In the project where the user wants this
connection, set EASYNET_CLI_PATH to the actual absolute installed CLI path.
Ask before adding client configuration. Check whether the name easynet is
already used, without dumping unrelated configuration or environment values.
If it exists, inspect that entry with the user's approval rather than replacing
it or adding duplicates. For a new approved entry:

```bash
claude mcp add --scope local --transport stdio easynet -- \
  "${EASYNET_CLI_PATH:?Set the actual absolute EasyNet CLI path}" mcp serve
```

This configures a local subprocess on the MacBook. It is not an HTTP endpoint
on the Mac mini. Remote execution still depends on EasyNet publication, routing
and authorization. The command writing a config entry is not a tool-call test.
Use Claude Code's `/mcp` UI to review connection status and the actual exposed
tools. Confirm client-specific permissions before running any tool or model.

The current EasyNet bridge constructs its tool list from a daemon catalogue
snapshot when the bridge starts. A list loaded before publication may be stale.
Reconnect this MCP entry with approval; do not restart the shared Runtime as a
shortcut. Do not assume a newly published remote ability appears automatically
as a direct tool. Inspect what this client actually sees and how that tool
routes to the intended provider. In the inspected source, EasyRemote publishes
on the provider locally, whereas the MCP bridge reads the consumer's local
host catalogue. Remote publication does not automatically add a direct MCP
tool. `learn`/`acquire` imports declarations, not an executable remote proxy;
do not offer it as a fix. A catalogue entry alone can lack a runtime binding.
Generic discovery can inspect advertised candidates but does not install them
as direct MCP tools. Verify the installed version's actual supported route;
if none exists, stop and report the missing integration. Do not invent tool
names or use a prompt to pretend the function is installed.

## Check three distinct outcomes

1. Tool visibility: record the actual tool name, description, input schema and
   identified provider or discovery route. Seeing an easynet server entry is
   not the same as seeing the required function. If it is absent, stop here and
   report publication/catalogue/refresh evidence without claiming discovery.
2. Explicit invocation: after authorization, call the observed interface once
   with the approved image. Obtain and inspect the actual output. Preserve a
   sanitized invocation reference when available. A success sentence or private
   provider path does not deliver an image to the MacBook.
3. Model selection: only after the first two pass and the user approves a model
   call, start a fresh task with the approved sample and ask for the image result
   without naming the tool. Observe whether Claude chooses the existing
   capability rather than rebuilding it. Do not preselect a tool and count that
   as autonomous discovery. No single trial guarantees future selection.

For the image example, a suitable request is: "Remove the background from the
approved product image I attached and give me a PNG with transparency. If the
required input or access is missing, tell me what you need before proceeding."
This is a proposed test prompt, not a record of a completed call.

Test a denied test identity and provider unavailability separately, with
approval. Stop only a demo process you own, not the user's shared Runtime.
No retries for unknown outcomes, no permission bypass and no fabricated output.

Report configuration written, bridge connected, target found, explicit call,
output retrieved, model selection and failure checks individually. This guide
does not claim these were already exercised on two real devices. If the exact
remote capability cannot be exposed through the installed MCP surface, report
the gap instead of silently replacing the task with a local copy.
接入时的检查项
  • 第二台物理设备能列出并调用目标能力。
  • 助手选择理由与能力描述相符,不靠预填工具名。
  • 撤去访问或停止提供方后不返回伪造成功。
源码与接入资料