Back to Blog

Announcing HopX MCP Server: Code Execution for AI Assistants

Product UpdatesAlin Dobra5 min read

Announcing HopX MCP Server: Code Execution for AI Assistants

We're excited to announce the HopX MCP Server — a Model Context Protocol server that enables AI assistants like Claude, Cursor, and VS Code Copilot to execute code in secure, isolated cloud containers.

One command to install. Instant code execution superpowers.

bash
1
uvx hopx-mcp
2
 

What is MCP?

The Model Context Protocol (MCP) is an open standard that allows AI assistants to interact with external tools and services. Instead of just generating code, your AI can now run it.

With the HopX MCP Server, when you ask Claude to "analyze this data" or "test this function," it doesn't just write the code — it executes it in a secure sandbox and returns the actual results.

Why HopX MCP?

Before HopX MCP:

"Here's some Python code that should work. Copy it and run it yourself to see the output."

After HopX MCP:

"I ran the analysis. Here are the results: average is 42.5, median is 38, and I've generated a chart showing the distribution."

The difference is transformative. Your AI assistant becomes a true coding partner that can:

  • Execute code and see real output
  • Debug iteratively by running and fixing
  • Analyze data with pandas, numpy, matplotlib
  • Test solutions before presenting them
  • Work with files in isolated environments

Quick Start

1. Get Your API Key

Sign up at hopx.ai to get your API key.

2. Configure Your IDE

For Claude Desktop, add to your config file:

json
1
{
2
  "mcpServers": {
3
    "hopx-sandbox": {
4
      "command": "uvx",
5
      "args": ["hopx-mcp"],
6
      "env": {
7
        "HOPX_API_KEY": "your-api-key-here"
8
      }
9
    }
10
  }
11
}
12
 

Config locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

For Cursor, add to .cursor/mcp.json:

json
1
{
2
  "mcpServers": {
3
    "hopx-sandbox": {
4
      "command": "uvx",
5
      "args": ["hopx-mcp"],
6
      "env": {
7
        "HOPX_API_KEY": "your-api-key-here"
8
      }
9
    }
10
  }
11
}
12
 

For VS Code, add to .vscode/mcp.json:

json
1
{
2
  "mcpServers": {
3
    "hopx-sandbox": {
4
      "command": "uvx",
5
      "args": ["hopx-mcp"],
6
      "env": {
7
        "HOPX_API_KEY": "your-api-key-here"
8
      }
9
    }
10
  }
11
}
12
 

3. Start Using It

Restart your IDE and start asking your AI to run code!

Capabilities

Multi-Language Support

Execute code in multiple languages out of the box:

LanguageVersionPre-installed Packages
Python3.11+pandas, numpy, matplotlib, scipy, scikit-learn, requests
JavaScriptNode.js 20Standard libraries
BashLatestUnix utilities, git, curl, wget
GoLatestCompilation support

Available Tools

The MCP server provides these tools to your AI assistant:

Code Execution

  • execute_code_isolated() — One-shot execution (recommended)
  • execute_code() — Execute in existing sandbox
  • execute_code_background() — Long-running tasks
  • execute_code_async() — Webhook callbacks for 30+ min tasks

File Operations

  • file_read(), file_write(), file_list()
  • file_exists(), file_remove(), file_mkdir()

Shell Commands

  • run_command() — Execute shell commands
  • run_command_background() — Background processes

Sandbox Management

  • create_sandbox() — Create persistent sandbox
  • list_sandboxes() — List active sandboxes
  • delete_sandbox() — Terminate sandbox

Performance

We've optimized for the interactive AI use case:

MetricTime
Sandbox creation~200ms
Container startup~100ms
Code executionNear-instant

Your AI doesn't wait. Neither do you.

Security

Every code execution runs in complete isolation:

  • VM-level isolation — Each execution in its own micro-VM
  • Auto-cleanup — Containers destroyed after use (default: 10 min)
  • No cross-contamination — Sandboxes can't access each other
  • JWT authentication — Secure per-sandbox auth

Your local system is completely protected from executed code.

Example Use Cases

Data Analysis

Ask Claude: "Download the Titanic dataset and show me survival rates by passenger class"

Claude will:

  1. Execute code to download the dataset
  2. Run pandas analysis
  3. Generate matplotlib visualizations
  4. Return actual statistics and charts

Code Testing

Ask Cursor: "Write a function to validate email addresses and test it with edge cases"

Cursor will:

  1. Write the validation function
  2. Create test cases
  3. Execute tests in a sandbox
  4. Show real pass/fail results

Debugging

Ask your AI: "This code throws an error, fix it"

Your AI will:

  1. Run the code to see the actual error
  2. Analyze the traceback
  3. Apply a fix
  4. Run again to verify it works

Open Source

The HopX MCP Server is open source and available on GitHub:

github.com/hopx-ai/mcp

We welcome contributions, issues, and feedback from the community.

Get Started Today

  1. Sign up at hopx.ai for your API key
  2. Install with uvx hopx-mcp
  3. Configure your IDE
  4. Start building with AI-powered code execution

Transform your AI assistant from a code generator into a true coding partner.


Resources

Questions? Reach out at support@hopx.ai.