t3-shadow-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
t3-shadow-mcp
English | 简体中文 | Antigravity V3 Lossless Patch (macOS & Windows)
Zero-dependency local MCP server for T3 Code that equips every agent (Claude Code, Codex, Antigravity, etc.) with parallel hot-memory shadow-cloning, SL conversation rollback (including delegated subagents), and batch sidebar cleanup — with zero modifications to T3 Code for Claude Code & Codex, plus a bundled cross-platform Antigravity V3 Lossless Patch Suite (macOS & Windows) to bring Antigravity to the exact same 100% lossless tier.
Why t3-shadow-mcp?
T3 Code's built-in MCP lets agents delegate blank subagents (delegate_task) or fork a single thread (t3_thread_transfer), but leaves two major gaps for multi-agent orchestration:
No programmatic rollback: T3's built-in MCP does not expose
checkpoint.rollback. When a subagent or branch goes off-track or pollutes its context with dead-end tool output, orchestrators cannot rewind it — forcing them to either drag dirty history forward or burn tokens starting from scratch.Clunky warm fan-out & sidebar clutter: Spawning N parallel workers from a warm subagent that already understands a large codebase requires chaining multiple manual calls, lacks cold-start staggering, doesn't verify
native_forkvs lossyportable_contextfallback, and leaves finished clones scattered across the sidebar.
t3-shadow-mcp speaks T3 Code's native local WebSocket RPC (orchestration.getThreadProjection & orchestration.dispatchCommand) directly, packaging all four operations into clean MCP tools plus a reusable shadow-clone Skill.
Related MCP server: agent-intern
Works on Stock T3 Code (Zero Source Patching Required)
Provider | Stock T3 Code ( | Stock T3 Code ( | Notes |
Claude Code | 100% lossless | 100% lossless ( | Full hot-memory cloning & rewind out of the box |
Codex | 100% lossless | 100% lossless ( | Full hot-memory cloning & rewind out of the box |
Antigravity | Works ( | Supported when adapter exposes rollback | Use the bundled |
Requirements
Node.js >= 22.0.0 (uses built-in native
WebSocket; zero externalnpmdependencies)A running local T3 Code server (
~/.t3/userdata/server-runtime.json) and thet3CLI available locally (used once to mint a single reusable scoped bearer session)
Installation
Clone the repository anywhere on your machine:
git clone https://github.com/kbykb/t3-shadow-mcp.git ~/.local/share/t3-shadow-mcp
chmod +x ~/.local/share/t3-shadow-mcp/server.mjsVerify the MCP server over stdio:
node --check ~/.local/share/t3-shadow-mcp/server.mjsRegister as an MCP Server
Antigravity (~/.gemini/config/mcp_config.json)
{
"mcpServers": {
"t3-shadow": {
"command": "node",
"args": ["/absolute/path/to/t3-shadow-mcp/server.mjs"],
"tools": {
"shadow_list_checkpoints": { "eager": true },
"shadow_fork_batch": { "eager": true },
"shadow_rollback": { "eager": true },
"shadow_cleanup": { "eager": true }
}
}
}
}Claude Code (claude mcp add or .mcp.json)
claude mcp add --transport stdio t3-shadow -- node /absolute/path/to/t3-shadow-mcp/server.mjsOr in .mcp.json:
{
"mcpServers": {
"t3-shadow": {
"command": "node",
"args": ["/absolute/path/to/t3-shadow-mcp/server.mjs"]
}
}
}Codex (~/.codex/config.toml)
[mcp_servers.t3-shadow]
command = "node"
args = ["/absolute/path/to/t3-shadow-mcp/server.mjs"]T3 Code MCP Settings
You can also register t3-shadow directly in T3 Code's MCP server configuration (Settings → MCP Servers, or via T3's t3_mcp_server_update tool) with command node and args ["/absolute/path/to/t3-shadow-mcp/server.mjs"].
Optional: Install the shadow-clone Skill
Copy or symlink skills/shadow-clone into your harness's global skills directory so orchestrator agents know the exact fan-out, rollback, sharding, and cleanup protocol:
# Antigravity global skills
mkdir -p ~/.gemini/config/skills
ln -sfn ~/.local/share/t3-shadow-mcp/skills/shadow-clone ~/.gemini/config/skills/shadow-clone
# Claude Code global skills
mkdir -p ~/.claude/skills
ln -sfn ~/.local/share/t3-shadow-mcp/skills/shadow-clone ~/.claude/skills/shadow-cloneTools Reference
1. shadow_list_checkpoints
Inspects any top-level thread or delegated subagent (thread:delegated-task:...) and returns its rollback/fork-eligible checkpoints (newest first), excluding repository-only scopes, stale checkpoints, and already rolled_back runs.
Parameter | Type | Required | Default | Description |
|
| Yes | — | Top-level or |
|
| No |
| Max recent checkpoints to return ( |
2. shadow_fork_batch
Forks a warm thread or subagent into 1..16 parallel branches sharing its full hot memory, optionally dispatches each branch's first prompt with configurable cold-start staggering, and verifies whether each branch resolved as native_fork or downgraded to portable_context.
Parameter | Type | Required | Default | Description |
|
| Yes | — | Source T3 thread ID (top-level or delegated subagent) |
|
| No |
|
|
|
| Yes | — | 1–16 objects: |
|
| No |
| Delay in ms between launching branch prompts ( |
Tip: Keep
branches[i].modelwithin the same provider instance to preservenative_fork. Forked threads do not auto-wake the parent — collect results witht3_thread_wait+t3_thread_read, then archive withshadow_cleanup.
3. shadow_rollback
Rewinds a top-level thread or delegated subagent back N turns or to an explicit checkpointId.
Parameter | Type | Required | Default | Description |
|
| Yes | — | Target T3 thread ID |
|
| One of | — | Number of recent turns to undo ( |
|
| One of | — | Explicit checkpoint ID from |
|
| No |
| Keep |
4. shadow_cleanup
Batch-archives finished shadow-clone threads so they don't clutter your T3 Code sidebar.
Parameter | Type | Required | Default | Description |
|
| Yes | — | Array of thread IDs to archive |
Typical Multi-Agent Workflows
Pattern A: Warm Subagent Parallel Fan-Out
A research subagent (
thread:delegated-task:...) reads 40 files across a monorepo and finishes Turn 1.The coordinator calls
shadow_fork_batchwithsourceThreadId = <subagentThreadId>and 3 branches (e.g., Security Review, Performance Audit, Test Plan) — all 3 inherit the warm context immediately vianative_forkwith zero redundant file reads.The coordinator collects outputs with
t3_thread_wait+t3_thread_read, then callsshadow_cleanupon the 3 clone IDs.
Workspace isolation for editing clones:
thread.forkinherits the source thread's checkout directory. Read-only clones can share it safely; code-writing clones should either operate on strictly disjoint files/directories or move into their own git worktree (t3_worktree_handoff) before editing.
Pattern B: Off-Track Subagent SL Rollback
A long-running subagent goes down a dead end on Turn 5 and fills its context with failed build logs.
The coordinator calls
shadow_rollback({ threadId: "<subagentThreadId>", lastNTurns: 1, restoreFiles: false }).The coordinator sends a refined prompt via
t3_thread_send— the subagent retains all knowledge from Turns 1–4 while completely forgetting the bad Turn 5.
Configuration (Environment Variables)
Variable | Description | Default |
| Path to T3 Code's |
|
| Directory where the cached single bearer |
|
| Explicit path to the | Auto-detected ( |
Security & Safety Design
Zero
auth_sessionsleak: Uses an atomic lockfile (session.lock) and caches a single scoped bearer session (orchestration:read,orchestration:operate, 30-day TTL) insession.jsonwith mode0600(directory0700). When refreshed, the old session is automatically revoked. Tokens are never printed tostdoutorstderr.Safe shared-workspace rollback:
shadow_rollbackdefaults torestoreFiles: falseso rolling back a delegated subagent or shared-directory clone never hitsSHARED_WORKSPACE_RESTORE_MESSAGEor clobbers sibling threads' workspace edits.Cold-start stagger:
shadow_fork_batchdefaults tostaggerMs: 1800between branch launches, mitigating concurrent cold-start races on providers that share an app-data directory.Strict stdio hygiene:
stdoutis strictly reserved for newline-delimited JSON-RPC 2.0 frames; diagnostics go tostderronly.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Shared memory and mail for your AI agents. Verified with Claude Code; other MCP clients in testing.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceLocal MCP server for Claude Code providing persistent memory, task planning, and agent coordination with full transparency and no network calls.2MIT
- AlicenseAqualityAmaintenanceAn MCP server that bridges Claude Code with Antigravity CLI using a Swarm Agent architecture to optimize local development workflows and minimize LLM token costs. Includes a web UI for monitoring agent workflows.33604 PyPI35MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that lets multiple AI coding agents share state, preserve context across sessions, and coordinate via a knowledge graph, messaging, and branch-preserving checkpoint/resume with conflict handling.62 npm1Apache 2.0
- AlicenseAqualityBmaintenanceLocal MCP server for specialist personas, reusable Markdown workflows, task-scoped subagent contracts and per-repository memory. Runs on your own computer with Python 3.11+ and a locally installed embedding model; its Claude Code plugin launches that separate installation.4815MIT