GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
作者による説明(英語の原文)
MCP server for interactive terminal sessions — SSH, REPLs, database CLIs, TUI apps
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
使っているAIアプリを選んで、設定をコピーしてください。
TERMINAL_MCP_MAX_SESSIONS, TERMINAL_MCP_IDLE_TIMEOUT必要なもの
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます
{
"mcpServers": {
"terminal": {
"command": "uvx",
"args": [
"terminal-mcp"
],
"env": {
"TERMINAL_MCP_MAX_SESSIONS": "your-value",
"TERMINAL_MCP_IDLE_TIMEOUT": "your-value"
}
}
}
}ターミナルでこれを実行します
claude mcp add terminal --env TERMINAL_MCP_MAX_SESSIONS=your-value --env TERMINAL_MCP_IDLE_TIMEOUT=your-value -- uvx terminal-mcp動かす前に、空欄の値を入力してください。
プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"terminal": {
"command": "uvx",
"args": [
"terminal-mcp"
],
"env": {
"TERMINAL_MCP_MAX_SESSIONS": "your-value",
"TERMINAL_MCP_IDLE_TIMEOUT": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"terminal": {
"type": "stdio",
"command": "uvx",
"args": [
"terminal-mcp"
],
"env": {
"TERMINAL_MCP_MAX_SESSIONS": "your-value",
"TERMINAL_MCP_IDLE_TIMEOUT": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
TERMINAL_MCP_MAX_SESSIONS envTERMINAL_MCP_IDLE_TIMEOUT envこの設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月8日にチェック
レジストリ名は、リポジトリを所有するGitHubアカウント mkpvishnu で確認済みです
このリポジトリはまだGitHubから読み取っていません
このリポジトリはまだGitHubから読み取っていません
これはパソコンで動くため、インターネット上のエンドポイントはありません
パソコンで動き、代わりにローカルの設定を使います
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
GitHubリポジトリの最終更新は–、最新バージョン(0.3.1)がレジストリに届いたのは8 か月前です。
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにPython (uv)も必要です。
同じカテゴリには:GitHub, Desktop Commander, Cloudflare MCP
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
MCP server for terminal commands, file operations, and process management
Cloudflare MCP servers
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
Give your AI a real terminal. Persistent sessions. Interactive programs. Zero limitations.
Every AI coding tool hits the same wall: no real terminal access.
Claude Code's Bash tool, GitHub Copilot, and Codex all run commands in isolated subprocesses. Each command starts fresh. No state carries over. That means:
terminal-mcp gives AI agents a real terminal. Persistent PTY sessions that survive across tool calls. Send commands, read output, press keys, navigate TUIs - exactly like a human at a terminal.
uvx terminal-mcp
One command. Works with Claude Code, Claude Desktop, VS Code, Cursor, and Windsurf.
# No install needed - run directly
uvx terminal-mcp
pip install terminal-mcp
Claude Code
Add to ~/.claude.json or project .mcp.json:
{
"mcpServers": { "terminal": { "command": "uvx", "args": ["terminal-mcp"] } } }
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": { "terminal": { "command": "uvx", "args": ["terminal-mcp"] } } }
VS Code / Cursor
Click the one-click install badge above, or add to .vscode/mcp.json:
{
"servers": { "terminal-mcp": { "command": "uvx", "args": ["terminal-mcp"] } } }
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": { "terminal": { "command": "uvx", "args": ["terminal-mcp"] } } }
session_exec exec="echo hello from terminal-mcp"
session_create command="ssh user@prod-server.com" label="prod"
session_interact session_id="a1b2c3d4" input="df -h" wait_for="\$" session_interact session_id="a1b2c3d4" input="docker ps" wait_for="\$" session_close session_id="a1b2c3d4"
session_create command="python3" label="python"
session_interact session_id="e5f6g7h8" input="import pandas as pd" wait_for=">>>" session_interact session_id="e5f6g7h8" input="df = pd.read_csv('data.csv')" wait_for=">>>" session_interact session_id="e5f6g7h8" input="df.describe()" wait_for=">>>" session_close session_id="e5f6g7h8"
session_create command="psql -U admin mydb" label="db"
session_interact session_id="x1y2z3w4" input="SELECT count(*) FROM users;" wait_for="row" session_interact session_id="x1y2z3w4" input="\dt" wait_for="#" session_close session_id="x1y2z3w4"
session_create command="htop" label="monitor"
session_read session_id="a1b2c3d4"
session_send session_id="a1b2c3d4" key="F6" session_read session_id="a1b2c3d4" mode="diff"
session_send session_id="a1b2c3d4" key="F10" session_close session_id="a1b2c3d4"
session_create command="bash" label="build"
session_send session_id="a1b2c3d4" input="npm run build" session_wait_for session_id="a1b2c3d4" pattern="Build complete|ERROR" timeout=120
session_exec exec="git log --oneline -10"
session_exec exec="docker compose ps" timeout=10
| Feature | What It Does | |
|---|---|---|
| Persistent Sessions | Real PTY sessions that survive across tool calls | |
| Send + Read in One Call | session_interact halves LLM round trips | |
| Pattern-Based Reads | wait_for blocks until regex matches - no guessing timeouts | |
| Auto TUI Detection | Detects htop, vim, etc. and auto-switches to screen snapshot mode | |
| Output Diff Mode | Returns only changed screen lines - minimizes tokens | |
| Special Keys | Arrow keys, Tab, F1-F12, Home/End, Page Up/Down | |
| Control Characters | Ctrl-C, Ctrl-D, Ctrl-Z, Ctrl-L, telnet escape | |
| Dangerous Command Gate | Blocks rm -rf, DROP TABLE, `curl\ | sh` - requires confirmation |
| OSC 133 Shell Integration | Auto-detects command boundaries and exit codes | |
| Smart Truncation | Four strategies to prevent context overflow | |
| Secret Input | Send passwords without logging | |
| Dynamic Resize | Resize terminal on the fly with SIGWINCH | |
| Idle Cleanup | Auto-closes idle sessions | |
| Cross-Platform | Linux, macOS, and Windows support |
terminal-mcp exposes 9 MCP tools. Full details in docs/tools.md.
| Tool | Purpose |
|---|---|
session_create | Spawn a persistent terminal session |
session_send | Send text, keys, or control characters |
session_read | Read output (stream, snapshot, auto, diff modes) |
session_interact | Send + read in one call |
session_wait_for | Wait for regex pattern in output |
session_exec | One-shot command execution |
session_close | Close a session gracefully |
session_resize | Resize terminal dimensions |
session_list | List active sessions |
flowchart LR
Client[AI Client] -->|MCP JSON-RPC| Server[terminal-mcp] Server --> SM[Session Manager] SM --> S1[PTY 1: bash] SM --> S2[PTY 2: python3] SM --> S3[PTY 3: ssh user@host] S1 & S2 & S3 -.->|PTY output| Reader[Reader Thread] Reader -.->|buffer| Server
Each session is backed by a real PTY via pexpect.spawn (or PopenSpawn on Windows). For full architecture details, see docs/architecture.md.
All settings configurable via TERMINAL_MCP_* environment variables. Full reference in docs/configuration.md.
| Setting | Env Var | Default |
|---|---|---|
| Max sessions | TERMINAL_MCP_MAX_SESSIONS | 10 |
| Idle timeout | TERMINAL_MCP_IDLE_TIMEOUT | 1800 (30 min) |
| Safety gate | TERMINAL_MCP_SAFETY_GATE | on |
| Buffer cap | TERMINAL_MCP_MAX_BUFFER_BYTES | 1000000 (1MB) |
| Truncation | TERMINAL_MCP_TRUNCATION_MODE | tail |
Example with custom settings:
{
"mcpServers": { "terminal": { "command": "uvx", "args": ["terminal-mcp"], "env": { "TERMINAL_MCP_MAX_SESSIONS": "20", "TERMINAL_MCP_IDLE_TIMEOUT": "3600", "TERMINAL_MCP_TRUNCATION_MODE": "head_tail" } } } }
| Document | Description |
|---|---|
| Tools Reference | Complete API for all 9 MCP tools |
| Architecture | How terminal-mcp works under the hood |
| Configuration | All settings and environment variables |
| Safety & Security | Dangerous command detection and safety gate |
| Use Cases & Examples | Real-world recipes and patterns |
| Changelog | Version history and release notes |
| Contributing | How to contribute |
| Client | Status | Install |
|---|---|---|
| Claude Code (CLI) | Supported | ~/.claude.json or .mcp.json |
| Claude Desktop | Supported | One-click install |
| VS Code (Copilot Chat) | Supported | One-click install or .vscode/mcp.json |
| Cursor | Supported | One-click install or Settings |
| Windsurf | Supported | ~/.codeium/windsurf/mcp_config.json |
pip install -e ".[dev]"
pytest tests/ -v
Contributions welcome! See docs/contributing.md for guidelines.
MIT