Labsco
thuanpham582002 logo

Tabby-MCP-Server

β˜… 81

from thuanpham582002

A Tabby plugin implementing an MCP server for AI-powered terminal control and automation.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

Tabby MCP Server

npm version License: MIT GitHub issues GitHub stars

A Tabby Terminal plugin that exposes your active terminal sessions through the Model Context Protocol (MCP). It lets MCP-compatible AI clients discover terminal tabs, execute commands, read terminal buffers, and retrieve long command output.

Tabby stays the terminal UI. Your AI client connects to Tabby through MCP.

Highlights

  • MCP server inside Tabby β€” exposes an SSE endpoint at http://localhost:3001/sse
  • Terminal session discovery β€” list local and SSH-backed Tabby terminal sessions
  • Command execution β€” run commands in a selected Tabby terminal tab
  • Robust output capture β€” simple marker protocol with exit-code parsing
  • Terminal buffer access β€” read visible/history buffer ranges from a tab
  • Long output pagination β€” retrieve full command output by outputId
  • Pair programming mode β€” optional confirmation dialogs and user feedback
  • Docker-based build β€” reproducible local plugin builds for Tabby

Demo

Tabby MCP Plugin - AI Terminal Integration Demo

Table of Contents

Connecting MCP Clients

Tabby-MCP provides:

Copy & paste β€” that's it
SSE endpoint:    http://localhost:3001/sse
Health endpoint: http://localhost:3001/health
HTTP test API:   http://localhost:3001/api/tool/<tool-name>

The Tabby plugin must be running before clients can connect.

SSE clients

Use this configuration for clients that support SSE MCP servers directly:

Copy & paste β€” that's it
{
  "mcpServers": {
    "tabby-mcp": {
      "type": "sse",
      "url": "http://localhost:3001/sse"
    }
  }
}

For Cursor-style clients, place it in the MCP config file, for example:

Copy & paste β€” that's it
~/.cursor/mcp.json

Claude Code

If your Claude Code version supports SSE MCP servers:

Copy & paste β€” that's it
claude mcp add --transport sse tabby-mcp http://localhost:3001/sse

If your setup uses JSON config, use the SSE clients configuration.

Codex / OpenAI Codex CLI

Use the SSE MCP server configuration supported by your Codex client:

Copy & paste β€” that's it
{
  "mcpServers": {
    "tabby-mcp": {
      "type": "sse",
      "url": "http://localhost:3001/sse"
    }
  }
}

For TOML-based configs, map the same SSE URL using your client's supported SSE MCP syntax.

Tools

ToolDescriptionParameters
get_ssh_session_listList available Tabby terminal sessionsnone
exec_commandExecute a shell command in a terminal tabcommand, tabId, commandExplanation
get_terminal_bufferRead terminal buffer contenttabId, startLine, endLine
get_command_outputRetrieve full/paginated command outputoutputId, startLine, maxLines

Development

Clone and build:

Copy & paste β€” that's it
git clone https://github.com/thuanpham582002/tabby-mcp-server.git
cd tabby-mcp-server
make build-dist

Install into local Tabby:

Copy & paste β€” that's it
bash scripts/copy_to_plugin_folder.sh

Restart Tabby and verify:

Copy & paste β€” that's it
curl http://localhost:3001/health

Build targets

Copy & paste β€” that's it
make build-dist            # Build dist only
make build-dist-with-deps  # Build dist and copy node_modules
make help                  # Show available targets

License

MIT β€” see LICENSE.


<p align="center"> Made with ❀️ by <a href="https://github.com/thuanpham582002">Pham Tien Thuan</a> </p>