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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0398a83086d14b3876438f974fd0c627575f39f159eb76138c277f546b79182
|
|
| MD5 |
932857419cef184359fea208df8d1d1e
|
|
| BLAKE2b-256 |
6b6e8a182bb298815597b419d6a4d8cb70a5432f1cf1b4c8a56af046bc39e704
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
iterm2_py_mcp-0.1.0.tar.gz -
Subject digest:
a0398a83086d14b3876438f974fd0c627575f39f159eb76138c277f546b79182 - Sigstore transparency entry: 1642418895
- Sigstore integration time:
-
Permalink:
nimda7/iterm2-py-mcp-server@7f7ddf54d12c95bc6abab7e06a6850a7a6e586a5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/nimda7
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7f7ddf54d12c95bc6abab7e06a6850a7a6e586a5 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7b16d99037c82b402f3869ef91457e0b922c077eb8b5f29fe8bce5b6a514a51
|
|
| MD5 |
ee8f5dfd652c079ab0d6dc4d8f82cec2
|
|
| BLAKE2b-256 |
a1057c473b29becf8477d9a90a110a96a9e0e5e73d7152ec6e2f59e625e108a1
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
iterm2_py_mcp-0.1.0-py3-none-any.whl -
Subject digest:
c7b16d99037c82b402f3869ef91457e0b922c077eb8b5f29fe8bce5b6a514a51 - Sigstore transparency entry: 1642419045
- Sigstore integration time:
-
Permalink:
nimda7/iterm2-py-mcp-server@7f7ddf54d12c95bc6abab7e06a6850a7a6e586a5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/nimda7
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7f7ddf54d12c95bc6abab7e06a6850a7a6e586a5 -
Trigger Event:
push
-
Statement type: