云计算机控制服务器

Orgo MCP Server 是一个用于控制Orgo云计算机的官方服务器,支持从Claude Code、Claude Desktop和其他Model Context Protocol客户端进行控制。

  • by nickvasilescu
  • TypeScript
  • 混合部署
  • 28 星标
  • 更新于
在 GitHub 查看 nickvasilescu/orgo-mcp

使用说明

Orgo MCP服务器

用于控制的官方MCP服务器 Orgo 来自Claude Code、Claude Desktop和其他模型上下文协议客户端的云计算机。

从GitHub安装,而不是npm。 规范安装是 npx -y github:nickvasilescu/orgo-mcp --回购船是预先建造的 dist/,因此这是一个快速的注册表式安装(无编译步骤)。npm注册表仍然有过时的3.0.0版本;做 不 使用 npx @orgo-ai/mcp 直到4.x版本登陆那里。

快速开始

1.获取Orgo API密钥

注册或登录 组织,然后从复制API密钥 设置>API密钥.

2.添加MCP服务器

安装路径使用GitHub URL,因此您可以获得当前的4.x版本(紧凑模式、限制、, orgo_doctor等等)。固定在释放标签上,以确保生产稳定性;省略 #ref 追踪 main 支。

克劳德代码:

# Latest from main (prebuilt — installs in seconds)
claude mcp add orgo -e ORGO_API_KEY=sk_live_YOUR_KEY -- npx -y github:nickvasilescu/orgo-mcp

# Or pin to a release tag
claude mcp add orgo -e ORGO_API_KEY=sk_live_YOUR_KEY -- npx -y github:nickvasilescu/orgo-mcp#v4.1.1

克劳德桌面:

{
  "mcpServers": {
    "orgo": {
      "command": "npx",
      "args": ["-y", "github:nickvasilescu/orgo-mcp"],
      "env": {
        "ORGO_API_KEY": "sk_live_YOUR_KEY"
      }
    }
  }
}

托管流式HTTP服务器(Claude Code、Cursor、VS Code和其他客户端 支持通过HTTP的远程MCP):

{
  "mcpServers": {
    "orgo": {
      "type": "http",
      "url": "https://orgo-mcp.onrender.com/mcp",
      "headers": {
        "X-Orgo-API-Key": "${ORGO_API_KEY}",
        "X-Orgo-Default-Computer-Id": "your-computer-id"
      }
    }
  }
}

具体形状因客户而异: 光标 省略 type (它推断 运输从 url), 帆板运动 命名字段 serverUrl,以及 VS Code 将服务器嵌套在 servers 密钥而不是 mcpServers.

Claude Desktop是个例外 — claude_desktop_config.json 仅限stdio 并且不会启动 type: http 进入。从以下位置到达托管端点 Claude Desktop,连接它 mcp-remote (仍然是stdio命令 mcpServers):

{
  "mcpServers": {
    "orgo": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://orgo-mcp.onrender.com/mcp",
        "--transport", "http-only",
        "--header", "X-Orgo-API-Key:${ORGO_API_KEY}",
        "--header", "X-Orgo-Default-Computer-Id:${ORGO_DEFAULT_COMPUTER_ID}"
      ],
      "env": {
        "ORGO_API_KEY": "sk_live_YOUR_KEY",
        "ORGO_DEFAULT_COMPUTER_ID": "your-computer-id"
      }
    }
  }
}

X-Orgo-Default-Computer-Id 是可选的:它为此固定默认计算机 连接,因此工具调用可以省略 computer_id (相当于远程 ORGO_DEFAULT_COMPUTER_ID env-var,不能是共享主机上的每个用户)。 只允许您配置URL的客户端可以将其作为查询参数传递: https://orgo-mcp.onrender.com/mcp?computer_id=your-computer-id.

PowerShell用户可以包装Claude Code命令,因为PowerShell可能会损坏 -- 当它到达npm shims时:

cmd /c "claude mcp add orgo -e ORGO_API_KEY=sk_live_YOUR_KEY -- npx -y github:nickvasilescu/orgo-mcp"

关于GitHub安装。 回购提交预构建 dist/ 而且没有 prepare 脚本,所以 npx 获取仓库并仅安装三个运行时依赖项——没有TypeScript工具链,没有编译。冷安装需要几秒钟;后续调用被缓存。CI拒绝任何 dist/ 不匹配 src/,所以 main 总是可以运行的。

工具

服务器公开了28个专注的工具。

工具集 工具
core orgo_list_workspaces, orgo_get_workspace, orgo_workspace_by_name, orgo_list_computers, orgo_get_computer, orgo_doctor
admin orgo_create_workspace, orgo_delete_workspace, orgo_create_computer, orgo_delete_computer, orgo_restart_computer, orgo_clone_computer, orgo_ensure_running, orgo_resize_computer, orgo_move_computer
screen orgo_screenshot, orgo_click, orgo_type, orgo_key, orgo_scroll, orgo_drag, orgo_wait
shell orgo_bash, orgo_exec
files orgo_list_files, orgo_export_file, orgo_upload_file, orgo_download_file

每个工具都注册了MCP注释 readOnlyHint, destructiveHint, idempotentHint,以及 openWorldHint. orgo_restart_computer 标记为破坏性,因为它会中断正在运行的进程和未保存的VM状态。 文本响应在返回到MCP客户端之前会被清除,因此即使Orgo API响应包含密码、令牌、机密、凭证和API-key字段,它们也会被编辑。

读取工具的紧凑模式

阅读工具(orgo_list_workspaces, orgo_get_workspace, orgo_workspace_by_name, orgo_list_computers, orgo_get_computer, orgo_list_files)都是 从4.1.0开始默认压缩:嘈杂的场地,如 instance_details, template_build_id,以及 user_id 被丢弃,保持 id, name, status、时间戳和关键资源字段(cpu, ram, os, disk_size_gb, fly_instance_id,文件 size/path).典型的节省:在列表端点上节省50%以上(290 KB的工作区列表缩小到约50 KB)。通过 compact: false 当您需要完整的原始有效载荷时。响应也不再打印得很漂亮——如果从≤4.0.x升级,这两个更改都会影响默认响应形状。

健康检查(orgo_doctor)

呼叫 orgo_doctor (无参数)探测MCP服务器运行状况:检测到身份验证源(env:ORGO_API_KEY 或 http_header,从不为关键值)、带有状态代码的API可达性以及以ms为单位的往返延迟。返回 { ok, auth, api } — ok: true 意味着两个身份验证都已配置,并且已响应实时Orgo API。用作代理线束的第一次调用以验证设置,或在工具错误后用于区分身份验证失败(status_code: 401)从网络问题(没有状态码, error: "Cannot reach Orgo API").

列表工具的客户端限制

通过 limit: N (1–500)至 orgo_list_workspaces, orgo_list_computers,或 orgo_list_files 限制退货数量。Orgo API不在服务器端分页,因此MCP获取所有内容并修剪客户端。当发生截断时,响应增益 total (实际计数)和 truncated: true.省略 limit 返回所有内容(当前默认值-向后兼容)。与…结合 compact: true 对于最小的有效载荷: { limit: 5, compact: true } 即使在拥有数百台计算机的帐户上,通常也会返回低于3KB的数据。

故意不暴露:

  • 计算机启动/停止工具
  • VNC密码访问
  • 账户/个人资料/信用/交易
  • 自主代理/线程工具
  • RTMP流媒体工具
  • 模板管理工具

安全生产控制

在不更改客户端配置的情况下,使用环境变量限制暴露的曲面。

变量 默认值 描述
ORGO_READ_ONLY false 何时 true,仅注册注释为只读的工具。
ORGO_TOOLSETS core,admin,screen,shell,files 以逗号分隔的工具集要公开。例子: core,screen,files.
ORGO_ENABLED_TOOLS 所有已注册的工具 以逗号分隔的列表。应用之前 ORGO_DISABLED_TOOLS.
ORGO_DISABLED_TOOLS none 用逗号分隔的完整丹尼斯列表。

示例:

# Observation-only mode
ORGO_READ_ONLY=true npx -y github:nickvasilescu/orgo-mcp

# Browserless VM control without shell access
ORGO_TOOLSETS=core,screen,files npx -y github:nickvasilescu/orgo-mcp

# Keep shell enabled, but remove bash
ORGO_TOOLSETS=shell ORGO_DISABLED_TOOLS=orgo_bash npx -y github:nickvasilescu/orgo-mcp

只读模式当前公开:

orgo_list_workspaces
orgo_get_workspace
orgo_workspace_by_name
orgo_list_computers
orgo_get_computer
orgo_screenshot
orgo_wait
orgo_list_files
orgo_download_file
orgo_doctor

环境变量

变量 默认值 描述
ORGO_API_KEY none stdio传输需要。HTTP部署通过以下方式接收用户密钥 X-Orgo-API-Key.
ORGO_DEFAULT_COMPUTER_ID none 默认计算机ID,因此工具调用可以省略 computer_id (stdio)。对于HTTP,发送每个请求 X-Orgo-Default-Computer-Id 标题(或 ?computer_id=)相反。
MCP_TRANSPORT stdio stdio, http,或 streamable-http.
MCP_HOST 0.0.0.0 HTTP绑定地址。
MCP_PORT / PORT 8000 HTTP端口

自我寄宿

本地标准:

git clone https://github.com/nickvasilescu/orgo-mcp.git
cd orgo-mcp
npm install
ORGO_API_KEY=sk_live_YOUR_KEY npm start

本地HTTP:

npm install
npm run build
MCP_TRANSPORT=http npm start
curl http://localhost:8000/health

Docker:

docker build -t orgo-mcp .
docker run -p 8000:8000 -e MCP_TRANSPORT=http orgo-mcp

提供:

  1. 分叉此回购。
  2. 从以下位置创建渲染蓝图 render.yaml.
  3. 将客户端连接到 https://YOUR_RENDER_HOST/mcp 带着一个 X-Orgo-API-Key 头球

托管服务器不存储共享的Orgo密钥。每个请求都必须包含用户的Orgo API密钥头。

建筑

npx / stdio:
  MCP client -> stdio -> @orgo-ai/mcp -> Orgo API
                           ORGO_API_KEY env var

Hosted HTTP:
  MCP client -> HTTPS -> orgo-mcp server -> Orgo API
                          X-Orgo-API-Key header

Shell commands:
  orgo_bash -> Terminal WebSocket primary -> VM
            -> REST /bash fallback        -> VM

发展

npm install
npm run build
npm test
npm start

CI运行:

  • TypeScript从一个干净的 dist/
  • MCP工具列出了默认、只读、工具集、允许列表和拒绝列表策略的冒烟测试
  • HTTP传输健康和身份验证冒烟测试
  • 承诺-dist/ 新鲜度检查(重建必须不会产生差异)
  • npm包内容检查
  • Docker镜像构建

dist/ 已提交,因此GitHub安装在更改后不需要构建步骤 src/,跑 npm run build 并提交再生 dist/ 沿着。

出版前:

npm test
npm pack --dry-run

故障排除

错误 修复
Invalid API key 检查Orgo API密钥及其是否处于活动状态。
X-Orgo-API-Key header required HTTP客户端必须在 /mcp 请求:
computer_id required 通行证 computer_id,set ORGO_DEFAULT_COMPUTER_ID (stdio),或发送 X-Orgo-Default-Computer-Id / ?computer_id= (HTTP)。
Connection refused 确认服务器正在运行并检查 /health.
工具未出现 检查 ORGO_READ_ONLY, ORGO_TOOLSETS, ORGO_ENABLED_TOOLS,以及 ORGO_DISABLED_TOOLS.

安全

  • 不要承诺 .env 文件或API密钥。
  • 更喜欢 ORGO_READ_ONLY=true 仅供客户观察。
  • 禁用 shell 用于不应执行VM命令的客户端的工具集。
  • 对待 orgo_bash 和 orgo_exec 作为高性能工具:它们可以修改目标VM可访问的任何内容。
  • HTTP部署应通过以下方式为每个请求传递用户的密钥 X-Orgo-API-Key;不要将生产Orgo密钥烘焙到服务器中。

许可证

MIT。看 许可证.