Terminal MCP 伺服器 | PlugMCP
跳到正文
The Problem
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:
No SSH sessions - Can't connect to a remote server and run multiple commands
- Can't use Python, Node, or Ruby interpreters interactively
MCP server for interactive terminal sessions (SSH, REPLs, database CLIs)
把任意工具接入任意代理。面向非開發者的 MCP 伺服器目錄;閘道承載流量,n8n 承載應用。
產品
目錄
開發者
公司
TERMINAL_MCP_MAX_SESSIONS, TERMINAL_MCP_IDLE_TIMEOUT No REPLs
No database CLIs - Can't maintain a psql, mysql, or redis-cli connection
No TUI apps - Can't navigate htop, vim, or fzf with arrow keys
No long-running processes - Can't monitor builds, watch logs, or run dev servers
The Solution 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.
One command. Works with Claude Code, Claude Desktop, VS Code, Cursor, and Windsurf.
Quick Start
1. Install (30 seconds) # No install needed - run directly
uvx terminal-mcp
# Or install globally
pip install terminal-mcp
2. Connect to Your AI Client Add to ~/.claude.json or project .mcp.json:
{
"mcpServers": {
"terminal": {
"command": "uvx",
"args": ["terminal-mcp"]
}
}
}
Add to claude_desktop_config.json:
{
"mcpServers": {
"terminal": {
"command": "uvx",
"args": ["terminal-mcp"]
}
}
}
Click the one-click install badge above, or add to .vscode/mcp.json:
{
"servers": {
"terminal-mcp": {
"command": "uvx",
"args": ["terminal-mcp"]
}
}
}
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"terminal": {
"command": "uvx",
"args": ["terminal-mcp"]
}
}
}
3. Verify session_exec exec="echo hello from terminal-mcp"
What Can You Do With It?
SSH Into Remote Servers session_create command="ssh [email protected] " 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"
Run Interactive REPLs 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"
Query Databases 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"
Navigate TUI Apps session_create command="htop" label="monitor"
session_read session_id="a1b2c3d4"
# Auto-detects TUI, returns screen snapshot
session_send session_id="a1b2c3d4" key="F6"
session_read session_id="a1b2c3d4" mode="diff"
# Returns only changed lines - saves tokens
session_send session_id="a1b2c3d4" key="F10"
session_close session_id="a1b2c3d4"
Monitor Long-Running Builds 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
Run One-Off Commands session_exec exec="git log --oneline -10"
session_exec exec="docker compose ps" timeout=10
Features at a Glance
Tools Reference
Architecture 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 .
Configuration All settings configurable via TERMINAL_MCP_* environment variables. Full reference in docs/configuration.md .
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"
}
}
}
}
Documentation
Supported Clients
Running Tests pip install -e ".[dev]"
pytest tests/ -v
Contributing
License Graphify Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, e Private Gpt Complete API layer for private AI applications on local models: RAG, skills, tools, MCP, text-to-sql, and more. Works with any OpenAI-compatible inference server. Scientific Agent Skills Turn any AI agent into an AI Scientist. The #1 Agent Skills library for science, used by 250,000+ scientists worldwide. 177 ready-to-use validated skills plus 100+ scientific databases covering biolog Open Code Review Secure, fast, efficient, battle-tested at Alibaba's scale. Hybrid architecture code review tool: deterministic pipelines + LLM Agent, precise line-level comments, built-in multi-language ruleset (NPE, Codebase Memory Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection. Orm The Prisma ORM: write your application in TypeScript with human-readable queries instead of SQL. Host your database on Prisma Postgres and your app on Prisma Compute. OpenViking Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills. Context Mode Free, local plugin that keeps tool output out of your coding agent's context window. Sandbox and SQLite FTS5 search, 99% fewer bytes in context. Works with Claude Code, Codex, Pi, OMP, OpenCode, Gemin Dbx 25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Dock Xerj AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory a Wasp The batteries-included full-stack framework for the AI era. Develop JS/TS web apps (React, Node.js, and Prisma) using declarative code that abstracts away complex full-stack features like auth, backgr WrenAI GenBI (Generative BI) for AI agents, an open-source, governed text-to-SQL through an open context layer that turns natural-language questions into trusted dashboards, charts, and SQL across 20+ data s Databases MCP 伺服器 最佳 Databases MCP 伺服器
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
如何安裝 Terminal? 在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
Terminal 需要 API 金鑰嗎? 發布者列出了以下環境變數:TERMINAL_MCP_MAX_SESSIONS, TERMINAL_MCP_IDLE_TIMEOUT。
Terminal 使用哪種傳輸方式? Terminal 透過 stdio 在本機執行。
Terminal 上次檢查是什麼時候? 上次檢查時間:2026-10-28。 MCP server for interactive terminal sessions (SSH, REPLs, database CLIs)
工具
0 / 10