TerragonTerragon Docs
Integrations

Terry CLI & MCP

Command-line interface for interacting with Terragon that can also be used as an MCP server

npm

The Terry CLI let's you interact with Terragon directly from the command line. Create tasks, review changes, pull tasks to pick up where you left off, all from your terminal.

Requirements

  • macOS, Linux, or WSL (Windows Subsystem for Linux)
  • Node.js 18+ or newer
  • npm package manager (bun is not currently supported)

Installation

Note: Currently only npm is supported for installing the Terry CLI.

Terminal
npm install -g @terragon-labs/cli

Authentication

Terminal
terry auth

This will:

Open your browser for authentication
Generate a secure token
Store credentials safely in ~/.terragon/config.json
Confirm successful connection

Commands

terry create

Create a new task in Terragon with a message:

Terminal
# Create a task in the current repository and branch
terry create "Fix the login bug"

# Specify a different repository
terry create "Add new feature" --repo owner/repo

# Use a specific base branch
terry create "Update documentation" --branch develop

# Use existing branch without creating a new one
terry create "Quick fix" --no-new-branch

# Use a specific AI model
terry create "Refactor code" --model opus

# Create a task in plan mode (for complex tasks requiring planning)
terry create "Build new authentication system" --mode plan

Options

  • -r, --repo <repo>: GitHub repository (default: current repository)
  • -b, --branch <branch>: Base branch name (default: current branch, falls back to main)
  • --no-new-branch: Don't create a new branch (default: creates new branch)
  • -m, --model <model>: AI model to use - opus, sonnet, or gpt-5 (default: uses your default model)
  • -M, --mode <mode>: Task mode - plan or execute (default: execute)

terry pull

Pull tasks from Terragon to your local machine:

Terminal
# Interactive mode - select from recent tasks
terry pull

# Pull a specific task by ID
terry pull <taskId>

# Pull and automatically launch Claude Code
terry pull <taskId> --resume

Getting the task ID:


You can find the task ID at the end of the URL when viewing a task in Terragon. For example, in https://terragonlabs.com/tasks/abc123-def456, the task ID is abc123-def456.

Options

  • -r, --resume: Automatically launch Claude Code after pulling

Task Display

Once selected, each task shows:

  • Task title
  • Branch name
  • Repository
  • PR # (if available)

terry list

List all tasks in a non-interactive format:

Terminal
# List all tasks (automatically filters by current repo when inside a Git repository)
terry list

Task Display

Each task shows:

  • Task ID
  • Name
  • Branch
  • Repository
  • PR # (if available)

A count of your active tasks is returned after all of your tasks are listed.

Example Output

Task ID         abc123def456
Name            Fix login bug
Branch          terragon/fix-login
Repository      myorg/myrepo
PR Number       #123

Task ID         def789ghi012
Name            Add dark mode
Branch          terragon/dark-mode
Repository      myorg/myrepo
PR Number       N/A

Total: 2 tasks

terry mcp

Run an MCP (Model Context Protocol) server for the git repository:

Terminal
# Run MCP server for current directory
terry mcp

Claude Code Integration

You can add the Terry MCP server to your local Claude Code instance to enable direct interaction with Terragon tasks from within Claude:

Terminal
claude mcp add terry -- terry mcp

This integration provides Claude Code with the following capabilities:

  • terry_list: List all your Terragon tasks directly from Claude
  • terry_create: Create new tasks without leaving Claude Code
  • terry_pull: Pull task session data to continue work

The MCP server acts as a bridge between Claude Code and Terragon, allowing you to manage tasks using natural language commands within your AI coding sessions.