Connect AI assistants to your terminal with full control — 37 MCP tools including SFTP support
Overview
Connect AI assistants to your terminal with full control — 37 MCP tools including SFTP support
README
🚀 Tabby-MCP is a powerful plugin for Tabby Terminal, bridging the gap between AI agents and your terminal environment. It provides a standardized MCP interface for AI to execute commands, manage tabs, and handle file operations securely.
Give your AI hands to work with.
✨ Features
Safety model (v1.8.0): Pair Programming Mode gates
exec_command,send_input, keyboard-interactive authentication responses, and sensitive SFTP operations with a non-blocking approval dialog that automatically rejects after two minutes. Authentication response values are never shown in confirmation details. The dialog restores terminal focus to avoid Electron/xterm keyboard and IME issues. Read-only transfer-status tools and emergencyabort_commandremain available without approval. The server binds to127.0.0.1unless you change Listen address. Host and Origin checks still reject DNS names. The direct tool API is disabled by default.
API key authentication is optional on 127.0.0.1 and is mandatory for 0.0.0.0 or another non-loopback bind address. Keys are generated once, displayed once, and stored as SHA-256 hashes. Configure clients with Authorization: Bearer .
📦 Installation
Method 1: Tabby Plugin Manager (Easiest)
Search for tabby-mcp-server directly in Tabby’s built-in Plugin Manager:
- Open Tabby → Settings → Plugins
- Search for
tabby-mcp-server - Click Install
- Restart Tabby
Method 2: Quick Install Script
No Node.js required! Downloads pre-built release from GitHub.
Method 3: Build from Source
Requires Node.js 18+.
# Clone
git clone https://github.com/GentlemanHu/Tabby-MCP.git
cd Tabby-MCP
# Build & Install
bash scripts/build-and-install.sh
Or manually:
npm install --legacy-peer-deps
npm run build
# Then copy dist/ and package.json to Tabby plugins folder
🔄 After Installation
- Restart Tabby
- Go to Settings → MCP
- Start the MCP server
🔌 Connecting AI Clients
Streamable HTTP Mode (Cursor / Windsurf / Cline)
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"Tabby MCP": {
"type": "streamable_http",
"url": "http://127.0.0.1:3001/mcp"
}
}
}
STDIO Mode (Claude Desktop / VS Code)
For clients that don’t support SSE, use the STDIO bridge:
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"tabby-mcp-server": {
"command": "node",
"args": ["/path/to/Tabby-MCP/scripts/stdio-bridge.js"]
}
}
}
VS Code / Other IDEs:
{
"mcp": {
"servers": {
"tabby-mcp-server": {
"type": "stdio",
"command": "node",
"args": ["scripts/stdio-bridge.js"],
"cwd": "/path/to/Tabby-MCP"
}
}
}
}
Note: STDIO mode requires Node.js installed. The bridge script connects to the SSE server running in Tabby.
Endpoints
| Endpoint | URL | Protocol |
|---|---|---|
| Streamable HTTP | http://127.0.0.1:3001/mcp |
2025-03-26 (recommended) |
| Legacy SSE | http://127.0.0.1:3001/sse |
2024-11-05 |
| Health | http://127.0.0.1:3001/health |
- |
| Info | http://127.0.0.1:3001/info |
- |
🛠️ Available Tools
Terminal Control (10)
| Tool | Description |
|---|---|
get_session_list |
List all terminal sessions with stable UUIDs and metadata |
exec_command |
Execute a command and return output + exit code. Works with bash/zsh/fish, PowerShell, cmd.exe and other CLIs (Shells & devices) |
send_input |
Send interactive input (Ctrl+C, etc) |
submit_keyboard_interactive_response |
Submit MFA, password, or other SSH keyboard-interactive responses |
reconnect_session |
Reconnect a closed or disconnected terminal session |
get_terminal_buffer |
Read terminal buffer (defaults to active session) |
abort_command |
Abort running command |
get_command_status |
Monitor active commands |
focus_pane |
Focus a specific pane in split view |
get_session_environment |
Detect shell/REPL context (optional; disabled by default) |
New in v1.1: All terminal tools now support flexible session targeting:
sessionId(stable UUID, recommended)tabIndex(legacy, may change)title(partial match)profileName(partial match)- No parameters = use active session
Tab Management (11)
| Tool | Description |
|---|---|
list_tabs |
List all open tabs with stable IDs |
select_tab |
Focus a specific tab (defaults to active) |
close_tab |
Close a tab |
close_all_tabs |
Close all tabs |
duplicate_tab |
Duplicate a tab |
next_tab / previous_tab |
Navigate tabs |
move_tab_left / move_tab_right |
Reorder tabs |
reopen_last_tab |
Reopen closed tab |
split_tab |
Split current tab (horizontal/vertical) |
Profile Management (4)
| Tool | Description |
|---|---|
list_profiles |
List terminal profiles |
open_profile |
Open tab with profile |
show_profile_selector |
Show profile dialog |
quick_connect |
Smart quick connect (SSH/telnet/socket/serial) |
SFTP Operations (12) 🆕
Requires
tabby-ssh. If it is not installed—or SFTP is disabled in Settings—all 12 SFTP tools are omitted for new MCP sessions. With Pair Programming confirmation enabled, directory listing, metadata reads, file reads/writes, transfers, deletes, renames, directory creation, and transfer cancellation require approval.
Basic Operations:
| Tool | Description | Key Parameters |
|---|---|---|
sftp_list_files |
List remote directory | path |
sftp_read_file |
Read remote file (text) | path |
sftp_write_file |
Write text to remote file | path, content |
sftp_mkdir |
Create remote directory | path |
sftp_delete |
Delete remote file/directory | path |
sftp_rename |
Rename/move remote file | sourcePath, destPath |
sftp_stat |
Get file/directory info | path |
File Transfer (supports sync/async):
| Tool | Description | Key Parameters |
|---|---|---|
sftp_upload |
Upload local file → remote | localPath, remotePath, sync |
sftp_download |
Download remote → local file | remotePath, localPath, sync |
sftp_get_transfer_status |
Query transfer progress | transferId |
sftp_list_transfers |
List all transfers | status (filter) |
sftp_cancel_transfer |
Cancel active transfer | transferId |
Transfer Modes:
sync=true(default) waits for completion.sync=falsereturns immediately withtransferId.Size Limits: Configurable in Settings → MCP → SFTP.
⚙️ Configuration
| Setting | Description | Default |
|---|---|---|
| Port | MCP server port | 3001 |
| Listen address | Bind address. 0.0.0.0 exposes every interface for WSL; DNS hostnames stay rejected |
127.0.0.1 |
| API key authentication | Require Authorization: Bearer . Always on for non-loopback binds |
false |
| Start on Boot | Auto-start server | true |
| Pair Programming | Confirm commands, raw input, and sensitive SFTP operations | true |
| Confirmation sound | Play the system alert when a confirmation dialog appears in desktop Tabby | false |
| Confirm SFTP Operations | Apply the approval dialog to sensitive SFTP operations (send_input always follows command confirmation) |
true |
| Session Tracking | Use stable UUIDs | true |
| Background Execution | Run without focus | false |
| SFTP Enabled | Enable SFTP tools | true |
| Environment Detection | Expose get_session_environment |
false |
| Command execution | Per tab/profile rules for exec_command: mode, wrapper template, prompt regex, Enter key, idle time |
none (auto) |
| Direct Tool API | Enable compatibility endpoint /api/tool/:name (manual config only) |
false |
Click Approve or Reject to resolve an approval prompt. Clicking the backdrop or pressing Escape keeps it open until you choose or the two-minute timeout expires.
🐚 Shells & devices
exec_command picks an execution mode per session. The result reports it as mode and modeReason.
| Mode | Used for | Exit code |
|---|---|---|
bash / zsh / sh / fish |
POSIX shells (unchanged behavior) | ✅ |
powershell |
PS C:\…> prompts, local powershell.exe / pwsh profiles, Windows over SSH |
✅ |
cmd |
C:\…> prompts, local cmd.exe profiles, Windows OpenSSH default shell |
✅ (ERRORLEVEL) |
osc133 |
Any shell that emits OSC 133/633 command-finished marks (shell integration) | ✅ when the shell reports it |
raw |
Routers, switches, REPLs and other CLIs: the command is sent as typed and the call returns when the prompt comes back | null |
template |
A wrapper you define in a rule, e.g. RouterOS :put "{start}"; {command}; :put "{end} 0" |
from the template |
- Auto keeps the POSIX drivers unless the prompt or profile clearly shows PowerShell, cmd.exe or RouterOS. Non-POSIX shells that emit OSC 133 use those marks.
- If a shell prints none of the wrapper’s start marker and its prompt comes back, the call returns
wrapperRejected: trueinstead of waiting for the timeout, and later commands at that prompt use raw mode. - Raw mode stops at pagers such as
--More--and reportspagerDetected: true. PasspromptPatternfor unusual prompts andidleMsfor output that pauses. - Override per call with
shell,promptPattern,idleMsandlineEnding, or per tab/profile in Settings → MCP → Command execution. - With Stream Capture on, only the POSIX drivers read the stream; the other modes read the screen.
⚠️ PowerShell, cmd.exe, OSC 133 and RouterOS handling ships in 1.9.0-rc.1 and has not been verified on real Windows or RouterOS systems yet (Issue #18).
🔄 Background Execution Mode
Enable this mode to allow MCP commands to run without switching focus to the terminal. This lets you continue working on other tabs while AI executes commands in the background.
Settings → MCP → Background Execution
⚠️ Risks:
- You won’t see commands executing in real-time
- If you type in the target terminal while AI is running, input will conflict
- For split panes, commands go to the
sessionIdtarget, not the focused pane- Dangerous commands could run without you noticing
✅ Recommended: Keep Pair Programming Mode, confirmation dialogs, and file-operation confirmation enabled. The server binds to
127.0.0.1unless Listen address is changed; the direct/api/tool/:namecompatibility API is disabled by default.
⚠️ Platform Support
| Platform | Status | Notes |
|---|---|---|
| macOS | ✅ Tested | Fully functional |
| Windows | ⚠️ Untested | Should work — please report issues |
| Linux | ⚠️ Untested | Should work — please report issues |
Note: This plugin has been developed and tested on macOS. Windows and Linux support should work but is unverified. Community testing and feedback welcome!
🤖 About This Project
Acknowledgments
This project builds upon the work of tabby-mcp-server by @thuanpham582002.
Improvements over the original:
| Feature | Original | This Project |
|---|---|---|
| MCP Tools | 4 | 37 |
| Tab Management | ❌ | ✅ |
| Profile/SSH | ❌ | ✅ |
| SFTP Support | ❌ | ✅ |
| Stable Session IDs | ❌ | ✅ |
| Streamable HTTP | ❌ | ✅ |
| Init Bug | Has issue | ✅ Fixed |
| Install Script | Manual | ✅ One-liner |
📝 Changelog
v1.9.0-rc.1 (2026-11-25) — prerelease
⚠️ Prerelease, published to GitHub only (not on npm). PowerShell, cmd.exe, OSC 133 and RouterOS paths are covered by unit tests but not yet verified on real systems.
exec_commandsupports Windows shells and non-shell CLIs (Issue #18): PowerShell and cmd.exe wrappers with exit codes, OSC 133 shell integration, raw prompt-return mode for RouterOS and other devices, and user templates. New optional parameters:shell,promptPattern,idleMs,lineEnding.- Settings → MCP → Command execution: rules per tab/profile.
- A shell that ignores the wrapper now returns
wrapperRejectedinstead of timing out, and later commands at that prompt use raw mode. - Negative exit codes (Windows NTSTATUS values) are parsed.
get_session_environmentrecognizes PowerShell, cmd.exe and RouterOS prompts, and active mode no longer types POSIX probes into them.- The settings update check offers the stable release to prerelease installs.
v1.8.0 (2026-11-20)
Published to GitHub and npm ([email protected]).
⚠️ Servers listening on
0.0.0.0or another non-loopback address now require an API key. Create one in Settings → MCP and addAuthorization: Bearerto your client config.
- API key authentication for MCP HTTP transports (PR #16, Issue #15, thanks @wanxi50). Keys are shown once and stored as SHA-256 hashes; revoked keys stop working immediately.
- Confirmation prompts stay open on backdrop clicks and Escape; an optional system alert sound plays when a prompt appears (PR #17, thanks @bytepoem).
- Instance handover reaches a specific bind address instead of only
127.0.0.1.
v1.7.3 (2026-11-05)
Published to GitHub and npm ([email protected]).
- SFTP idle auto-recovery (Issue #14): Invalidate both MCP cache and Tabby’s underlying single-instance
sshSession.sftpwrapper on channel errors or health-check timeouts. SFTP operations on long-idle bastion connections now auto-recover with a fresh channel retry instead of dying withSSH_FX_FAILURE. - SSH disconnected session handling (“Press any key to reconnect”): When an SSH session closes,
send_inputtriggers Tabby’s nativereconnect()to fulfill the reconnect prompt.exec_commandattempts automatic reconnection before executing. reconnect_sessiontool: Explicitly reconnect disconnected terminal sessions. Total tools: 37 (Terminal 10 + TabManagement 15 + SFTP 12).- Session state reporting:
get_session_listnow reportsisSessionClosed,reconnectOffered, andcanReconnect.
v1.7.2 (2026-10-10)
- Listen address is configurable (default
127.0.0.1). Set0.0.0.0when a WSL or other-interface client must connect. Non-loopback binds warn that the server has no login. - The settings tab checks npm for a newer release and installs it through Tabby’s built-in plugin installer.
- Header actions use real icons instead of emoji.
- View Logs shows the log in the settings page and opens Tabby’s developer tools on macOS, Windows, and Linux.
v1.7.1 (2026-09-15)
Published to GitHub and npm ([email protected]).
- Fixed Issue #10 / Issue #11: pending approvals attract OS attention again after 1.7.0 replaced native
confirm(). macOS bounces the Dock without stealing focus; Windows/Linux flash the taskbar and bring the window forward. The non-blocking dialog and IME/keyboard fix from #7 are unchanged.
v1.7.0 (2026-09-09)
Stable release of the 1.6.3-rc.1 / 1.6.3-rc.2 line. Published to GitHub and npm ([email protected]).
- Added
submit_keyboard_interactive_responsefor SSH keyboard-interactive authentication, including MFA/TOTP prompts (PR #8, thanks @plane636).send_inputwrites to the terminal PTY and cannot reach Tabby’s authentication panel. Pair Programming confirmation shows only the response count, never credential values. get_session_listnow reportssshConnected,keyboardInteractivePending, and non-secret prompt metadata.- Fixed Issue #9: Pair Programming approval now covers
send_input, keyboard-interactive responses, and sensitive SFTP operations; transfer cancellation now stops the underlying transfer. - Fixed Issue #7: replaced blocking browser dialogs with a non-blocking focus-restoring dialog and made command focus honor the Auto-focus setting.
- Fixed Issue #5: loopback-only bind, startup retry, stale-instance detection, and authenticated same-install port handover.
- Fixed a startup crash on Tabby 1.0.235 where
ConfigService.storewas not yet available during Angular service construction. - Fixed Legacy SSE JSON body handling for SDK 1.25.2, session cleanup, stale Streamable HTTP session handling, Origin validation, fish active environment probes, SFTP locator consistency, and STDIO reconnect/framing behavior.
- Pinned
@modelcontextprotocol/sdkto 1.25.2, committedpackage-lock.json, and added typecheck/smoke/build quality gates. - 36 MCP tools (35 normally visible;
get_session_environmentis optional and disabled by default).
See CHANGELOG.md for the complete version history.
🤝 Contributing
See CONTRIBUTING.md for guidelines.
📄 License
MIT License - see LICENSE
Install
This server does not publish a one-line install command.
Open the repository installation guide New to MCP? Start with the mcpskill.org guide →Configuration
{
"mcpServers": {
"Tabby MCP": {
"type": "streamable_http",
"url": "http://127.0.0.1:3001/mcp"
}
}
}