Skip to main content
Glama

t3-mcp

Host-independent MCP connector for directly pairing T3 Code environments. It does not require T3 Connect, a host-specific bot setup, or a local turn CLI.

Install

Node.js 20 or newer is required.

npm install -g t3-mcp
t3-mcp

The process speaks MCP over stdio. A generic host configuration is:

{
  "mcpServers": {
    "t3-mcp": {
      "command": "t3-mcp",
      "args": [],
      "env": {
        "T3_MCP_STATE_DIR": "/absolute/path/to/t3-mcp-state"
      }
    }
  }
}

T3_MCP_STATE_DIR is optional. Omit it to use the platform state directory outside the repository. A host that does not use globally installed commands can use "command": "npx" with "args": ["--yes", "t3-mcp"].

The package contains exactly one skill, t3-run-turn, at skills/t3-run-turn/SKILL.md. It is host-neutral and uses MCP tools rather than shell commands.

Related MCP server: t3code-mcp

Workflow

  1. Pair directly with an environment using add_environment and either a pairingUrl or an endpoint plus grant. A pairing URL may carry its grant in a ?token=... query or #token=... fragment. T3 Connect is not required.

  2. Call list_environments, select an explicit environment id, then call list_projects with that id. Project and thread identifiers are scoped to the selected environment.

  3. Use start_turn with environmentId, projectId, and prompt for a new thread. Use continue_turn with environmentId, threadId, and prompt for a new turn in an existing thread. A continuation never forks or silently queues work.

  4. Observe with get_thread. History is bounded to 20 turns by default and 100 at most. When history.hasMore or history.truncated is true, pass history.nextCursor as beforeCursor to retrieve an older page instead of requesting unbounded history.

  5. If a thread reports approval_required or input_required, resolve it in T3 Code and call get_thread again. This connector does not approve work or submit input on the user's behalf.

  6. If start_turn or continue_turn returns unknown, do not retry immediately. Inspect the referenced thread with get_thread first; only then decide whether a retry is safe. Mutation requests are never automatically replayed.

After adoption, normal turns use these MCP tools. A local turn CLI, if one is available in a host, is an optional debugging utility; this package never invokes t3-turn. Optional Connect support is not part of this release chain.

Tools

  • add_environment: pairingUrl?, endpoint?, grant?, label?, environmentId?.

  • list_environments: no arguments.

  • list_projects: environmentId.

  • start_turn: environmentId, projectId, prompt, and optional modelSelection.

  • continue_turn: environmentId, threadId, prompt.

  • get_thread: environmentId, threadId, and optional bounded turnLimit/beforeCursor.

Pairing URLs use the upstream ?token=... or #token=... form. The response never includes the grant, access token, authenticated URL, or raw upstream error body.

Mutation acknowledgements are not replayed. A partial result keeps the created thread reference, and an ambiguous transport result is unknown so the caller can inspect the thread before retrying.

Security

  • HTTPS is required except for loopback endpoints.

  • URL credentials and arbitrary query parameters are rejected. A pairing URL query may contain only token, and the connector removes it before making requests. Endpoint URLs with an explicit grant remain query-free.

  • Redirects are rejected, so credentials are never forwarded to another origin.

  • The registration file is outside the repository, owner-only, and atomically replaced.

  • A failed re-pair leaves the existing registration unchanged.

Supported contract

See docs/compatibility.md for the upstream version and the exact descriptor, token exchange, scopes, and session checks used by this package.

Automated compatibility coverage runs an MCP client against the connector process and controlled HTTP environments implementing the supported direct-pairing contract. No live direct-pairing smoke check was run for this release because this workspace has no operator-provided environment endpoint or grant; the controlled checks must not be read as a claim that a live T3 deployment was exercised.

Available Tools

6 tools
add_environmentC

Pair a T3 Code environment directly and save its scoped session for future MCP requests.

Inputs: grant, label, endpoint, pairingUrl, +1 more. Returns: error, environment

continue_turnB

Submit a new turn to an explicitly selected existing thread.

Inputs: prompt (required), threadId (required), environmentId (required). Returns: error, continuation

get_threadA
Read-onlyIdempotent

Read one thread from an explicitly selected environment with bounded, paginated history.

Inputs: threadId (required), environmentId (required), turnLimit, beforeCursor. Returns: error, thread

list_environmentsA
Read-onlyIdempotent

List saved T3 Code environments without returning credentials.

Inputs: no named parameters. Returns: error, environments

list_projectsA
Read-onlyIdempotent

List projects from one explicitly selected T3 Code environment.

Inputs: environmentId (required). Returns: error, projects, environmentId

start_turnA

Create a thread and submit its first turn in an explicitly selected environment and project.

Inputs: prompt (required), projectId (required), environmentId (required), modelSelection. Returns: error, start

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

    Disambiguation5/5

    Each tool targets a distinct resource and action: projects vs environments vs threads, and actions are clearly separated (list, add, start, continue, get). No ambiguity in purpose.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (list_projects, add_environment, start_turn, etc.), making the API predictable and easy to navigate.

    Tool Count5/5

    Six tools is well-scoped for managing environments and thread interactions; each tool has a clear role and the count feels neither bloated nor sparse.

    Completeness4/5

    The core workflows of environment setup and thread lifecycle (start, continue, read) are covered, but operations like deleting environments or listing threads are missing, which agents may occasionally need.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables external agents to list T3 environments and projects, start coding threads, monitor progress, send follow-up instructions, and interrupt running turns via MCP.
      7
      3
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to interact with real terminal sessions across local and remote hosts, driving multi-turn interactive programs like TUIs, REPLs, and SSH prompts through MCP.
      72
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Connects ChatGPT and MCP clients to authorized local development environments, enabling secure file access, shell execution, persistent tasks, browser/desktop control, and remote management of projects.
      21
      MIT