Skip to content

Examples

Use these examples when you want a runnable starting point for the main library adoption paths.

Terminal window
npm install
npm run build
npm run examples
ExampleWhat it showsWhen to start here
execbox-basic.tsResolve a provider and execute guest code with QuickJS.You want the smallest end-to-end example.
execbox-worker.tsRun the same provider flow with QuickJS hosted in a worker thread.You want QuickJS off the main thread without leaving the process.
execbox-mcp-provider.tsWrap MCP tools into a provider and execute against them.You want guest code to call upstream MCP tools as code.
execbox-mcp-server.tsExpose mcp_search_tools, mcp_execute_code, and mcp_code.You want downstream MCP clients to execute code against a wrapped tool namespace.