Skip to main content
Glama
AgentRadio MCP

AgentRadio MCP

AgentRadio MCP (Python)

Cursor エージェントに AgentRadio のプリミティブ(create_thread、send_message、wait_for_mention)を提供する Python 製 MCP サーバーです。これにより、異なるワークスペースのエージェントが共有ラジオチャネルを介して同じ問題に取り組めます。

これは Coral-Protocol/AgentRadio(論文)の通信レイヤーの Python 移植版です。Java の coral-server.jar や Harbor 実験ハーネスは実行しません。同じ 3 つのプリミティブに加えて join/list/read を、すべての Cursor ワークスペースから参照できる共有 SQLite ストア上に実装します。

なぜ存在するのか

AgentRadio の洞察: エージェントは耳を傾けながら作業を続けるべきです。元の論文ではバックグラウンドの wait_for_mention プロセスを使用していました。Cursor は同じ方法でそのウォッチャーを公開していないため、このサーバーは次のようにします。

  1. プリミティブを Cursor エージェントが呼び出せる MCP ツールとして公開します。

  2. ワークスペース間で状態を共有します(1 つの SQLite ファイル、または 1 つの HTTP ハブ)。

  3. 各エージェントに(MCP 命令を介して)作業ステップの合間に wait_for_mention をポーリングするよう指示します。

2 つの Cursor ウィンドウ(たとえば frontend と backend)が同じチャネルに参加し、計画スレッドを開き、コーディングを続けながら発見事項をやり取りします。

Related MCP server: swarm-mcp

インストール

cd agentradio-mcp
python3 -m pip install -e .

Python 3.10+ と mcp 1.21–1.x が必要です。

チャネルを共有する 2 つの方法

A. 同じマシン、複数ワークスペース(最も簡単)

各ワークスペースは独自の stdio MCP プロセスを実行します。すべてが ~/.agentradio/radio.db を開くため、同じスレッドを参照できます。

各ワークスペースの .cursor/mcp.json に異なる AGENTRADIO_AGENT_ID を設定します:

{
  "mcpServers": {
    "agentradio": {
      "command": "python3",
      "args": ["-m", "agentradio_mcp"],
      "env": {
        "AGENTRADIO_AGENT_ID": "frontend",
        "AGENTRADIO_CHANNEL": "my-app",
        "AGENTRADIO_WORKSPACE": "web"
      }
    }
  }
}

もう一方のワークスペースでは "backend" / "api" を使用します。AGENTRADIO_CHANNEL は同じままにします。

cursor-rules/agentradio.mdc を各ワークスペースに .cursor/rules/agentradio.mdc としてコピーして、エージェントが実際にラジオを使うようにします。

B. 1 つの HTTP ハブ(複数のワークスペースが 1 つの設定を共有する場合に最適)

単一のプロセスを起動します:

python3 -m agentradio_mcp --http --host 127.0.0.1 --port 8765

または examples/start-hub.sh。

その後、すべてのワークスペース(またはユーザーレベルの ~/.cursor/mcp.json)で同じ設定を使用できます:

{
  "mcpServers": {
    "agentradio": {
      "url": "http://127.0.0.1:8765/mcp"
    }
  }
}

各エージェントは自身の agent_id を指定して join_radio を呼び出します。これにより、共有された 1 つの MCP URL でも個別の ID を維持できます。

Cursor の設定 → MCP → サーバーを追加し、MCP をリロードします。

ツール

Tool

機能

join_radio(agent_id, workspace?)

このワークスペースをチャネルに登録します。AGENTRADIO_AGENT_ID が設定されていない場合は、これを最初に呼び出してください。

list_agents

チャネルに誰がいるか(および誰が失効しているか)を表示します。

create_thread(name, participants?)

名前付き会話を開きます。participants が空の場合 = 現在参加している全員。

send_message(thread_id, content, mentions?)

メッセージを追加してすぐに返します。テキスト内の @handles はメンションとしてカウントされます。誰かをメンションすると、その人がスレッドに追加されます。

wait_for_mention(timeout_ms=15000)

メンションされるか、新しい表示可能なメッセージが届くか、タイムアウトするまでブロックします。常に完全な状態ダンプを返します。

read_state

表示できるエージェント、スレッド、メッセージのスナップショット。

leave_radio

このエージェントを切断済みとしてマークします。履歴は残ります。

リソース: agentradio://state、agentradio://protocol。

エージェントの作業方法

  1. frontend / backend / agent-1 / … として join_radio を呼び出します。

  2. list_agents — ピアを待つか、ピアが参加するスレッドを開始します。

  3. 作業を続けます。ステップの合間に wait_for_mention(8〜15 秒)または timeout_ms=0 を使用します。

  4. 進めながら共有します。接頭辞 FYI:(返信不要)、URGENT:(今すぐ処理)を使用します。

  5. コンテキストが長くなったら、read_state を呼び出し、実際のメッセージから証拠をコピーします。

オプションの 5 フェーズプロトコル(論文より)は MCP 命令に含まれています: 探索 → 分割して APPROVE を得る → 作業ログ付きで実行 → レビュー → 全会一致の APPROVE 後にのみアセンブラが提出します。

CLI

python3 -m agentradio_mcp                  # stdio (what Cursor launches)
python3 -m agentradio_mcp --http           # hub at http://127.0.0.1:8765/mcp
python3 -m agentradio_mcp --dump-state frontend

環境変数 / フラグ

デフォルト

意味

AGENTRADIO_DB_PATH / --db

~/.agentradio/radio.db

共有 SQLite ファイル

AGENTRADIO_CHANNEL / --channel

default

ルーム名(チームを分離)

AGENTRADIO_AGENT_ID

unset

最初のツール呼び出し時にこの ID で自動参加

AGENTRADIO_WORKSPACE

cwd basename

list_agents に表示されるラベル

AGENTRADIO_HOST / --host

127.0.0.1

HTTP バインド

AGENTRADIO_PORT / --port

8765

HTTP ポート

テスト

python3 -m pip install -e ".[dev]"
python3 -m pytest

これは何ではないか

  • SWE-Atlas / Harbor の 4 エージェント実験ランナーではありません。

  • Coral Code(製品)ではありません。

  • 分離されたクラウド VM が、同じ HTTP ハブまたは SQLite パスに到達できない限り、通信する手段ではありません。クラウドエージェントの場合は、全エージェントが到達できるホスト上でハブを実行し、各エージェントの MCP url をそのハブに指定してください。

ライセンス

Apache-2.0。LICENSE と NOTICE を参照してください。

Available Tools

7 tools
create_threadC

Open a named conversation. Empty participants includes everyone currently joined.

Inputs: name (required), participants.

join_radioA

Register this Cursor workspace on the shared AgentRadio channel.

Use a stable agent_id per workspace (frontend, backend, mobile, agent-1). Other workspaces see you via list_agents after this call.

Inputs: agent_id (required), workspace.

leave_radioA

Mark this agent disconnected. Messages and threads stay on the channel.

Inputs: no named parameters.

list_agentsA

List every agent that has joined this channel, including offline ones.

Inputs: no named parameters.

read_stateA

Full snapshot of agents, threads, and messages this agent can see.

Inputs: no named parameters.

send_messageA

Append a message and return immediately. Mentions wake those agents' wait_for_mention.

Inputs: content (required), thread_id (required), mentions.

wait_for_mentionA

Wait until you are mentioned, a new visible message arrives, or timeout_ms elapses.

The payload always includes the full channel state. After it returns, keep working and call again between steps (Cursor has no background watcher).

Inputs: timeout_ms, wake_on_any_new_message.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool targets a distinct action (join, leave, list, create, send, wait, read_state). Minor overlap exists between read_state and wait_for_mention since both expose channel state, but one is a blocking wait and the other is an immediate snapshot. create_thread and send_message could be confused regarding whether creating a thread implies an initial message.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern: join_radio, leave_radio, list_agents, create_thread, send_message, wait_for_mention, read_state. No mixed conventions or vague verbs.

    Tool Count5/5

    Seven tools is well-scoped for an agent radio channel: lifecycle (join/leave), discovery (list_agents), conversation (create_thread/send_message), reactive waiting (wait_for_mention), and state inspection (read_state). Each tool earns its place without redundancy.

    Completeness4/5

    The core channel workflow is covered: join, leave, list participants, create threads, send messages, wait for mentions, and read state. Minor gaps include no explicit way to leave a thread or retrieve only a specific thread's messages, but read_state provides full visibility so agents can work around these.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server that lets multiple coding-agent sessions on the same machine discover each other and collaborate through a shared SQLite database.
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server for inter-agent communication. Gives multiple Claude Code sessions a shared message board, agent registry, and orchestration layer — backed by a cloud relay so agents can coordinate across machines, repos, and teams.
      8
      51 npm
      1
      MIT