Описание
mcp server for wezterm
README
Overview
This is a MCP server for WezTerm. It allows you to control WezTerm from Claude Desktop and other MCP clients.
Tools
| Tool | Required Args | Optional Args | Description |
|---|---|---|---|
wezterm_pane_write |
command: string, pane_id: number |
— | Writes text or runs a command in the specified pane |
wezterm_pane_read |
pane_id: number |
lines: number (default 50) |
Reads output from a pane's scrollback buffer |
wezterm_pane_send_key |
character: string, pane_id: number |
— | Sends a control character to the specified pane (e.g. "c" for Ctrl+C) |
wezterm_pane_list |
— | window_id: number, tab_id: number |
Lists panes, scoped to the active window/tab by default |
wezterm_pane_switch |
pane_id: number |
— | Switches focus to the specified pane |
wezterm_pane_close |
pane_id: number |
— | Closes the specified pane |
wezterm_pane_split |
direction: "Right"|"Left"|"Top"|"Bottom" |
pane_id: number, window_id: number, tab_id: number |
Splits a pane and returns the new pane ID |
wezterm_pane_split_and_write |
command: string, direction: "Right"|"Left"|"Top"|"Bottom" |
pane_id: number, window_id: number, tab_id: number |
Splits a pane and writes a command to the new pane in one call |
wezterm_window_spawn |
— | cwd: string |
Opens a new top-level WezTerm window and returns its initial pane ID |
Multi-window and multi-tab support
pane_id is globally unique across all of WezTerm's windows and tabs, so most tools (wezterm_pane_write, wezterm_pane_read, wezterm_pane_send_key, wezterm_pane_switch, wezterm_pane_close) don't need window/tab scoping — they just target the pane directly.
wezterm_pane_list, wezterm_pane_split, and wezterm_pane_split_and_write are the exceptions, since they need to know which window/tab to operate on when a specific pane isn't given:
wezterm_pane_listdefaults to listing only the panes in the currently focused window and tab. Passwindow_idand/ortab_idto list panes elsewhere.wezterm_pane_splitandwezterm_pane_split_and_writedefault to splitting the currently focused pane. Ifpane_idis omitted, passwindow_id/tab_idto split the focused pane within that window/tab instead.
Common workflow: split and run
The most common real-world pattern — open a side pane and run something in it while keeping the original pane visible — is wezterm_pane_split_and_write, a single call combining split + write:
Split the focused pane Right and run
npm test.
This is equivalent to calling wezterm_pane_split followed by wezterm_pane_write on the returned pane ID, but atomic and requires only one tool call. Since it doesn't return command output, follow up with wezterm_pane_read on the new pane ID to see results.
Security
This server gives an MCP client the ability to run arbitrary shell commands in any open WezTerm pane, with the full permissions of the user running WezTerm. There is no sandboxing, allowlisting, or command filtering — wezterm_pane_write will execute anything sent to it, including destructive operations like rm -rf, force pushes, or database migrations.
Risk model:
- Any agent connected to this server can read, write, and close panes it did not open, including ones with unrelated work in progress.
wezterm_pane_writeandwezterm_pane_closeare flagged in their tool descriptions as requiring user confirmation before destructive or irreversible actions, but this is advisory only — the server itself does not block or intercept any command.- Only connect this server to trusted MCP clients, and review agent-issued commands before they run if your client supports that.
Installation
To use with Claude Desktop, add the server config:
{
"mcpServers": {
"weztermcp": {
"command": "npx",
"args": ["-y", "weztermcp"]
}
}
}
Releasing
Publishing to npm is automated via .github/workflows/publish.yml. On every push to main, CI runs the test suite and build, then publishes to npm if package.json's version field isn't already published — no publish happens if the version is unchanged.
To cut a release:
- Bump
versioninpackage.json(e.g.npm version patch,npm version minor, or edit directly). - Commit and push to
main. - CI runs tests, builds, and publishes automatically if the tests pass and the version is new.
Publishing uses npm trusted publishing via OIDC — no npm token or repository secret is needed. The weztermcp package on npmjs.com must have this repo's publish.yml workflow configured as a trusted publisher (Package Settings → Trusted Publisher on npmjs.com), and the workflow's publish job grants itself id-token: write to mint the short-lived OIDC credential at publish time.
Установить Weztermcp в Claude Desktop, Claude Code, Cursor
unyly install weztermcpСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add weztermcp -- npx -y weztermcpFAQ
Weztermcp MCP бесплатный?
Да, Weztermcp MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Weztermcp?
Нет, Weztermcp работает без API-ключей и переменных окружения.
Weztermcp — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Weztermcp в Claude Desktop, Claude Code или Cursor?
Открой Weztermcp на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Weztermcp with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
