Skip to main content

MCP server for iTerm2 — read terminal output (and optionally drive sessions) from Claude Desktop

Project description

iterm2-py-mcp-server

MCP server for iTerm2 on macOS, written in pure Python. Lets Claude (Desktop, primarily) read what's on your terminal screens and scrollback, search inside long log dumps, and — optionally, behind a feature flag — drive iTerm2 sessions by sending text or control keys.

Status: v0.1.0, stages 0–4 complete; 8 readonly tools always available, 4 write tools behind ITERM_MCP_ALLOW_WRITE=1. See docs/PLAN.md for full status and docs/TOOLS.md for the tool reference.

Why

When you're SSH'd into a remote box and tail something long — logs, a process tree, a journalctl dump — pasting it into Claude is tedious and lossy. This MCP server gives Claude a direct, read-only window into the terminal you're already looking at, so you can just ask questions about it.

Quick start

# Install from source into the current Python environment
pip install -e .

# Or run without installing (once published)
uvx iterm2-py-mcp

Then add to your ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "iterm2": {
      "command": "iterm2-py-mcp"
    }
  }
}

Full setup walk-through (enabling the iTerm2 Python API, granting access, verifying with iterm_status) lives in docs/INSTALL.md.

Documentation

Doc What's in it
docs/README.md Documentation index
docs/PLAN.md Roadmap, stages, what's done / TODO
docs/INSTALL.md Install, build, configure Claude Desktop
docs/ARCHITECTURE.md How it's wired internally
docs/TOOLS.md Reference for every MCP tool
docs/TROUBLESHOOTING.md Common errors and fixes
docs/IDEAS.md Backlog of possible future features

License

GNU Lesser General Public License v3.0 (LGPLv3).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iterm2_py_mcp-0.1.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iterm2_py_mcp-0.1.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file iterm2_py_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: iterm2_py_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for iterm2_py_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a0398a83086d14b3876438f974fd0c627575f39f159eb76138c277f546b79182
MD5 932857419cef184359fea208df8d1d1e
BLAKE2b-256 6b6e8a182bb298815597b419d6a4d8cb70a5432f1cf1b4c8a56af046bc39e704

See more details on using hashes here.

Provenance

The following attestation bundles were made for iterm2_py_mcp-0.1.0.tar.gz:

Publisher: publish.yml on nimda7/iterm2-py-mcp-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iterm2_py_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iterm2_py_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for iterm2_py_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7b16d99037c82b402f3869ef91457e0b922c077eb8b5f29fe8bce5b6a514a51
MD5 ee8f5dfd652c079ab0d6dc4d8f82cec2
BLAKE2b-256 a1057c473b29becf8477d9a90a110a96a9e0e5e73d7152ec6e2f59e625e108a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for iterm2_py_mcp-0.1.0-py3-none-any.whl:

Publisher: publish.yml on nimda7/iterm2-py-mcp-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page