Skip to content

fails to run Python projects with requirements.txt #4

Open
@bardusco

Description

@bardusco

Environment

  • OS: macOS
  • Using requirements.txt for Python dependencies
  • Project structure includes main.py and requirements.txt

Description

The mcp__code-sandbox__run_project tool fails when attempting to execute Python projects that use requirements.txt. The error is simply reported as "undefined" without any additional details, making
debugging difficult.

Steps to Reproduce

  1. Create a Python project with main.py and requirements.txt
  2. Add dependencies to requirements.txt (e.g., requests==2.31.0)
  3. Try to run the project using:
    mcp__code-sandbox__run_project
    projectDir: /path/to/project
    language: python
    entrypointCmd: python main.py

Expected Behavior

The sandbox should successfully:

  1. Create a Docker container
  2. Install dependencies using uv (from requirements.txt)
  3. Execute the Python script
  4. Return the resource URI of the container logs

Actual Behavior

The tool fails with the error: "Error calling tool run_project: undefined"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions