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.
<img src="video/test.gif" alt="description" height="300" width="900" />
๐ GitHub Repo
<pre>
๐ฆ https://github.com/Nuvepro-Technologies-Pvt-Ltd/McpSever_Remote_code_execution.git
</pre>
๐ 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
1. Clone the MCP Server Repo
<pre>
git clone https://github.com/Nuvepro-Technologies-Pvt-Ltd/McpSever_Remote_code_execution.git
</pre>
2. Set up Python Environment
<pre>
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
</pre>
<pre>
scoop install python
</pre>
<pre>
scoop install uv
</pre>
cd McpSever_Remote_code_execution
3. Set Up Virtual Environment
<pre>
python -m venv .venv
</pre>
<pre>
.\.venv\Scripts\activate # Windows
</pre>
<pre>
source .venv/bin/activate # macOS/Linux
</pre>
4. Install Dependencies
<pre>
pip install fastmcp
</pre>
<pre>
pip install cryptography
</pre>
<pre>
pip install shelve
</pre>
5. Run the Server
<pre>
fastmcp run app.py
</pre>
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:
<pre>
{
"mcpServers": {
"CloudlabMcp": {
"disabled": false,
"timeout": 500,
"type": "stdio",
"command": "uv",
"args": [
"run",
"--with",
"fastmcp",
"python",
"%PROJECT_PATH%\\app.py"
],
"env": {
"API_KEY": "your_private_key",
"Baseurl": "your seed phrase here",
"compnaykey": "your_private_key"
},
"autoApprove": [*]
}
}
}
</pre>
Beofre start Mcp set path
<pre>
set PROJECT_PATH=D:\YourProject
</pre>
<pre>
cline run CloudlabMcp
</pre>
โ
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.