Skip to main content
Glama

Polyphonia

A local console and MCP server for coordinating coding agents across your machine and SSH GPU servers.

English | 简体中文


Polyphonia lets you inspect, switch, and dispatch work across coding agents (Codex, Antigravity, Claude Code, Kimi Code, QCoder, dsh, Gemini CLI, Pi, Hermes, or your own CLI tools) running on both your laptop and remote SSH servers — without installing any remote daemon.

What It Does

  • Runs over plain SSH: Connects to lab and GPU servers via ssh -o BatchMode=yes with no background service or open ports on remote hosts.

  • Keeps your existing tools: Reuses each agent's own login, sandbox, and local session files (read-only SQLite ?mode=ro and rollout.jsonl for Codex; local ConversationService for Antigravity; headless CLI flags for everything else).

  • Checks policy before dispatch: Enforces sandbox mode (read_only by default), live nvidia-smi free-GPU counts (forbid / allow / require_free), and directory allowlists (with remote realpath checks), logging every run and block to a local SQLite ledger.

  • Web console + MCP: Use the browser console at http://127.0.0.1:7842, or plug polyphonia mcp into Antigravity, Codex, or Claude Code so your main agent can coordinate the rest.

  • Minimal runtime: Python 3.11+ standard library and PyYAML only.

Related MCP server: OpenCode Agent Client

Architecture

See docs/architecture.md for module layout, REST endpoints, MCP tools, and security boundaries.

Try the Demo

Explore the console with simulated hosts, 4× RTX 3090 telemetry, sample sessions, and live guardrail checks without touching your config or SSH hosts:

python3 -m pip install -e .
polyphonia ui --demo

Open http://127.0.0.1:7842.

Quick Start

# Launch the local console (defaults to local host + 9 built-in adapters)
polyphonia ui

# Inspect hosts, GPUs (with process owners), and sessions from the terminal
polyphonia doctor
polyphonia hosts --probe
polyphonia gpus
polyphonia sessions

# Simulate a policy check before running anything
polyphonia dispatch \
  --host gpu-lab \
  --adapter codex \
  --cwd /srv/projects/eval-suite \
  --gpu-policy require_free \
  --min-free-gpus 2 \
  --dry-run \
  "Run evaluation sweep"

# Request a read-only cross-model review
polyphonia cross-review \
  --host local \
  --adapter codex \
  --cwd /path/to/repo \
  --question "Check concurrency locks, path handling, and missing tests."

# Print an MCP config snippet for your primary agent
polyphonia snippet antigravity
polyphonia snippet codex
polyphonia snippet claude

To configure SSH hosts, remote proxies, custom PATH prefixes, or directory allowlists, copy polyphonia.example.yaml to ~/.config/polyphonia/config.yaml (or set POLYPHONIA_CONFIG).

Supported Adapters

Adapter

Driver

Session Discovery & Peek

Dispatch

Spec

Codex

codex

Read-only state_5.sqlite + rollout.jsonl

codex queue --resume or codex exec

Built-in

Antigravity

antigravity

Local ConversationService RPC

CreateConversation

Built-in

Claude Code

generic_cli

—

claude -p [--permission-mode plan]

claude-code.yaml

Kimi Code

generic_cli

—

kimi --print [--plan]

kimi-code.yaml

QCoder

generic_cli

—

qcoder --approval-mode plan|auto-edit

qcoder.yaml

dsh

generic_cli

—

dsh --profile headless --permission-mode ...

dsh.yaml

Gemini CLI

generic_cli

—

gemini

gemini-cli.yaml

Pi

generic_cli

—

pi

pi.yaml

Hermes

generic_cli

—

hermes

hermes.yaml

Custom CLIs

generic_cli

—

Add from the UI or YAML

~/.config/polyphonia/config.yaml

MCP Tools

polyphonia mcp exposes 7 tools over stdio JSON-RPC (both newline-delimited and Content-Length framing):

list_hosts_and_gpus · list_adapters · list_sessions · peek_session · dispatch_task · await_dispatch · cross_review

Tests

PYTHONPATH=src python3 -m unittest discover -s tests -v

License

MIT — see LICENSE.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Enables any MCP host to delegate work to multiple coding-agent CLIs such as Codex, Claude Code, and Antigravity as subagents, preserving native sessions and supporting team-based supervision and agent-to-agent messaging.
      17
      19 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables coding agents to discover projects, models, and sessions on an existing OpenCode server; delegate and supervise tasks; inspect progress, tool results, and diffs; answer authorized permission requests; and interrupt or redirect work via MCP or a JSON CLI.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables coordinating local coding agents across Antigravity, DeepSeek Harness, Claude Code, and OpenCode with persistent tasks, live public events, file-change artifacts, session follow-ups, process-tree cancellation, and configurable execution permissions.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Lets a coordinator coding agent dispatch, wait on, inspect, and cancel work handed to local worker CLI agents, then retrieve paged results, changed files, and session transcripts. It also probes available workers and reports their remaining quota and status, while persisting coordinator routing preferences.
      3
      AGPL 3.0