Ask HN:有人在自己的 MCP 服务器上提供代码执行环境吗?
1 分•作者: steadyelk•5 个月前
我构建了一个 MCP(主控程序)来处理我所有的可穿戴设备数据,它非常有用,但如果没有编写自身程序的能力,该代理能够回答的问题类型就受到了限制。单个可穿戴设备数据流在 1 小时的活动中可以包含 2 万个数据点(GPS、气压计、温度和心率的采样频率为 1Hz),而典型的 MCP 设计要么由 MCP 作者手动定义聚合方法(例如,get_average_heartrate),要么 LLM(大型语言模型)必须在其上下文中保存大型数据表示。<p>我最近给了 MCP 工具创建和访问 iPython 内核的权限,它可以在会话创建之前指定要下载的软件包,并且可以通过编写自己的代码来操作数据的副本。<p>确保数据保密以及工具/代码安全是耗时最多的部分,我想知道大家是否在使用任何工具来简化这个过程。我知道有像 e2b.dev 这样的工具提供代码沙盒,但我感觉其他提供数据的 MCP 也会遇到这个问题,所以一定有一些我遗漏的解决方案/架构设计。
查看原文
I built an MCP to handle all my wearables data, and it was super helpful, but the types of questions that agent could answer without access to write its own programs was limited. A single wearables stream can have 20k data points for 1 hr of activity (1Hz across GPS, barometer, temperature, and HR), and the typical MCP design either has the MCP author manually defining the aggregation methods (e.g., get_average_heartrate) or the LLM has to hold in it's context the large data representation.<p>I recently gave the MCP tools to create and access an iPython kernel, where it has the ability to specify what package to download before the session is created, and it can manipulate a copy of the data by writing its own code.<p>Making sure data was kept private and tools / code were secure was what took most of the time, and I'm wondering if there are any tools folks are using to make this easier. I know there are tools like e2b.dev which provide code sandboxes, but I feel like other data providing MCPs will run into this issue, so there must be some solution / architecture design I'm missing.