返回首页
最新
大家好,
我想向大家展示我开发的这个应用,它是一个基于局域网的WebRTC婴儿监视器,可以通过WIFI将任何苹果设备连接在一起,这样你就可以把旧的iPad或iPhone变成婴儿监视器!
我对那些需要购买额外设备的可疑产品感到有些厌烦,这些产品可能会连接到中国的服务器,并在某个地方存储你的所有信息。
所以我想,如果没有服务器,我们可以直接使用现有的设备会怎么样呢?
我非常欢迎任何反馈!你需要两台苹果设备来测试,但模拟器也可以使用。
我是在阅读Cloudflare的《代码模式》文章后,构建了这个项目,并制作了自己的本地版本(链接如下)。
<p>与其进行MCP工具调用,LLM(大语言模型)直接针对自动生成的RPC客户端编写TypeScript代码。
// 请按照自述文件中的说明运行RPC服务器
<p><pre><code> mcp-rpc-runtime -r ./test-rpc -p 8080
</code></pre>
将带有类型导出的.ts文件放入:
// ./test-rpc/users.ts
export async function getUser(args: { id: number }): Promise<User> { ... }
<p>系统会生成一个类型化的客户端。LLM编写普通的TypeScript代码:
const [user, orders] = await Promise.all([
rpc.users.getUser({ id: 123 }),
rpc.orders.getHistory({ userId: 123 })
]);
<p>不需要MCP服务器。RPC运行时具有完整的系统访问权限,而LLM脚本在沙箱中运行,仅具有网络权限。
<p>原始本地代码模式: <a href="https://github.com/jx-codes/codemode-mcp" rel="nofollow">https://github.com/jx-codes/codemode-mcp</a>
运行时: <a href="https://github.com/jx-codes/mcp-rpc-runtime" rel="nofollow">https://github.com/jx-codes/mcp-rpc-runtime</a>
MCP桥接: <a href="https://github.com/jx-codes/mcp-rpc-bridge" rel="nofollow">https://github.com/jx-codes/mcp-rpc-bridge</a>
详细信息: <a href="https://jmcodes.tech/blog/mcp-rpc/" rel="nofollow">https://jmcodes.tech/blog/mcp-rpc/</a>