T
Tmux MCP Server
作者 @lox
An MCP server that lets AI agents interact with terminal sessions through tmux
创建于 6/16/2025
更新于 6 months ago
README
Repository documentation and setup instructions
Tmux MCP Server
An MCP server that lets AI agents interact with terminal sessions through tmux.
Running the Server
go run ./cmd/tmux-mcp-server
The server communicates via stdio and provides tools for managing tmux sessions.
Usage
The server provides these tools:
start_session- Create a new tmux sessionsend_commands- Send commands and keystrokes to a sessionview_session- Capture the current screen contentlist_sessions- Show all active sessionsjoin_session- Join an existing sessionclose_session- End a session
Example: Editing a file with vim
{
"name": "start_session",
"arguments": {
"session_name": "edit_work",
"command": "vim README.md"
}
}
{
"name": "send_commands",
"arguments": {
"session_name": "edit_work",
"commands": [
"i",
"Hello world!",
"<ESC>",
":wq",
"<ENTER>"
]
}
}
The send_commands tool takes an array where plain strings are typed literally and <COMMAND> format handles special keys like <ENTER>, <ESC>, <TAB>, etc.
Development
This project uses Hermit for managing development dependencies. Hermit ensures consistent development environments across different machines.
. bin/activate-hermit
Requirements
- Go 1.24.2+
- tmux
快速设置
此服务器的安装指南
安装命令 (包未发布)
git clone https://github.com/lox/tmux-mcp-server
手动安装: 请查看 README 获取详细的设置说明和所需的其他依赖项。
Cursor 配置 (mcp.json)
{
"mcpServers": {
"lox-tmux-mcp-server": {
"command": "git",
"args": [
"clone",
"https://github.com/lox/tmux-mcp-server"
]
}
}
}