by kenforthewin
1 subcomments
- Similar project: https://github.com/aberemia24/code-executor-MCP
And the original Anthropic post that inspired both: https://www.anthropic.com/engineering/code-execution-with-mc...
- This is very interesting. So it's an MCP server that connects to what is effectively a sandboxed MCP "hub". This is a clever middle ground between using dozens of context-munching MCP servers and just giving the agent access to your command line.
One question: why is Deno used? I thought that it was a JavaScript runtime. Can pctx only run sandboxed JavaScript code? If so, what do you do if you need the agent to run a Python script? If not, I don't understand how using a sandboxed JavaScript runtime allows you to sandbox other things.
by orliesaurus
1 subcomments
- i love seeing experiments that make this stuff run locally… bridging an MCP client into a Deno sandbox feels like a natural step if you want the same ergonomics offline.
ALSO there's a bunch of interesting questions around security and permission models when code is pulled on demand. Running arbitrary tools in a sandbox is neat, BUT you still need to think about what those tools can access… environment variables, network, local file system… limiting that scope could make these experiments more viable for larger teams.
i'd be curious to see benchmarks for cold starts and memory usage in this model… as well as patterns for caching compiled tools so they aren't reloaded every time. Discovering tools on demand is one thing, making them feel instantaneous is another. HOWEVER it's exciting to see folks pushing on this area and sharing their work.
- Oh that’s great! I have been experimenting a similar approach with WASM, I convert MCP tools into Typescript files and expose a single tool to run JS at runtime.
https://github.com/buremba/1mcp
- Thank you! Looks interesting and I was thinking of something similar recently. I'm sure there are zillions of use cases for this, it'd be helpful to have a few of them explained on the front page
> pctx optimizes this communication by presenting MCP servers as code APIs
Would be nice to have examples of how this is reduced, if some information was lost in the process and what the tradeoff is
by nsypteras
2 subcomments
- Congrats on launching! One immediate thought is that people will always be wary of running LLM-generated code on their machines even if it's sandboxed. Is one of the future business cases for this to host a remote execution environment that pctx can call out to rather than running the code locally?
- This is interesting. Also "Discover tools on-demand". Are there any stats or estimates how many tools an LLM / agent could handle with this approach vs. loading them all into context as MCP tools?
- I'm even more excited for the sandboxes than I am for the "code mode".
Someone please build this with lightweight containers so it's not limited to JS services
by daralthus
1 subcomments
- File system access is a must tho, that's where half the power of coding agents come from: efficiently managing context files.
by randomoctopus
1 subcomments
- Very interesting! Does this support dynamic bindings like Cloudflare Workers or what would be the mechanism to inject dependencies?
by Andrew-Tate
0 subcomment
- [dead]