cloud-sandbox-executor
A robust MCP module facilitating secure, on-demand execution of both JavaScript and Python code within dedicated, ephemeral cloud execution environments. It incorporates intrinsic performance enhancements via intelligent session persistence, alongside resilient automatic management for operational timeouts and exception handling. This utility is engineered for maximal interoperability with the Claude AI Desktop interface.
Author

Leghis
Quick Info
Actions
Tags
CLOUD-SANDBOX-EXECUTOR
This is an MCP (Model Context Protocol) service wrapper utilizing the E2B execution engine to run arbitrary code within isolated, cloud-hosted sandbox instances, specifically optimized for integration with Claude AI Desktop.
Core Features
- Secure execution capability for JS and Python scripting within remote cloud resources.
- Integrated file system operations (secure file transfer, directory listing, content retrieval).
- Performance acceleration achieved through smart reuse and recycling of sandbox execution contexts.
- Automated mechanisms for gracefully managing execution deadlines (timeouts) and runtime errors.
- Full protocol compatibility for seamless operation with the Claude AI Desktop client.
Prerequisites for Deployment
- A current Node.js runtime environment (version 16 or newer).
- A valid E2B access key (obtainable from [e2b.dev]).
- The Claude AI Desktop application installed.
Installation Procedures
Deployment via Smithery (Automated)
To deploy smart-e2b to your Claude Desktop environment via the Smithery registry:
bash npx -y @smithery/cli install @Leghis/smart-e2b --client claude
Manual Installation
Execute one of the following commands for direct installation via NPM:
bash
Global installation from the public registry
npm install -g smart-e2b
OR installation directly from the source repository
npm install -g git+https://github.com/Leghis/smart-e2b.git
Configuration within Claude AI Desktop
- Launch the Claude AI Desktop application.
- Navigate to Settings > Developer Tab > Modify Configuration.
- Inject the subsequent configuration object into your
claude_desktop_config.jsonfile:
{ "mcpServers": { "smart-e2b": { "command": "npx", "args": ["-y", "smart-e2b"], "env": { "E2B_API_KEY": "" } } } }
- Restart Claude AI Desktop to finalize the integration.
Operational Usage Guide
Once configuration is complete, the SMART-E2B toolset will be accessible within your active conversations in Claude AI Desktop.
Available Tool Set
- executeJavaScript: Runs provided JavaScript code inside the secure cloud environment.
- executePython: Executes supplied Python code within the secure cloud environment.
- uploadFile: Transfers a local file into the active sandbox workspace.
- listFiles: Retrieves a manifest of files residing in a specified sandbox directory path.
- readFile: Fetches and returns the textual contents of a designated file within the sandbox.
Operational Demonstrations
Illustrative examples detailing invocation via Claude AI Desktop:
JavaScript Code Execution Sample
Initiate execution for the following JavaScript logic:
function fibonacci(n) { if (n <= 1) return n; return fibonacci(n-1) + fibonacci(n-2); }
console.log(fibonacci(10));
Python Data Analysis Sample
Could you process this Python script to perform a data assessment?
import numpy as np import matplotlib.pyplot as plt
Synthesize normally distributed values
data = np.random.normal(0, 1, 1000)
Compute descriptive metrics
mean = np.mean(data) std = np.std(data)
print(f"Mean Value: {mean:.4f}") print(f"Standard Deviation: {std:.4f}")
Generate and save the visualization file
plt.hist(data, bins=30) plt.title('Normal Distribution Profile') plt.savefig('histogram.png')
Development and Contribution
Guidelines for cloning, modifying, and testing the source repository:
bash
Obtain a local copy of the repository
git clone https://github.com/Leghis/smart-e2b.git cd smart-e2b
Install necessary project dependencies
npm install
Compile the source code
npm run build
Execute local tests/run the service
npm start
Licensing Information
This project is distributed under the MIT License.
WIKIPEDIA: Cloud computing is "a paradigm for enabling network access to a scalable and elastic pool of shareable physical or virtual resources with self-service provisioning and administration on-demand," according to ISO. It is commonly referred to as "the cloud".
== Characteristics == In 2011, the National Institute of Standards and Technology (NIST) identified five "essential characteristics" for cloud systems. Below are the exact definitions according to NIST:
On-demand self-service: "A consumer can unilaterally provision computing capabilities, such as server time and network storage, as needed automatically without requiring human interaction with each service provider." Broad network access: "Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, tablets, laptops, and workstations)." Resource pooling: " The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand." Rapid elasticity: "Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly outward and inward commensurate with demand. To the consumer, the capabilities available for provisioning often appear unlimited and can be appropriated in any quantity at any time." Measured service: "Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency for both the provider and consumer of the utilized service. By 2023, the International Organization for Standardization (ISO) had expanded and refined the list.
== History ==
The history of cloud computing extends to the 1960s, with the initial concepts of time-sharing becoming popularized via remote job entry (RJE). The "data center" model, where users submitted jobs to operators to run on mainframes, was predominantly used during this era. This was a time of exploration and experimentation with ways to make large-scale computing power available to more users through time-sharing, optimizing the infrastructure, platform, and applications, and increasing efficiency for end users. The "cloud" metaphor for virtualized services dates to 1994, when it was used by General Magic for the universe of "places" that mobile agents in the Telescript environment could "go". The metaphor is credited to David Hoffman, a General Magic communications specialist, based on its long-standing use in networking and telecom. The expression cloud computing became more widely known in 1996 when Compaq Computer Corporation drew up a business plan for future computing and the Internet. The company's ambition was to superch
