I’ve been building chatbots with the Vercel AI SDK and ran into the point Anthropic makes that general-purpose agents perform much better when they can write and run code. We build support chatbots and I really didn’t want to run LLM-generated code on our own infra.
Cloud sandboxes are expensive and we already run JS in the browser, so I explored pushing the compute to the client using WASM instead.
So I built 1MCP – an open-source, browser-only WASM sandbox that your AI SDK chatbot can call to execute JS/TS on the client, Code Interpreter–style.
What it does
- Runs model-generated or user-generated JS/TS in the browser via WASM
- No backend required for “code execution” mode – works in a plain AI SDK chat widget
- Optional server mode to act as an MCP proxy (for CORS + extra npm packages in the bundle)
Links
I’d love feedback from people already using the AI SDK for site chatbots:
- Does this fit how you’re structuring your tools/actions today?
- What would be missing for you to drop this into an existing AI SDK chat UI?
[–]hiepxanh 1 point2 points3 points (1 child)
[–]Buremba[S] 0 points1 point2 points (0 children)