Skip to main content
Glama

t3code-mcp

MCP server for a running T3 Code instance. See which agent threads exist and what they need, read their history, send them messages, approve their permission requests — from Claude Code, Claude Desktop, or (the end goal) a voice-controlled model like Hermes while away from a screen.

See SPEC.md for the design and PLAN.md for the phased build.

Setup

pnpm install && pnpm build
  1. Make sure T3 Code is running (desktop app or npx t3@latest).

  2. Mint a bearer token for the local T3 server and put it in .env (or export it):

npx t3@latest auth session issue --token-only --label t3code-mcp --ttl 365d
echo "T3_TOKEN=<the token>" > .env
  1. Sanity check against the live server (read-only):

pnpm smoke

Related MCP server: openclaw-mcp

Connect from Claude Code

claude mcp add --scope user t3code -- node /Users/thomascrundwell/Documents/projects/t3code-mcp/dist/index.js

(Token is picked up from .env in this directory; alternatively pass --env T3_TOKEN=....)

Tools

Visibility — t3_status, list_projects, list_threads (filter by project / attention state), get_thread, search_threads

Messaging & control — send_message, create_thread, wait_for_turn (send-and-wait round trip), interrupt_thread, stop_thread, archive_thread, unarchive_thread, set_thread_title

Hands-free interaction — pending_actions (cross-thread "what needs me?" inbox), respond_to_approval, respond_to_user_input

Voice layer — thread_digest and workspace_digest (TTS-friendly spoken summaries), wait_for_change (long-poll until anything needs attention)

Every thread carries a single attention state: needs-approval | needs-input | plan-ready | working | error | done | idle.

Remote / voice clients (HTTP mode)

For a remote voice agent (e.g. Hermes over Tailscale), run the streamable-HTTP transport with its own bearer token:

MCP_HTTP_TOKEN=<secret> node dist/index.js --http --port 3774 --host 0.0.0.0

Clients connect to http://<machine>:3774/ with Authorization: Bearer <secret>. Binds to 127.0.0.1 unless --host is given; T3 Code itself stays localhost-only.

Testing

  • pnpm smoke — read-only pass over every query tool against the live server.

  • node scripts/smoke.mjs --mutate <projectId> — additionally runs the full write loop (create disposable thread → agent replies → follow-up message → rename → stop → archive). Use a scratch project; "t3code-mcp scratch" (/tmp/t3code-mcp-scratch) exists for this.

Notes / limitations

  • Uses T3's HTTP JSON API only (/api/orchestration/*). Live push, git-worktree bootstrap, and turn diffs are WebSocket-RPC-only in T3, so: updates are polled, and create_thread runs threads directly in the project workspace (start worktree threads from the T3 UI).

  • Image attachments not yet supported on send_message.

  • Revoke access anytime: npx t3@latest auth session list / ... revoke.

Available Tools

19 tools
archive_threadArchive a threadA

Archive a thread (hides it from the active list; reversible).

Inputs: threadId (required).

create_threadStart a new T3 threadA

Create a new agent thread in a project and send its first message, starting the agent. The thread runs directly in the project workspace (worktree isolation is only available from the T3 UI). Model defaults to the project's default, falling back to the project's most recent thread's model. runtimeMode defaults to approval-required (safest); pass full-access for autonomous work.

Inputs: message (required), projectId (required), model, title, +3 more.

get_threadRead a T3 threadA

Read a thread's recent conversation: messages from the last N turns, session status, any pending approval/user-input requests (with requestIds needed to respond), and an activity overview. Use beforeCursor from a previous call to page further back.

Inputs: threadId (required), turnLimit, beforeCursor, includeActivities.

interrupt_threadInterrupt a running turnB

Interrupt the agent's current turn on a thread (like pressing stop). The thread and session survive; you can send a new message afterwards.

Inputs: threadId (required).

list_projectsList T3 projectsA

List the projects (workspaces/repos) registered in T3 Code, with per-project counts of active and attention-needing threads.

Inputs: no named parameters.

list_threadsList T3 threadsA

List agent threads in T3 Code, most recently updated first. Filter by project, attention state (needs-approval, needs-input, plan-ready, working, error, done, idle), or include archived threads. Each row includes the thread's attention state — what, if anything, it needs from the human.

Inputs: limit, attention, projectId, includeArchived.

pending_actionsWhat needs me?A

Cross-thread inbox: every thread currently blocked on the human — pending command/file approvals (with the exact request detail), unanswered agent questions, actionable proposed plans, and errored sessions. Includes the requestIds needed by respond_to_approval / respond_to_user_input.

Inputs: no named parameters.

respond_to_approvalRespond to a permission requestA

Approve or decline a pending permission request (command execution, file read, file change) on a thread. Get the requestId from pending_actions or get_thread. Decisions: accept (once), acceptForSession (don't ask again this session), decline, cancel.

Inputs: decision (required), threadId (required), requestId (required).

respond_to_user_inputAnswer an agent's questionA

Answer a pending user-input request (an agent asked a question with options or free text). Get the requestId and the question structure from pending_actions or get_thread; answers is an object keyed by question id.

Inputs: answers (required), threadId (required), requestId (required).

search_threadsSearch threadsA

Find threads by words from the title, project name, or branch (case-insensitive substring match on each word). Searches active and archived threads.

Inputs: query (required), limit.

send_messageSend a message to a T3 threadA

Send a user message to an existing thread and start an agent turn. Reuses the thread's current model, runtime mode, and interaction mode unless overridden. If the agent is mid-turn the message is queued by T3. Returns immediately; use wait_for_turn or get_thread to see the reply.

Inputs: message (required), threadId (required), runtimeMode, interactionMode.

set_thread_titleRename a threadA

Set a thread's title (useful for voice: 'call this one auth bug').

Inputs: title (required), threadId (required).

stop_threadStop a thread's agent sessionA

Shut down the provider process attached to a thread. The thread and its history remain; a new session starts automatically on the next message.

Inputs: threadId (required).

t3_statusT3 Code statusA

Check the local T3 Code server: is it running, is auth working, and a summary of projects/threads (how many are working, how many need attention). Use this first if anything else fails.

Inputs: no named parameters.

thread_digestSpeakable thread digestA

A TTS-friendly plain-language digest of one thread: what it's doing, what the agent last said (markdown/code stripped), and anything it's waiting on. Designed to be read aloud by a voice assistant.

Inputs: threadId (required), maxReplyChars.

unarchive_threadUnarchive a threadB

Bring an archived thread back to the active list.

Inputs: threadId (required).

wait_for_changeWait for anything to changeA

Long-poll the workspace until any thread changes attention state (a turn finishes, an approval appears, an error occurs) or the timeout passes. Returns the changed threads with old and new state. Lets a voice loop stay silent until something actually happens.

Inputs: timeoutSeconds.

wait_for_turnWait for the agent's replyA

Block until the thread's current turn finishes OR the agent asks for approval/input, then return the latest assistant message or the pending request. Use after send_message or create_thread for a single round-trip. Times out (default 120s, max 300s) with the current state.

Inputs: threadId (required), timeoutSeconds.

workspace_digestSpeakable workspace briefingA

One-line-per-thread briefing across all projects — the 'what are my agents doing' answer. Covers threads needing attention first, then working, then recently finished. TTS-friendly 'spoken' field plus structured rows.

Inputs: sinceHours.

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 19 tools

    Disambiguation4/5

    Most tools target a distinct resource and action (threads, projects, approvals), but a few could be confused: interrupt_thread vs. stop_thread both halt work, and wait_for_turn vs. wait_for_change both block on state changes. The descriptions clarify these enough to avoid real misselection.

    Naming Consistency3/5

    All names use snake_case, but the pattern is mixed: most are verb_noun (list_threads, send_message, get_thread), yet several are noun-only (pending_actions, thread_digest, workspace_digest) or use a prefix (t3_status). This inconsistency makes predicting tool names harder than a uniform verb_noun convention.

    Tool Count3/5

    At 19 tools, the set is at the heavy end of the typical range. Each tool appears to have a genuine purpose, but some can feel redundant (two wait tools, two digest tools), making the surface larger than strictly necessary.

    Completeness4/5

    The tool surface covers the full thread lifecycle well: create, list, read, message, interrupt, stop, archive, unarchive, and title threads, plus approval handling and status monitoring. Minor gaps include no permanent thread deletion and limited project management, but these are not core to the server's apparent purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers