Terminal Bridge Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Terminal Bridge Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
An MCP (Model Context Protocol) server that bridges AI assistants to real terminal sessions — create, manage, read, and interact with persistent PTY processes.
Built with TypeScript, node-pty, and the MCP SDK.
[中文文档](README.zh-CN.md)
AI coding assistants can write code, but they usually can't run it. terminal-bridge-mcp closes this gap by giving your AI a real terminal — not a sandboxed exec, but a full PTY session with persistent state.
This means your AI assistant can:
All from within your existing MCP-compatible AI workflow (Claude Desktop, Cursor, Windsurf, etc.).
child_process.execLet your AI start a frontend dev server and check when it's ready:
> terminal_create {"command": "pnpm dev", "cwd": "/projects/my-app", "name": "frontend"}
→ Created session: term-1-abc123 (pid: 42000)
> terminal_read {"session_id": "term-1-abc123"}
→ VITE v7.3.1 ready in 2430ms
➜ Local: http://localhost:5173/Activate a Python virtual environment and start the backend:
> terminal_create {"command": ".venv\\Scripts\\activate && fba run", "cwd": "/projects/backend", "name": "backend"}
→ Created session: term-2-def456 (pid: 43000)
> terminal_read {"session_id": "term-2-def456"}
→ API running at http://127.0.0.1:8000/api/v1Start test runners for multiple services and monitor results:
> terminal_create {"command": "pytest -x", "cwd": "/projects/api", "name": "api-tests"}
> terminal_create {"command": "vitest run", "cwd": "/projects/web", "name": "web-tests"}
> terminal_create {"command": "go test ./...", "cwd": "/projects/worker", "name": "worker-tests"}
> terminal_search {"pattern": "PASS|FAIL|error|panic"}
→ [api-tests] 12 passed, 0 failed
[web-tests] FAIL src/auth.test.ts
[worker-tests] panic: nil pointer dereferenceStart databases, message queues, or background workers:
> terminal_create {"command": "docker compose up", "cwd": "/projects/my-stack", "name": "infra"}
> terminal_create {"command": "celery -A tasks worker", "cwd": "/projects/worker", "name": "celery"}
> terminal_read {"session_id": "term-infra", "filter": "ready|listening|started"}
→ postgres is ready to accept connections
redis is ready to accept connectionsSend commands to a running REPL or CLI tool:
> terminal_create {"command": "python", "name": "repl"}
> terminal_write {"session_id": "term-repl", "text": "import pandas as pd"}
> terminal_write {"session_id": "term-repl", "text": "df = pd.read_csv('data.csv')"}
> terminal_write {"session_id": "term-repl", "text": "df.describe()"}
> terminal_read {"session_id": "term-repl"}
→ count mean std min max
age 1000 35.2 12.1 18.0 89.0Watch for specific patterns in running services:
> terminal_read {"session_id": "term-backend", "filter": "ERROR|WARN|exception", "lines": 200}
→ [ERROR] Connection refused to database replica
[WARN] Retry attempt 3/5 for external API
> terminal_search {"pattern": "OOM|out of memory|killed"}
→ [worker] Process killed (OOM)git clone https://github.com/dividduang/terminal-bridge-mcp.git
cd terminal-bridge-mcp
npm install
npm run buildAdd to your MCP client configuration (.mcp.json, Claude Desktop settings, Cursor, Windsurf, etc.):
{
"mcpServers": {
"terminal-bridge": {
"command": "node",
"args": ["path/to/terminal-bridge-mcp/dist/index.js"]
}
}
}terminal_createCreate a new managed terminal session.
| Parameter | Type | Default | Description |
|---|---|---|---|
command | string | - | Command to run on start |
cwd | string | - | Working directory |
name | string | - | Friendly name for the session |
env | object | - | Additional environment vars |
cols | number | 120 | Terminal columns |
rows | number | 40 | Terminal rows |
Returns a session ID, PID, and session name.
terminal_listList all managed terminal sessions with their status, names, PIDs, and output line counts.
terminal_readRead output from a terminal session.
| Parameter | Type | Default | Description |
|---|---|---|---|
session_id | string | - | Session ID (required) |
lines | number | 100 | Number of recent lines to return |
filter | string | - | Regex pattern to filter lines |
raw | boolean | false | Include ANSI escape codes |
terminal_searchSearch across terminal sessions for lines matching a regex pattern.
| Parameter | Type | Default | Description |
|---|---|---|---|
pattern | string | - | Regex pattern (required) |
session_id | string | - | Limit to a specific session |
max_results | number | 50 | Maximum number of results |
terminal_writeSend input text to a running terminal session.
| Parameter | Type | Default | Description |
|---|---|---|---|
session_id | string | - | Session ID (required) |
text | string | - | Text to send (required) |
press_enter | boolean | true | Append Enter key after text |
terminal_killKill a terminal session and remove it from management.
| Parameter | Type | Description |
|---|---|---|
session_id | string | Session ID (required) |
src/
├── index.ts # MCP server and tool definitions
├── pty-manager.ts # PTY process lifecycle management
├── output-buffer.ts # Ring buffer for terminal output
└── types.ts # TypeScript interfacespwsh.exe or powershell.exe| Feature | terminal-bridge-mcp | child_process.exec | IDE Terminal |
|---|---|---|---|
| Full PTY support | Yes | No | Yes |
| AI can read output | Yes | Manual | No |
| Multiple sessions | Yes | One-shot | Manual |
| Regex search across sessions | Yes | No | No |
| Persistent state | Yes | No | Yes |
| Interactive input (write back) | Yes | No | Manual |
MIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.