- Home
- MCP servers
- Code Execution
Code Execution
- python
13
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"sjtu-sai-agents-mcp_sandbox": {
"command": "python",
"args": [
"api_server.py"
]
}
}
}You can run a basic code execution server designed to support lightweight code execution workflows. It provides a simple API and a deployment flow to bring the server up locally for testing, experiments, or integration demonstrations. This setup includes a minimal API proxy for search/model services and a deployment script to start the MCP server in a development environment. Note that this is a basic implementation without full virtualization or safety protections, so it’s advised to use containers if you need stronger isolation.
How to use
Send code to the server through the standard execute endpoint exposed by the MCP server. You submit your code payload to the server, and it runs the code and returns the results. You can benchmark performance to understand latency and throughput under your expected load. Interactions are designed for practical experimentation and local testing with an MCP client.
You can trigger execution by sending a POST request to the execution endpoint with your code. The server is designed for straightforward usage patterns suitable for rapid iteration and prototyping.
How to install
Prerequisites: you need Python and a functioning Python package environment. You also require a shell to run the setup and deployment scripts.
- Install Python dependencies
pip install -r requirements.txt
-
Prepare environment for the API proxy and MCP server deployment
-
Start the API proxy server
cd api_proxy
python api_server.py
- Deploy the MCP server
cd MCP
bash deploy_server.sh
Security and notes
This is a basic code execution server without virtualization or safety protections. For added security, consider running it within containment such as Docker or Apptainer containers as appropriate for your workload.
Available tools
network_search
A simple network search tool integrated with the server to proxy search-related services and model APIs.