Terminal MCP Server
平台与服务by aybelatchane
供 AI agents 与终端应用交互的 MCP server,可理解为终端世界里的 Playwright。
什么是 Terminal MCP Server?
供 AI agents 与终端应用交互的 MCP server,可理解为终端世界里的 Playwright。
README
Terminal MCP Server
MCP server enabling AI agents to interact with terminal applications through structured Terminal State Tree representation. Works with any AI assistant that supports the Model Context Protocol.
Installation
Via npm (Recommended)
npx mcp-server-terminal
Via GitHub Releases
Download pre-built binaries from Releases.
Build from Source
git clone https://github.com/aybelatchane/mcp-server-terminal.git
cd mcp-server-terminal
cargo build --release
# Binary: ./target/release/terminal-mcp
Configuration
Claude
Claude Code (CLI)
claude mcp add terminal -- npx mcp-server-terminal
Claude Desktop
Add to ~/.claude.json (macOS/Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"]
}
}
}
OpenAI Codex
Codex CLI
codex mcp add terminal -- npx mcp-server-terminal
Codex Configuration File
Add to ~/.codex/config.toml:
[mcp_servers.terminal]
command = "npx"
args = ["mcp-server-terminal"]
Google Gemini
Gemini CLI
gemini mcp add terminal npx mcp-server-terminal
VS Code / GitHub Copilot
VS Code 1.101+ supports MCP. Add to your VS Code settings (settings.json):
{
"mcp.servers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"]
}
}
}
Cursor
Add to ~/.cursor/mcp.json or .cursor/mcp.json in your project:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"]
}
}
}
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"]
}
}
}
Zed
Add to your Zed settings (Preferences → Settings):
{
"context_servers": {
"terminal": {
"command": {
"path": "npx",
"args": ["mcp-server-terminal"]
}
}
}
}
Cline (VS Code Extension)
Click MCP Servers icon → Configure → Advanced MCP Settings, then add:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"]
}
}
}
AWS Bedrock
Add to your Bedrock agent MCP configuration:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"]
}
}
}
Other MCP Clients
For any MCP-compatible client, configure the server with:
- Command:
npx - Args:
["mcp-server-terminal"]
Or if using the binary directly:
- Command:
terminal-mcp
Usage
Ask your AI agent:
- "Create a terminal session running htop"
- "Take a snapshot of the terminal"
- "Press the down arrow key"
- "Type 'ls -la' and press Enter"
MCP Tools
| Tool | Description |
|---|---|
terminal_session_create | Start a terminal session |
terminal_session_list | List active sessions |
terminal_session_close | Close a session |
terminal_session_resize | Resize terminal dimensions |
terminal_snapshot | Capture terminal state with UI elements |
terminal_type | Type text into terminal |
terminal_press_key | Press keys (arrows, F-keys, Ctrl+X) |
terminal_click | Click on detected UI element |
terminal_wait_for | Wait for text, element, or idle state |
terminal_read_output | Read raw terminal output |
Visual Mode
By default, sessions spawn a visible terminal window (xterm). For headless operation:
npx mcp-server-terminal --headless
Or in your MCP config:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal", "--headless"]
}
}
}
X11 Setup (Linux/WSL)
Visual mode requires X11. Add the DISPLAY environment variable to your MCP config:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"],
"env": {
"DISPLAY": ":0"
}
}
}
}
Logging
Set the RUST_LOG environment variable:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"],
"env": {
"RUST_LOG": "info"
}
}
}
}
Log levels: error, warn, info, debug, trace
Logs go to stderr (stdout is reserved for MCP protocol).
Platform Support
| Platform | Architecture | Status | Visual Mode |
|---|---|---|---|
| Linux | x64, arm64 | ✅ Full support | xterm + tmux |
| macOS | x64, arm64 | ✅ Full support | Terminal.app / iTerm2 |
| Windows (WSL) | x64, arm64 | ✅ Full support | xterm + tmux (via X11) |
| Windows (native) | x64 | ⚠️ Headless only | Not supported |
Windows users: Use WSL for full functionality including visual mode.
License
MIT
常见问题
Terminal MCP Server 是什么?
供 AI agents 与终端应用交互的 MCP server,可理解为终端世界里的 Playwright。
相关 Skills
Slack动图
by anthropics
面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。
✎ 帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。
MCP构建
by anthropics
聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。
✎ 想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。
接口测试套件
by alirezarezvani
扫描 Next.js、Express、FastAPI、Django REST 的 API 路由,自动生成覆盖鉴权、参数校验、错误码、分页、上传与限流场景的 Vitest 或 Pytest 测试套件。
✎ 帮你把API与集成测试自动化跑顺,减少回归漏测;能力全面,尤其适合复杂接口场景的QA团队。
相关 MCP Server
Slack 消息
编辑精选by Anthropic
Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。
✎ 这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。
by netdata
io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。
✎ 这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。
by d4vinci
Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。
✎ 这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。