Provides tools for remote Python code execution and evaluation, enabling real-time sandbox testing and code assessment within a virtual lab environment.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Lab Virtual MCP Serverrun a python script to calculate the first 10 prime numbers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
execution in a secure and scalable lab setup.
โ๏ธ Lab Virtual MCP Server (Execute Code Remotely via Claude AI) Create a virtual lab for users to run custom code remotely using the Model Context Protocol (MCP) and integrate with Claude AI or other clients.
๐ GitHub Repo
๐ This repo has moved to base/base-mcp
๐ What This Lab Server Does ๐ง Enables remote Python code execution through cline AI
๐งช Supports real-time lab scenarios (code evaluation, sandbox testing, etc.)
๐ Prerequisites Ensure you have the following on your system:
โ Python 3.10.11
โ pip (Python package manager)
โ fastmcp (to serve the MCP endpoint)
โ uv (virtual environment manager, via scoop or curl)
โ Access to Claude Desktop or Cursor or cline (for testing)
๐งฑ Installation Steps
Clone the MCP Server Repo
Set up Python Environment
cd McpSever_Remote_code_execution
Set Up Virtual Environment
Install Dependencies
Run the Server
You now have a remote code execution server listening for requests via MCP.
๐งช MCP Client Configuration For Claude Desktop / Cursor, update your mcp_config.json:
Beofre start Mcp set path
โ Available Tools (Prebuilt in MCP)
Tool Description execute_code Executes user-provided Python code
๐ก Recommendations for Lab Admins โ Add sandboxing logic to app.py if users can run arbitrary code.
โ Use Docker or subprocess isolation for safer execution (optional).
โ Monitor logs and set execution timeouts.