Code Execution Server
Integration used in related research projects including Xmaster and Browse Master for academic paper access
Recommended for containerized deployment to provide security and isolation for code execution
Provides Google Search capabilities through Serper's API service for web search functionality
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Code Execution Server
This repository provides a basic implementation of a code execution server, designed primarily for Xmaster (paper, code) and Browse Master (paper code). The full implementation is used in SciMaster.
Due to the proprietary nature of the full code, this repository only includes an open-source framework and the basic components required for code execution. It also includes a simple network search tool implementation.
โ ๏ธ Warning: This is a basic code execution server without virtualization or safety protections. For added security, consider running it within Docker or Apptainer containers as necessary.
๐ ๏ธ Setup
Environment
Clone this repository and navigate to the project directory and install the required dependencies:
cd mcp_sandbox/
pip install -r requirements.txtTools
setup the serper key in
configs/web_agent.jsonsetup the models' api key in
configs/llm_call.json
Related MCP server: mcp-run-isolated-python
๐ Deploy the Code Execution Server
Step 1: Start the API Server
We will first start the API server used by the tools. This API server proxies all search-related services, including:
Serper's Google Search Service
A series of Model APIs
Navigate to the api_proxy directory and start the API server:
cd api_proxy
python api_server.pyStep 2: Deploy the Server
Deploy the server by running the following script in the MCP directory:
cd MCP
bash deploy_server.sh๐ Usage
Sending a Request
To send a request to the server, use the following curl command:
curl -X POST "http://<your-server-url>/execute" \
-H "Content-Type: application/json" \
-d '{"code": "<your code here>"}'โก Benchmarking
For benchmarking, you can run the following command to test the server's performance:
bash benchmarking/pressure.sh 100 100 10 benchmarking/script.lua http://127.0.0.1:30008Example output:
Running 10s test @ http://127.0.0.1:30008/execute
100 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 50.21ms 47.15ms 296.96ms 53.20%
Req/Sec 24.13 13.58 130.00 54.99%
23185 requests in 10.10s, 4.27MB read
Requests/sec: 2295.61
Transfer/sec: 432.74KBTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
Related MCP Connectors
Beta code sandbox for agents. Run Python or JavaScript with no network and a 30 s timeout.
1Build Apps and run code in 30 languages โ sandboxed, with persistent sessions for agent loops.
Web search and page fetch for AI agents. Results come from a shared cache; cached calls cost less.
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides sandboxed code execution for AI agents with support for Python, JavaScript, and shell commands. Includes comprehensive safety features like destructive pattern blocking, timeout protection, and restricted file access for secure production use.35 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceEnables LLMs to execute Python code securely in a sandboxed environment. Supports configurable restrictions like no network access and returns results including files.1MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to securely execute Python and JavaScript code in sandboxed environments, with file management and package installation.755 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to safely execute Python, JavaScript, and Bash code in an isolated Docker sandbox with strict security constraints.1-