iTerm2 Worktree MCP Server
Provides git worktree management capabilities, including creating new worktrees with feature branches, closing worktrees after verifying they're clean and pushed, and listing active worktrees.
Integrates with iTerm2 terminal to open worktrees in new tabs, switch between tabs containing worktrees, and detect which tabs are running specific worktrees across different windows.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@iTerm2 Worktree MCP Servercreate a new worktree for the authentication feature"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
iTerm2 Worktree MCP Server
A Model Context Protocol (MCP) server that automates git worktree management with iTerm2 integration for Claude Code.
https://github.com/user-attachments/assets/16188878-8fe8-450c-b2a3-cfd617d74f43
Installation
Add to Claude Code:
claude mcp add -s user worktree -- python3 path/to/worktree_mcp_server.pyRelated MCP server: Claude Team MCP Server
Features
Core Worktree Management
Create Worktree: Creates a new git worktree with a feature branch and opens it in a new iTerm2 tab
Close Worktree: Safely closes worktrees after verifying they're clean and pushed
Open Worktree: Opens an existing worktree in a new iTerm2 tab (with force option to override if already open)
Navigation & Discovery
Active Worktrees: Lists all git worktrees and shows which iTerm2 tabs they're running in
Switch to Worktree: Quickly switch to a worktree's iTerm2 tab by name or specific tab ID
Smart Tab Detection
Dynamic Discovery: No metadata files - finds tabs by analyzing their working directories in real-time
Multi-Tab Support: Shows all tabs running the same worktree across different windows
Window Context: Identifies which tabs are in the current window with
thisWindowflag
Available Tools
Tool | Description | Parameters |
| Create new worktree + branch, open in iTerm2 tab |
|
| Validate, close, and cleanup worktree |
|
| List all worktrees and their iTerm2 tabs | None |
| Switch to worktree's iTerm2 tab |
|
| Open existing worktree in new tab |
|
Workflow
Create:
createWorktree- Specify feature name, branch name, and worktree folder - automatically creates the worktree and switches to a new iTerm2 tabNavigate:
switchToWorktreeoropenWorktree- Seamlessly move between worktreesMonitor:
activeWorktrees- See all worktrees and their active tabsDevelop: Work in isolated worktree environments with full iTerm2 integration
Close:
closeWorktree- Verify changes are committed and pushed, then safely remove the worktree
Perfect for feature development with isolated git environments and seamless iTerm2 integration.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceOrchestrates multiple Claude Code agents across iTerm2 sessions with process-level isolation, enabling collaborative AI development workflows on multiple codebases with task-based inter-agent communication and persistent state management.Last updated71MIT
- Alicense-qualityCmaintenanceEnables Claude Code to orchestrate a team of independent Claude Code sessions within iTerm2 for parallel task execution and isolated git worktree management. It provides tools to spawn, monitor, and message worker sessions while maintaining full visibility and control over their terminal windows.Last updated48MIT
- AlicenseBqualityCmaintenanceManages multiple AI CLI instances (Claude Code, Codex, Gemini, Cursor) in tmux sessions for parallel task execution, with optional git worktree support.Last updated90MIT
- Alicense-qualityCmaintenanceEnables Claude Desktop to spawn new Claude Code instances in iTerm2 windows for interactive coding sessions.Last updated9MIT
Related MCP Connectors
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Edit your Overleaf LaTeX projects from Claude and ChatGPT; every change is a real Git commit.
Live SEO workflow tools for Claude Code, Codex, and AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/timoconnellaus/claude-code-iterm-worktree-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server