ForeverVM

官方

在代码沙箱中运行Python。

你可以用 Forever VM MCP 做什么?

  • Start a new Python REPL session — ask your assistant to create a fresh Python environment using create-python-repl and get back its session ID.
  • Run Python code in an existing REPL — provide a REPL ID and code snippet to execute via run-python-in-repl and receive the output.
  • Chain multiple code executions in one session — reuse the same REPL ID across several run-python-in-repl calls to build up state, variables, or results incrementally.

文档

ForeverVM MCP 服务器

用于 ForeverVM 的 MCP 服务器,使 Claude 能够在 Python REPL 中执行代码。

工具

  1. create-python-repl
  • 创建一个 Python REPL。
  • 返回:新 REPL 的 ID。
  1. run-python-in-repl
    • 在 Python REPL 中执行代码。
    • 必需输入:
      • code(字符串):Python REPL 将运行的代码。
      • replId(字符串):要运行代码的 REPL 的 ID。
    • 返回:所执行代码的结果。

与 Claude Desktop 配合使用

运行以下命令:

npx forevervm-mcp install --claude

对于其他 MCP 客户端,请参阅文档

本地安装(仅用于开发)

在 MCP 客户端中,将命令设置为 npm,并将参数设置为:

["--prefix", "<path/to/this/directory>", "run", "start", "run"]