iTerm MCP Server
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., "@iTerm MCP Serverrun 'npm install' in a new terminal window"
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.
ITerm MCP Server
A Model Context Protocol (MCP) server implementation for iTerm2 terminal integration. This server allows AI assistants to interact with iTerm2 terminals through the Model Context Protocol.
Features
Create and manage iTerm2 terminal sessions
Execute commands in terminals
Read terminal output
List active terminals
Close terminals
Related MCP server: MCP Terminal
Requirements
Node.js >= 14.x
iTerm2
macOS (since iTerm2 is macOS-only)
Configuration
Standard Configuration
The server uses the standard MCP configuration options. No additional configuration is required.
Cursor Configuration
To use this server with Cursor, add the following configuration to your ~/.cursor/mcp.json file:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["iterm_mcp_server"]
}
}
}
Tools
open_terminal: Open a new terminal instanceexecute_command: Execute a command in a specific terminalread_output: Read the output from a specific terminalclose_terminal: Close a specific terminallist_terminals: List all active terminals and their information
Security Considerations
The server validates all input using Zod schemas
Commands are executed in isolated terminal sessions
Proper error handling and input sanitization is implemented
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
ISC
Author
Rishab Koul
Available Tools
5 toolsclose-terminalC
Close a specific terminal
| Name | Required | Description | Default |
|---|---|---|---|
| terminalId | Yes | ID of the terminal to close |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. 'Close a specific terminal' implies a destructive action (termination of a terminal session), but it doesn't specify whether this is reversible, what happens to unsaved work, or if there are permission requirements. The description lacks critical behavioral context for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that states the core functionality without unnecessary words. It's front-loaded with the essential action and resource, making it immediately scannable and zero waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'close' entails behaviorally (e.g., termination effects, error conditions), return values, or integration with sibling tools. The agent lacks complete context to use this tool safely and effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with the single parameter 'terminalId' fully documented in the schema. The description adds no additional parameter semantics beyond what's in the schema (e.g., format examples, source of IDs, or validation rules). Baseline 3 is appropriate when the schema does all the parameter documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('close') and resource ('a specific terminal'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'list-terminals' or 'open-terminal', but the verb 'close' inherently distinguishes it from those operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an open terminal), exclusions, or relationships to sibling tools like 'open-terminal' or 'read-output'. The agent must infer usage context from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute-commandC
Execute a command in a specific terminal
| Name | Required | Description | Default |
|---|---|---|---|
| terminalId | Yes | ID of the terminal to execute command in | |
| command | Yes | Command to execute |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('execute a command') but doesn't describe what happens during execution (e.g., synchronous/asynchronous, error handling, side effects, or output retrieval). This is a significant gap for a tool that performs an action without output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of executing commands (which can have side effects) and the lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like execution mode, error handling, or how to retrieve results, leaving critical gaps for the agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with clear parameter descriptions. The description adds no additional meaning beyond the schema, such as command format examples or terminalId constraints. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('execute a command') and the target resource ('in a specific terminal'), which provides a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'read-output' which might also involve terminal interaction, so it lacks explicit sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an open terminal), exclusions, or comparisons to siblings like 'read-output' for output retrieval, leaving the agent without usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list-terminalsB
List all active terminals and their information
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists active terminals but doesn't clarify what 'active' means, whether it requires permissions, how the information is formatted, or if there are rate limits. This leaves significant gaps in understanding the tool's behavior beyond the basic action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core action and resource without any wasted words. It's appropriately sized for a simple tool with no parameters, making it easy to parse and understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate but lacks depth. It doesn't explain what 'information' includes or the return format, which could be important for an agent to use the tool effectively. However, for a basic list operation, it meets the minimum viable threshold.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0 parameters and 100% schema description coverage, the input schema fully documents the lack of parameters. The description adds no parameter-specific information, which is acceptable here since there are no parameters to explain. A baseline of 4 is appropriate as the schema handles the parameter semantics completely.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('List') and target resource ('all active terminals and their information'), making the purpose immediately understandable. It doesn't differentiate from sibling tools like 'close-terminal' or 'open-terminal', which would require explicit comparison, but it's specific enough to convey the tool's function without being tautological.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'open-terminal' or 'read-output'. It lacks context about prerequisites, such as whether terminals need to be active first, or any exclusions, leaving the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
open-terminalB
Open a new terminal instance
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Open a new terminal instance' implies a creation/mutation operation, it doesn't specify whether this requires specific permissions, what environment the terminal opens in, whether it's interactive or headless, or what happens on success/failure. For a tool with zero annotation coverage, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately scannable. Every word earns its place by conveying essential purpose without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally complete. It states what the tool does but lacks context about the terminal environment, behavioral expectations, or relationship to sibling tools. For a tool that presumably creates a new interactive session, more guidance would be helpful, but the bare description meets minimum viability.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters with 100% schema description coverage (empty schema), so there are no parameters to document. The description appropriately doesn't mention any parameters, which is correct for this case. Baseline for 0 parameters is 4, as the description doesn't need to compensate for any schema gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Open a new terminal instance' clearly states the action (open) and resource (terminal instance), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'list-terminals' beyond the obvious verb difference, nor does it specify what type of terminal (e.g., system terminal, embedded terminal) is being opened.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether a terminal must be closed first), when to use 'open-terminal' versus 'execute-command' directly, or what happens if multiple terminals are already open. The agent must infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read-outputC
Read the output from a specific terminal
| Name | Required | Description | Default |
|---|---|---|---|
| terminalId | Yes | ID of the terminal to read output from |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('read') but doesn't clarify whether this is a read-only operation, what permissions are required, how output is formatted (e.g., text stream, structured data), or if there are side effects (e.g., clearing the terminal buffer). This leaves significant gaps for a tool interacting with terminal output.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence with zero wasted words. It front-loads the core action and resource, making it highly efficient and easy to parse. Every word earns its place, achieving optimal conciseness for this simple tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of terminal operations and the lack of annotations or output schema, the description is incomplete. It doesn't explain what 'output' entails (e.g., recent lines, full buffer, real-time stream), return format, error conditions, or dependencies on other tools like 'open-terminal'. For a tool with no structured behavioral hints, this leaves too much undefined.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the single parameter 'terminalId' clearly documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('read') and target resource ('output from a specific terminal'), making the purpose immediately understandable. However, it doesn't differentiate itself from sibling tools like 'list-terminals' or 'execute-command' in terms of scope or specific use case, which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'list-terminals' (which might show terminal status) or 'execute-command' (which might produce output). There's no mention of prerequisites (e.g., needing an open terminal) or exclusions, leaving the agent to infer usage context from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v1.0.0- Changed
list-terminals1 field changed- removed
Input schema / additionalPropertiesRemoved value: -false
- Changed
open-terminal1 field changed- removed
Input schema / additionalPropertiesRemoved value: -false
5 tool updates
- First observed
close-terminal - First observed
execute-command - First observed
list-terminals - First observed
open-terminal - First observed
read-output
TDQS
Each tool has a clearly distinct purpose with no overlap: list-terminals enumerates terminals, open-terminal creates new ones, close-terminal removes them, execute-command runs commands, and read-output retrieves output. An agent can easily differentiate these functions without confusion.
All tools follow a consistent verb-noun pattern with hyphen separation (e.g., list-terminals, open-terminal, execute-command). The naming is uniform, predictable, and readable throughout the set.
With 5 tools, this server is well-scoped for terminal management. Each tool earns its place by covering essential operations: listing, opening, closing, executing commands, and reading output, which is appropriate for the domain.
The tool set provides complete lifecycle coverage for terminal management: create (open-terminal), read (list-terminals, read-output), update (execute-command), and delete (close-terminal). There are no obvious gaps, and agents can perform all core workflows without dead ends.
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 Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
The Telnyx MCP server is an official implementation of the Model Context Protocol that enables AI clients (like Claude Desktop, Cursor, and OpenAI Agents) to interact with Telnyx's telephony, messaging, and AI assistant APIs. It provides comprehensive capabilities including making and managing phone calls, sending SMS/MMS messages, purchasing and configuring phone numbers, creating AI assistants with custom instructions, managing cloud storage buckets, scraping and embedding website content, and handling integration secrets. The server exists as both a local implementation and a remotely hosted version, allowing developers to integrate real-world communication infrastructure directly into AI applications.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides programmatic access to the Windows terminal, enabling AI models to interact with the Windows command line through standardized tools for writing commands, reading output, and sending control signals.325MIT
- AlicenseCqualityCmaintenanceA server that enables AI assistants to execute terminal commands and retrieve outputs via the Model Context Protocol (MCP).327MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that gives AI models access to your iTerm terminal session, allowing them to read output, write commands, and send control characters.3110MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to control iTerm2 sessions, windows, tabs, and profiles using the official iTerm2 Python API. It includes a security model with session tagging and tiered permissions to ensure safe and controlled terminal interactions.401MIT
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/rishabkoul/iTerm-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server