Skip to main content
Glama
rishabkoul
by rishabkoul

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 instance

  • execute_command: Execute a command in a specific terminal

  • read_output: Read the output from a specific terminal

  • close_terminal: Close a specific terminal

  • list_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 tools
close-terminalC

Close a specific terminal

ParametersJSON Schema
NameRequiredDescriptionDefault
terminalIdYesID of the terminal to close

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
terminalIdYesID of the terminal to execute command in
commandYesCommand to execute

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
terminalIdYesID of the terminal to read output from

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

  1. 2 tool updatesv1.0.0
    • Changedlist-terminals1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
    • Changedopen-terminal1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
  2. 5 tool updates
    • First observedclose-terminal
    • First observedexecute-command
    • First observedlist-terminals
    • First observedopen-terminal
    • First observedread-output

TDQS

A3.6/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness5/5

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

ActivityInactive
ResponsivenessUnresponsive

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

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    A 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.
    3
    25
    MIT
  • A
    license
    C
    quality
    C
    maintenance
    A server that enables AI assistants to execute terminal commands and retrieve outputs via the Model Context Protocol (MCP).
    3
    27
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    A 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.
    3
    110
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    An 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.
    40
    1
    MIT

Latest Blog Posts

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