Forge is a terminal MCP server for AI coding agents, enabling MCP-compatible clients such as Claude Code, Codex, and Gemini CLI to create, manage, and monitor real PTY sessions. It solves the problem that agents can usually only run one command at a time, allowing tasks such as frontend, backend, and database migrations to run in parallel, and reading only new output.
Main capabilities: real PTY based on node-pty, supporting interactive programs, colors, and TUIs; incremental reading via a ring buffer and consumer cursor, so each read_terminal returns only new output, saving context tokens; read_screen is rendered server-side via @xterm/headless, returning a plain-text view without ANSI escape codes; multi-agent orchestration supports spawning Claude, Codex, and Gemini sub-agents, session grouping, output multiplexing, event subscriptions, and templates; a web dashboard based on Preact, allowing real-time viewing of all terminals, browsing historical sessions, and monitoring activity; zero configuration, usable with a single npx command or an HTTP MCP endpoint.
Usage: after installation, the forge command is globally available. Add the HTTP transport endpoint to the MCP client configuration (such as Codex's ~/.codex/config.toml), start the daemon, and restart the agent. It provides 23 tools, covering 7 categories including session lifecycle and agent delegation. run_command is suitable for one-off commands such as builds, tests, and installations; create_terminal is suitable for long-running sessions such as development servers, listeners, and REPLs. It supports waitForExit and pattern matching, fromSession to specify a sub-agent's working directory, and worktree isolation for parallel agents. Sessions are also exposed as MCP resources at terminal://sessions/{sessionId}.
Applicable scenarios: running multiple services in parallel in full-stack development, multi-agent codebase research, build and test automation, and TUI application monitoring.
Limitations: requires macOS, Linux, or Windows and node-pty must be buildable; sessions automatically close after 30 minutes of inactivity by default; the prebuilt macOS desktop app is currently unavailable, so you need to run from source or use the CLI; when the dashboard is enabled with --auth-token, access requires the token.Question.