Persistent PTY sessions, multi-agent orchestration, and a real-time dashboard for AI coding agents — via the Model Context Protocol.
npx forge-terminal-mcp
See It In Action
The Problem
AI coding agents run commands, but can't keep processes alive, monitor long-running services, or check back on what changed.
Agent runs npm start, output vanishes after the command. Next turn? Gone. Scrollback? Gone.
With Forge:
Ring buffer persists output. Incremental reads return only what's new. Nothing lost.
Start a dev server, it blocks the agent. Kill it to do something else, now you can't check if it's still healthy. No way to keep services running and come back later.
With Forge:
10 persistent PTY sessions. Services stay alive. Batch read all of them in one call.
Agents poll for results, re-read entire outputs, waste context tokens guessing whether a process is ready.
With Forge:
Event subscriptions. Pattern matching. Agents get notified, not poll.
Core Capabilities
Real PTY via node-pty — same library as VS Code's terminal. Sessions survive across agent turns. Interactive programs, colors, TUI apps all work.
Spawn Claude and Codex as sub-agents with git worktree isolation. Agents can talk to each other — an orchestrator sends follow-up messages, sub-agents report back, enabling multi-turn conversations between agents.
subscribe_events and wait_for replace polling. Pattern matching on terminal output. Async MCP notifications.
Browser-based UI to watch what your agents are doing. Live terminal output, chat history browser, code review panel, memory monitoring. Zero build step.
Setup
No global install needed. Runs via npx.
Add Forge as an MCP server to your agent of choice.
Ask your agent to do full-stack work. Forge handles the terminals.
MCP Tools
Every tool your agent needs to manage real terminal sessions.
Quickstart
# Add Forge as an MCP server (stdio)
# With web dashboard
# Or add to ~/.claude/settings.json
{ "mcpServers": { "forge": { "command": "npx", "args": ["forge-terminal-mcp"] } } }
# Start Forge in HTTP mode first
# Add Forge as HTTP MCP server
# Stdio transport (MCP standard)
# HTTP transport
Context Window Efficiency
Up to 90% fewer tokens
Per-consumer ring buffer cursors mean each read_terminal returns only new output since the last read. Your agent's context window stays lean.