Token导航 LogoToken导航TokenDH.com
python roblox studio MCP logo
运维云端stdio官方级别未说明来源级核验

python roblox studio MCP

MCP Server

一个Roblox Studio插件,通过HTTP将Studio连接到外部MCP(模型上下文协议)服务器,使AI工具能够读取和操作游戏层次结构、脚本、属性等。

工具数

65

提示词数

0

GitHub Stars

2

资源数

0
PythonClaude游戏开发Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

eyedautumn

提供方

eyedautumn

最后核验

2026/5/17 20:21

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python3 update.py --server-script /opt/roblox-mcp/roblox_mcp_server.py --claude-desktop-config ~/.config/Claude/claude_d...

详细介绍

Roblox工作室MCP桥

Build

Roblox Studio插件,通过HTTP将Studio连接到外部MCP(模型上下文协议)服务器,使AI工具能够读取和操纵游戏的层次结构、脚本、属性等。

运行时分为两个进程:

  • roblox_bridge_server.py:端口上的单个长期HTTP守护进程 28650 该工作室进行了民意调查。
  • roblox_mcp_server.py:一个每个代理的MCP stdio适配器,用于将工具调用转发到网桥。

安装

选项A——安装程序脚本(推荐)

  1. 发布 页面和下载 install.py (需要Python 3.8+) 适用于您平台的独立可执行文件:

- Linux: install-linux - macOS: install-macos *(右键单击→ 首次运行时打开以绕过看门人)* - 窗户: install-windows.exe

  1. 运行安装程序——它将引导您完成Claude Desktop、Claude Code、OpenAI Codex或OpenCode的插件放置和MCP服务器注册。

- 高级:通过 --server-script /absolute/path/to/roblox_mcp_server.py (或 --server-path)选择脚本的安装位置;安装程序现在将两者都放置 roblox_mcp_server.py 和兄弟姐妹 roblox_bridge_server.py. - 克劳德桌面高级:通过 --claude-desktop-config /absolute/path/to/claude_desktop_config.json 使用自定义配置位置。

  1. 打开Roblox工作室。这 Roblox MCP 工具栏按钮将会出现。
  2. 启用 HTTP请求 在 *游戏设置→ 安全* (插件将自动尝试此操作)。
  3. 点击 开始桥接轮询 在插件小部件中。

选项B——自动更新程序向导(新)

当您希望在安装之前始终拉取最新的安装程序向导时,请使用此选项。

  1. 下载 update.py发布 (需要Python 3.8+)。
  2. 运行它:

- Linux/macOS: python3 update.py - 窗户: py update.py (或 python update.py)

  1. 更新程序获取最新 install.py 从最新版本开始,启动完整的交互式安装程序,以便您可以选择首选的安装选项。

- 您还可以设置 --server-script /absolute/path/to/roblox_mcp_server.py 运行时 update.py;它在该文件夹中安装适配器+网桥脚本。

您也可以通过更新程序传递安装程序标志:

python3 update.py --server-script /opt/roblox-mcp/roblox_mcp_server.py --claude-desktop-config ~/.config/Claude/claude_desktop_config.json -- --non-interactive --skip-skill --agent codex

选项C——手动插件安装

  1. 发布 页面和下载 RobloxMcpBridge.rbxm.\

--或--\ 从下载最新的构建工件 行动 (无需发布)。

  1. 地方 RobloxMcpBridge.rbxm 在你的Roblox 插件 文件夹:

- 窗户: %LOCALAPPDATA%\Roblox\Plugins\ - macOS: ~/Documents/Roblox/Plugins/ - Linux(Sober/Flatpak): ~/.var/app/org.vinegarhq.Sober/data/roblox/Plugins/ - Linux(醋/酒): ~/.var/app/org.vinegarhq.Vinegar/data/prefixes/studio/drive_c/users//AppData/Local/Roblox/Plugins/

  1. 打开Roblox工作室。这 Roblox MCP 工具栏按钮将会出现。
  2. 启用 HTTP请求 在 *游戏设置→ 安全* (插件将自动尝试此操作)。
  3. 启动网桥守护进程一次: python3 /path/to/roblox_bridge_server.py (如果启用了适配器自动启动,则可选)。
  4. 点击 开始桥接轮询 在插件小部件中,确认 client_id 文本框值(默认为 PlaceId).

选项D——手动注册MCP服务器

如果你已经安装了插件,请将其添加到你的AI客户端的配置中:

{
  "mcpServers": {
    "Roblox_Studio": {
      "command": "python3",
      "args": ["/path/to/roblox_mcp_server.py"]
    }
  }
}
  • 克劳德桌面: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)或 %APPDATA%\Claude\claude_desktop_config.json (Windows)
  • 克劳德代码: claude mcp add Roblox_Studio --scope user -- python3 /path/to/roblox_mcp_server.py
  • OpenAI Codex: ~/.codex/config.toml
  • OpenCode: ~/.config/opencode/mcp.json (CLI注册不可用时回退)

网桥启动模式

您可以在以下任一模式下运行:

  1. 自动启动(默认):如果满足以下条件,每个MCP适配器进程都会尝试启动网桥 http://localhost:28650/status 不可用。
  2. 手动电桥:run python3 /path/to/roblox_bridge_server.py 然后启动一个或多个MCP适配器进程 python3 /path/to/roblox_mcp_server.py --no-autostart.

如果网桥不可用且禁用自动启动,适配器将退出并显示: Bridge not running. Start it with: python roblox_bridge_server.py.

多代理使用模式

  • 多个工作室同时开放:每个Studio窗口默认值 client_id 到其 PlaceId.使用 studio_get_connection_status / GET /clients 要发现活动客户端,请通过 client_id 在工具调用中以特定位置为目标。
  • 多个代理→ 一个地方:将所有代理指向同一位置 client_id (通常是地点id)。作业通过共享网桥队列进行序列化。
  • 自定义分组:在插件中键入任何字符串 Client ID 盒子(例如 map-editorscripting)将作业路由到该逻辑Studio目标。

当地建筑(Rojo)

# Install Rojo (https://rojo.space)
rojo build default.project.json --output RobloxMcpBridge.rbxm

default.project.json 地图 src/plugin/init.plugin.luau 作为插件根脚本 Tools/Utils/ 作为子模块脚本——匹配方式 require(script.Tools.*) 在运行时解析。

项目结构

src/plugin/
├── init.plugin.luau         # Entry point: toolbar UI, polling loop, handler dispatch
├── Tools/
│   ├── InstanceTools.luau   # Instance hierarchy: create/delete/clone/reparent/tree/selection
│   ├── PropertyTools.luau   # Properties + attributes get/set
│   ├── TagTools.luau        # CollectionService tags
│   ├── ScriptTools.luau     # Read/write/patch/search/functions/find+replace
│   ├── EditorTools.luau     # ScriptEditorService open/list/close
│   ├── HistoryTools.luau    # Undo/redo/waypoints
│   ├── StudioTools.luau     # Run code, insert model, console output, run mode
│   ├── TerrainTools.luau    # Terrain fill/replace/read/clear tools
│   ├── BulkTools.luau       # Bulk create/set/delete/get-property operations
│   ├── BuildTools.luau      # Export/import instance subtrees as JSON
│   ├── AnalyzeTools.luau    # Analyze scripts / other instances.
│   └── DataModelTools.luau  # Place/workspace/team/lighting metadata tools
└── Utils/
    ├── Types.luau           # Rich type serialization / deserialization
    ├── Instances.luau       # Instance ID map and path resolution helpers
    ├── History.luau         # ChangeHistoryService recording helpers
    ├── Syntax.luau          # Lua syntax validation utilities
    ├── Logger.luau          # Widget log panel helper
    └── PluginUtils.luau     # Shared plugin-side utility helpers

支持的工具

类别工具
连接studio_get_connection_status, studio_list_connections
例子 roblox_list_services, roblox_get_children, roblox_get_descendants, roblox_get_instance, roblox_find_instances, roblox_search_by_property, roblox_get_tree, roblox_create_instance, roblox_delete_instance, roblox_clone_instance, roblox_smart_duplicate, roblox_reparent_instance, roblox_set_name, roblox_select_instance, roblox_get_selection
属性与特性roblox_get_properties, roblox_get_all_properties, roblox_get_class_info, roblox_set_properties, roblox_get_attributes, roblox_set_attributes
标签roblox_get_tags, roblox_add_tag, roblox_remove_tag
脚本roblox_read_script, roblox_write_script, roblox_patch_script, roblox_get_script_lines, roblox_search_script, roblox_get_script_functions, roblox_search_across_scripts, roblox_find_and_replace_in_scripts
编辑roblox_open_script, roblox_get_open_scripts, roblox_close_script
历史roblox_undo, roblox_redo, roblox_set_waypoint
工作室roblox_run_code, roblox_insert_model, roblox_get_console_output, roblox_get_playtest_output, roblox_start_stop_play, roblox_get_studio_mode, roblox_run_script_in_play_mode
地形roblox_terrain_fill_block, roblox_terrain_fill_ball, roblox_terrain_fill_cylinder, roblox_terrain_replace_material, roblox_terrain_read_voxels, roblox_terrain_clear_region
散装roblox_bulk_create_instances, roblox_bulk_set_properties, roblox_bulk_delete_instances, roblox_bulk_get_properties
数据模型roblox_get_place_info, roblox_set_lighting, roblox_get_workspace_info, roblox_get_team_list, roblox_get_lighting_effects
构建roblox_export_build, roblox_import_build
分析roblox_analyze_script

游戏测试技巧

  • 使用 roblox_run_script_in_play_mode 用于具有超时和结构化返回有效负载的单次脚本执行。
  • 使用 roblox_start_stop_play 用于手动会话(start_play / run_server / stop).
  • 确认转换 roblox_get_studio_mode 在发出后续命令之前。
  • 流式传输会话日志 roblox_get_playtest_output;使用 roblox_get_console_output 全球产出。
  • 如果Studio在运行后卡在Play中,请调用 roblox_start_stop_play 随着 stop,稍等片刻,然后重新检查模式。

添加新工具

  1. 在中创建(或编辑)相应的模块 src/plugin/Tools/.
  2. 从模块中将处理程序导出为命名函数。
  3. handlers 桌子在 init.plugin.luau.

目录标签

目录标签

PythonClaude游戏开发Luau本地部署Roblox插件AI集成脚本管理HTTP桥接

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

65

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP