Skip to content

Let AI tools control the running app over MCP - #261

Merged
bubio merged 14 commits into
mainfrom
feat/mcp-automation
Nov 9, 2026
Merged

bubio merged 14 commits into
mainfrom
feat/mcp-automation

Conversation

@bubio

@bubio bubio commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • 起動中のアプリを MCP で AI ツールから操作・確認できるようにする(127.0.0.1 の Streamable HTTP、既定ポート 18801、Bearer トークンと Origin 検証)
  • 設定 › 一般 に「AI ツールからの操作 (MCP)」セクションを追加:オン/オフ、ポート、登録先(Claude Code / Codex CLI / Gemini CLI / Pi / opencode / GitHub Copilot (VS Code) / Cursor / その他 JSON)ごとの登録コマンド・設定を編集可能な欄で表示し、コピーボタンを付ける
  • 開発メニューに「AI ツールからの操作を許可」トグル(設定と連動)
  • AI がマウントしたテープの表示、ウォッチ停止のデバッガ表示、セッション終了時のウォッチ・書き込み追跡・プロファイルの後始末
  • Bubilator88Core を 1.10.0 に更新(Add MCP automation tools for AI agents and a headless stdio server Bubilator88Core#38)、dev-docs の AUTOMATION.md / BOOTTESTER.md を更新
  • README は設定画面の場所だけ案内

Test plan

  • タグ付きコア 1.10.0 でアプリの Debug ビルドが通る
  • ワークスペース(ローカルコア)で Debug ビルドが通る
  • String Catalog の未登録キーなし(scripts/extract_loc_keys.py --missing)
  • 8 つの登録先の生成テキストを検証(JSON / TOML のパース、シェル引数の分割)
  • claude mcp add --help / code --help でフラグを確認
  • コア側:swift test 1102 件パス、回帰スイート 20/20 PASS

🤖 Generated with Claude Code

bubio and others added 14 commits October 31, 2026 13:21
With "Allow control from AI tools" on (General settings, off by default),
the app serves the core's Bubilator88Automation tools over Streamable
HTTP on 127.0.0.1, behind a bearer token and Origin/Host checks. Tools
that run frames pause real-time running and leave it paused; the
debugger stays attached while an agent has breakpoints set.

extract_loc_keys.py now also looks in build/, where the development
workspace builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Run AI frames through the same per-frame host work as the real-time
  loop (runHostFrame), taking emuQueue once per frame and resetting the
  slice index, and stop when the user resumes real time.
- Drop the agent's hold on the debugger when the server is turned off
  or moved to another port.
- Close open connections on stop, and start a replacement server only
  after the old listener has released the port.
- Serve pipelined requests already in the buffer.
- Warn in Settings when the port is outside 1024-65535.
- A clock given to the reset tool lasts for that reset only.
- Remove the token's unused didSet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings now copies the URL, the token, or an mcpServers settings entry
instead of a Claude Code command, and the README lists how common
clients take them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The settings JSON holds the URL and the token, so separate buttons for
them added nothing. The JSON also works as what to hand an AI agent
that registers the server itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…u toggle

Settings gets an "AI Tool Control (MCP)" section. Picking Claude Code,
Codex CLI, Gemini CLI, Pi, opencode, GitHub Copilot (VS Code), Cursor or
Other (JSON) shows that client's command or settings snippet in a plain
text editor, with one sentence on where it goes, and Copy copies it as
edited. The editor turns off smart quotes and dashes, which would break
a shell command. Edits are not kept; the chosen client is.

The Develop menu can turn AI control on and off. Both go through
EmulatorViewModel.automationEnabled, so the server follows the menu
even while Settings is closed. The README now just points to Settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bubio
bubio merged commit bce3c02 into main Nov 9, 2026
3 checks passed
@bubio
bubio deleted the feat/mcp-automation branch November 9, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant