📰 newsreader

twostopbits score 0.10 好み 0.00 en

Amimcp — ClaudeをあなたのAmigaで動かそう

原題: Amimcp — let Claude work on your Amiga (github.com)

原文 ↗

日本語訳

# タイトル

Amimcp — ClaudeにあなたのAmigaを操作させる (github.com)

# 本文

Claudeに本物のAmigaを直接操作させるためのMCPサーバーです。AmigaDOSコマンドの実行、ファイルの読み書き、ドロワー(フォルダ)のリスト表示、マシンの検査、スクリーンショットの取得、マウス操作、およびタイピングが可能です。

あなたが問題を説明し、Claudeが実際のハードウェアを直接操作します。

A4000/060上のShellをクリックし、コマンドを入力してReturnキーを押す――ドイツ語キーマップを通じたウムラウトの入力まで再現されます。

┌──────────────┐ MCP over stdio ┌──────────┐ framed TCP ┌────────────┐

│ Claude Code │ ◄─────────────────► │ amimcp │ ◄────────────► │ amiagent │

│ (your Mac/PC)│ JSON-RPC 2.0 │ (python) │ port 7846 │ (the Amiga)│

└──────────────┘ └──────────┘ └────────────┘

2つの構成要素:

amimcp

— Claudeを実行しているマシン上で動作するMCPサーバー。純粋なPython標準ライブラリのみを使用しているため、venvもpipも、セットアップ時と2年後の「Amigaが起動しなくなった時」の間で腐敗するようなlockfileも不要です。

amiagent

— Amiga上で動作する小さなC言語製デーモン。AmigaOS 2.04以降、素の68000で動作し、サイズは約85KB。`bsdsocket.library`のみを必要とします。

これらを組み合わせることで、実用的な作業が可能です。`Startup-Sequence`を読み取って修正したり、バイナリをクロスコンパイルして転送・実行したり、GUIプログラムを起動してクリックで操作したり、あるいはトラブル発生時にマシンが表示している内容を確認したりできます。

GUIを操作する前に知っておくべき2つのポイント:

- 低コストな監視:1080pのフルカラーフレームは、約1MB/sのリンク経由だと約6MB(約7秒)かかります。領域指定でのステータスラインの読み取りは実質的に無料であり、`amiga_region_changed` を使えば「描画が完了したか」をわずか4バイトで確認できます。ハッシュ値を用いてポーリングし、必要な時だけピクセルをキャプチャするようにしてください。

- 2種類のポインタ:`amiga_click` はIntuitionポインタを動かします。これはIntuitionアプリケーションに従います。一方、SDLプログラム(ゲームやScummVMなど)は生の相対マウスデルタを追跡して独自のカーソルを使用しているため、ポインタのワープを検知できず、クリックが「ポインタがまだあるべき場所」に当たってしまうことがあります。これらには `passrelative: true` を渡してください。また、Amigaのメニューは右ボタンを押しながら移動することで開くため、クリックではなく `amiga_drag` が必要です。

`amiagent-0.5.3.lha` を入手し、Amigaで展開してください。中には `amiagent` (68000用、あらゆるAmigaで動作) と `amiagent.020` (68020以降用) が含まれています。

`amipkg install amiagent`

には、m68k-amigaosクロスツールチェーンが必要です。これは、bebbo氏の `amiga-gcc` の正当な後継である `AmigaPorts/m6キ8k-amigaos-gcc` を使用してください(bebbo氏のリポジトリは2026年8月7日時点で削除されています。現在はAmigaPortsにあります)。クロスコンパイルは、ツールチェーンが導入されている任意のマシンで行えます:

`cd agent && make` # 68000ベース、すべてのAmigaで動作

`cd agent && make CPU=68020` # 68020+ 用のビルド

生成された `amiagent` をAmigaにコピーしてください。

もしリンクエラーで `undefined IntuitionBase` が出た場合は、ツールチェーンが `intuition/graphics` を自動で開けていません。`make OWNBASES=1` で再ビルドしてください。

TCP/IPスタック(Roadshow、AmiTCP、またはエミュレータの `bsdsocket` エミュレーション)を起動し、Shellから以下を実行します:

`amiagent TOKEN=pickasecret`

ポート7846で待機状態になります。Ctrl-Cで停止できます。バックグラウンドで実行した場合は、`Status` コマンドで探し、`Break <n> C` で停止させてください。

オプション:`PORT/N` (デフォルト7846), `TOKEN/K`, `QUIET/S`。

起動時に自動実行するには、TCPスタックが立ち上がった後の `S:User-Startup` に以下を追記してください:

`run >NIL: amiagent TOKEN=pickasecret QUIET`

`./install.sh 192.168.1.42 pickasecret`

これを使用すると、まずAmigaをスキャンし、その後Claude Codeにサーバーを登録します。手動で行う場合は以下の通りです:

`claude mcp add amiga \

--env AMIGA_HOST=192.168.1.42 \

--env AMIGA_TOKEN=pickasecret \

-- python3 /path/to/amimcp/server/amimcp.py`

Claude Desktopの場合は、`claude_desktop_config.json` に以下を追記してください:

```json

{

"mcpServers": {

"amiga": {

"command": "python3",

"args": ["/pathエラ/to/amimcp/server/amimcp.py"],

"env": {

"AMIGA_HOST": "192.168.1.42",

"AMIGA_TOKEN": "pickasecret"

}

}

}

}

```

新しいセッションを開始し、ClaudeにAmigaの確認を依頼してください。

MCPはオープンな標準であり、`server/amimcp.py` は標準的なstdio MCPサーバーです。stdin/stdoutを介してJSON-RPCで通信し、設定は環境変数から取得します。したがって、MCPサーバーを起動できるものであれば、どのようなものでもAmigaを操作できます。サーバーは接続先のモデルが何であるかを知る必要も、関知する必要もありません。

設定ファイルの形式だけが異なります。OpenAI Codex CLI (`~/.codex/config.toml`) はTOMLを使用します:

```toml

[mcp_servers.amiga]

command = "python3"

args = ["/path/to/amimcp/server/amimcp.py"]

env = { AMIGA_HOST = "192.168.1.42", AMIGA_TOKEN = "pickasecret" }

```

Google Gemini CLI、Cursor、Zed、Cline、Continue、Windsurf、LM Studio、Gooseなどは、上記のClaude Desktopと同じ `mcpServers` JSONブロックをそれぞれの設定ファイルで使用します。正確なパスについては、各クライアントの最新ドキュメントを確認してください(これらは変更されることがあります)。

モデル別の動作状況:

- Claude Code および Claude Desktop でテスト済み。それ以外については、これが標準的なstdioサーバーであるため、動作が期待されます。もし異なる動作が必要な場合は、Issueを作成して内容を伝えてください。

- Python 3 が必要です。標準ライブラリのみを使用しているため、`pip install` や `venv` は不要です。

- `AMIGA_HOST=192.168.1.42 AMIGA_TOKEN=pickasecret python3 server/amimcp.py --probe`

これによりMCPを完全にスキップしてテストできます。ここで失敗する場合は、クライアントではなくネットワークまたはエージェントの問題です。

`amiagent` は、ポートにアクセスできる者に対して任意のコマンドを実行可能であり、プロトコルは暗号化されていません。これは意図的なトレードオフです。クラシックなAmigaにはAmiSSLなしではTLSが利用できず、修理しようとしているマシンにアクセスするためにAeymiSSLを要求することは、目的(修理)に反するからです。

したがって、必ず `TOKEN` を設定し、信頼できるLAN内でのみ使用し、絶対にポート転送を行わないでください。

トークンがない場合、ネットワークセグメント内の誰でもシステムパーティションに対して `Format` を実行できてしまいます。エージェントは、トークンなしで起動した際に強力な警告を表示します。

トークンはバイト単位で比較されるため(`A4000` と `a4000` は異なるトークンです)、かつ平文で転送されます。これは、LAN内のパケットスニッファーに対しては無防備ですが、不意なポートスキャンを防ぐ役割を果たします。

テスト環境:A4000/060, Kickstart 47.115 / Workbench 47.5 (AmigaOS 3.2.3), Roadshow, 1920×1080 Picasso96 RTG画面。

以下の機能を確認済み:stdout+stderrおよびリターンコード付きのシェル、ファイルの読み書き、ディレクトリ一覧、システム情報、`cybergraphics.library`を通じたネイティブなフルカラー画面キャプチャ、フォールバックとしての `SGrab` キャプチャ、マウス移動/クリック、およびタイピング(ドイツ語キーマップによる `äöü ÄÖÜ ß` の正しい生成を含む)。

転送速度は約830 KiB/sです。そのため、1920×1080のフルカラーキャプチャ(6.2 MB)は、ネットワーク経由で約7秒かかります。Claudeに届くPNGは約850 KiBです。

- 一度に一つのコマンド:コマンドはデッドライン付きの子プロセスで実行されるため、入力待ちのプログラムがあってもエージェントが停止することはありません。他の操作は引き続き可能で、`amiga_break` で強制終了(Ctrl-C)を送ることができます。ただし、停止または終了するまで、後続の `amiga_

原文(英語)を表示

An MCP server that gives Claude hands on a real Amiga. It can run AmigaDOS commands, read and write files, list drawers, inspect the machine, capture the screen, and move the mouse and type on it.

You describe the problem; Claude pokes at the actual hardware.

That is Claude clicking into a Shell on an A4000/060, typing a command, and pressing Return — the umlauts routed through the Amiga's own German keymap.

┌──────────────┐ MCP over stdio ┌──────────┐ framed TCP ┌────────────┐

│ Claude Code │ ◄─────────────────► │ amimcp │ ◄────────────► │ amiagent │

│ (your Mac/PC)│ JSON-RPC 2.0 │ (python) │ port 7846 │ (the Amiga)│

└──────────────┘ └──────────┘ └────────────┘

Two halves:

amimcp

— the MCP server, on the machine running Claude. Pure Python standard library: no venv, no pip, no lockfile to rot between the day you set this up and the evening two years later when the Amiga won't boot.amiagent

— a small C daemon on the Amiga. AmigaOS 2.04 and up, bare 68000, ~85 KB, needs nothing butbsdsocket.library

.

Together those are enough to actually work: read a Startup-Sequence and fix it, cross-compile a binary and push it over and run it, launch a GUI program and drive it by clicking, or just look at what the machine is showing when it has gone wrong.

Two things are worth knowing before you drive a GUI:

- Watch cheaply. A full 1080p truecolour frame is ~6 MB over a ~1 MB/s link —

about 7 seconds. Reading one status line as a region is effectively free, and

amiga_region_changed

answers "has it finished drawing?" in four bytes. Poll with hashes; capture pixels only when you need to look. - Two kinds of pointer.

amiga_click

warps the Intuition pointer, which Intuition applications follow. SDL programs — games, ScummVM — track raw mouse deltas and keep their own cursor, so they never see the warp and the click lands wherever they still believe the pointer is. Passrelative: true

for those. And an Amiga menu is opened by holding the right button and moving, so it needsamiga_drag

, not a click.

Grab amiagent-0.5.3.lha

and unpack it on the Amiga. It contains amiagent

(68000, runs on everything)

and amiagent.020

(68020+).

amipkg install amiagent

Needs an m68k-amigaos cross-toolchain — AmigaPorts/m68k-amigaos-gcc, the maintained descendant of bebbo's amiga-gcc. (Bebbo's own repository is gone as of 2026-08-07; AmigaPorts is where it lives now.) Cross-compile on any machine that has it:

cd agent && make # 68000 baseline, runs on every Amiga

cd agent && make CPU=68020 # 68020+ build

Copy the resulting amiagent

to the Amiga.

If the link fails with an undefined

IntuitionBase

, your toolchain doesn't auto-open intuition/graphics. Rebuild withmake OWNBASES=1

.

Bring up your TCP/IP stack (Roadshow, AmiTCP, or the emulator's bsdsocket

emulation), then from a Shell:

amiagent TOKEN=pickasecret

It prints that it is listening on port 7846 and waits. Ctrl-C stops it; if

you backgrounded it, find it with Status

and Break <n> C

.

Options: PORT/N

(default 7846), TOKEN/K

, QUIET/S

.

To start it at boot, add this to S:User-Startup

, after your TCP stack

comes up:

run >NIL: amiagent TOKEN=pickasecret QUIET

./install.sh 192.168.1.42 pickasecret

That probes the Amiga first, then registers the server with Claude Code. Or do it by hand:

claude mcp add amiga \

--env AMIGA_HOST=192.168.1.42 \

--env AMIGA_TOKEN=pickasecret \

-- python3 /path/to/amimcp/server/amimcp.py

For Claude Desktop, add this to claude_desktop_config.json

:

{

"mcpServers": {

"amiga": {

"command": "python3",

"args": ["/path/to/amimcp/server/amimcp.py"],

"env": {

"AMIGA_HOST": "192.168.1.42",

"AMIGA_TOKEN": "pickasecret"

}

}

}

}

Start a new session and ask Claude to check the Amiga.

MCP is an open standard, and server/amimcp.py

is an ordinary stdio MCP

server: it speaks JSON-RPC over stdin/stdout and takes its configuration from

environment variables. Anything that can launch an MCP server can therefore

drive the Amiga — the server does not know or care which model is on the other

end.

Only the config file shape differs. OpenAI Codex CLI (~/.codex/config.toml

)

uses TOML:

[mcp_servers.amiga]

command = "python3"

args = ["/path/to/amimcp/server/amimcp.py"]

env = { AMIGA_HOST = "192.168.1.42", AMIGA_TOKEN = "pickasecret" }

Google Gemini CLI, Cursor, Zed, Cline, Continue,

Windsurf, LM Studio and Goose take the same mcpServers

JSON block

shown above for Claude Desktop, in their own settings file. Check your client's

current docs for the exact path — these move.

So by model:

Tested against Claude Code and Claude Desktop. The rest follow from it being a standard stdio server rather than from me having run all of them; if one needs something different, please open an issue and say what.

Requires Python 3 — standard library only, no pip install

, no venv.

AMIGA_HOST=192.168.1.42 AMIGA_TOKEN=pickasecret python3 server/amimcp.py --probe

This skips MCP entirely, so a failure here is a network or agent problem rather than a client one.

amiagent

runs arbitrary commands for anyone who can reach its port, and the

protocol is unencrypted. That is a deliberate trade: classic Amigas have no TLS

without AmiSSL, and requiring AmiSSL just to reach the machine you are trying to

repair defeats the purpose.

So: set a TOKEN

, keep it on a LAN you trust, and never forward the port.

Without a token, anything on your network segment can run Format

on your

system partition. The agent warns loudly when started without one.

The token is compared byte-for-byte (so A4000

and a4000

are different

tokens) and travels in cleartext. It stops a stray port scan, not someone with a

packet sniffer on your LAN.

An A4000/060 running Kickstart 47.115 / Workbench 47.5 (AmigaOS 3.2.3) with

Roadshow and a 1920×1080 Picasso96 RTG screen. Confirmed against that machine:

shell with stdout+stderr and return codes, file read/write, directory listing,

system info, native truecolor screen capture through cybergraphics.library

,

SGrab capture as the fallback, mouse move/click, and typing — including

äöü ÄÖÜ ß

correctly produced through the machine's German keymap.

Transfer runs at roughly 830 KiB/s, so a full 1920×1080 truecolor grab is 6.2 MB and about 7 seconds on the wire; the PNG that reaches Claude is around 850 KiB.

- One command at a time. Commands run in a child process with a deadline,

so a program waiting for input no longer wedges the agent — everything else

keeps working and

amiga_break

sends it Ctrl-C. But a stuck command does block lateramiga_shell

calls until it is broken or finishes. - The client and agent must be the same version. The wire format changed in

0.3.0; mixing 0.2.0 with 0.3.0 produces confusing errors rather than a clean

refusal.

--probe

prints the agent's version. - stderr needs OS 3.2+.

SYS_Error

arrived indos.library

v47, so on 3.2 and later stderr is captured and appended after a--- stderr ---

marker. Older systems get stdout only. - Screenshots take one of two routes. The agent captures planar screens

itself (OS 3.0+, ≤256 colours) and truecolor/RTG screens through

cybergraphics.library

, which Picasso96 and CyberGraphX both provide. If neither fits, it falls back to runningC:sgrab

on the Amiga and fetching the file — SGrab compresses on the Amiga, so it transfers far less. SGrab's JPEG mode additionally needsjpeg.library

; PNG does not. - One command at a time, one connection at a time.

- 16 MiB frame cap in both directions.

PROTOCOL.md

documents the wire format and, more usefully, why

each part looks the way it does — the framing, why there is one command per

connection, how input events are injected, and the System()

file-handle

ownership rule that caused the first real bug found on hardware.

tests/fake_agent.py

speaks the same wire protocol against a sandbox directory,

so you can build and debug the whole stack on your desktop and then change one

environment variable to hit real hardware:

python3 tests/fake_agent.py --port 7846 --root /tmp/fakeamiga

AMIGA_HOST=127.0.0.1 python3 server/amimcp.py --probe

It is a test double, not an emulator: EXEC

understands a handful of

AmigaDOS-shaped commands rather than actually running AmigaDOS.

./run_tests.sh # 69 tests, no hardware and no cross-compiler needed

PROTOCOL.md the wire format, and why it looks like that

agent/amiagent.c the Amiga daemon

agent/proto.h constants shared with the Python side

agent/Makefile m68k-amigaos-gcc build

agent/vendor/cgx/ CyberGraphX interface files (see its README)

server/amimcp.py MCP server (stdio JSON-RPC)

server/amiga.py wire protocol client

server/png.py chunky/RGB → PNG, stdlib zlib

tests/fake_agent.py host-side stand-in for the Amiga

tests/ end-to-end and protocol-drift tests

tools/amibench/ CPU/memory benchmark for comparing Amigas

tools/lhapack/ builds the release archive (macOS has no LHA writer)

install.sh register with Claude Code

tools/amibench

is a small CPU/memory benchmark for answering

"how much faster is machine A than machine B". It is standalone — it needs

nothing else installed — and there is a ready-made binary on the

releases page.

It is built for 68020 so one identical binary runs on an 020, an 040, an 060 and on Emu68's JIT; comparing separate builds would measure the compiler as much as the machine. Each phase self-calibrates to a ≥2 s window, because a fixed workload is useless across a 70× speed range — a PiStorm finished an entire 50 MB memcpy inside a single 1/50 s tick.

An A1200 + PiStorm32-lite measured ~73× an A4000/060 at 50 MHz on CPU and Fast RAM, reproducible to within 3% across two runs, and cross-checking against SysInfo putting the same pair 50.1× apart. Chip RAM does not follow — see its README for why that matters more than the headline number.

Apache 2.0 — see LICENSE. Vendored CyberGraphX interface files keep

phase5's terms; see NOTICE and

agent/vendor/cgx/README.md

.

← 一覧に戻る