i3wm-mcp
Provides tools to query and drive a Sway (or i3) window manager session, including window focus, movement, workspace management, layout changes, application launching, and more via the i3 IPC protocol.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@i3wm-mcpmove current window to workspace 3"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
i3wm-mcp
A Model Context Protocol server for the i3 window manager (and, via the shared IPC, Sway). It lets an MCP client — Claude Code, Claude Desktop, the MCP Inspector — query and drive your i3/Sway session through a small set of well-described tools.
The tool definitions are deliberately tuned for a high
Glama tool-definition-quality score:
a consolidated, non-overlapping tool set, every parameter described, typed
output schemas, and honest readOnlyHint/destructiveHint annotations.
Derived from
caninja/i3wm-mcp(MIT). See ATTRIBUTION.md. This rewrite migrates the transport from thei3-msgCLI to the asynci3ipclibrary, consolidates 43 tools into 13, and adds tests, CI, and output schemas.
Tools
Tool | Kind | What it does |
| read | List windows from the layout tree, with filters. |
| read | Details of the currently focused window. |
| read | All active workspaces. |
| read | All display outputs (monitors). |
| read | Version + config + binding modes snapshot. |
| mutate | Focus by direction / criteria / layer / parent-child. |
| mutate | Move a container to a direction / workspace / output / scratchpad / center. |
| mutate | Switch / move-to / rename / navigate workspaces. |
| mutate | Container layout, split orientation, border style. |
| mutate | Toggle floating / fullscreen / sticky. |
| destructive | Launch a program via |
| destructive | Raw i3/Sway command escape hatch (marks, gaps, bar, reload/restart). |
| destructive | Close the focused or a matched window. |
Rarely-used verbs (marks, i3-gaps, i3bar, scratchpad show/hide, reload,
restart, and deliberately exit) are reached through run_command rather
than dedicated tools, keeping the set small and distinct.
Related MCP server: Tmux MCP Server
Requirements
A running i3 (≥4.x) or Sway session.
Python ≥ 3.10.
The server locates the i3/Sway IPC socket from the environment, so it must be
launched from within your graphical session (it needs DISPLAY, or
SWAYSOCK/I3SOCK, in its environment). Clients that spawn it from inside the
session — Claude Code, the MCP Inspector — inherit this automatically; a headless
or systemd launch would need those variables passed explicitly.
Install
git clone https://github.com/kuhyx/i3wm-mcp
cd i3wm-mcp
python -m venv .venv
./.venv/bin/python -m pip install -e ".[dev]"Run
./.venv/bin/python -m i3wm_mcp # stdio transportRegister with Claude Code
claude mcp add i3wm -- /absolute/path/to/i3wm-mcp/.venv/bin/python -m i3wm_mcpInspect the tool definitions
npx @modelcontextprotocol/inspector ./.venv/bin/python -m i3wm_mcpDevelop
./.venv/bin/python -m pytest # tests + 100% coverage gate
./.venv/bin/ruff check . && ./.venv/bin/ruff format --check .
./.venv/bin/mypy src
./.venv/bin/python scripts/rubric_check.py # local TDQS proxy checkSafety
Read tools have no side effects. Mutation tools are reversible. The three
destructive tools (exec_application, run_command, kill_window) can run
arbitrary commands, close applications, or — via run_command — restart or exit
the session; treat them accordingly and never feed them untrusted input.
License
MIT — see LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with macOS windows through yabai, providing window listing organized by Spaces and screenshot capture capabilities.2MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to manage local tmux sessions, including creating and controlling sessions, windows, and panes, sending commands, and capturing terminal output.1614Do What The F*ck You Want To Public
- Flicense-quality-maintenanceEnables interaction with the FVWM3 window manager for configuration generation, window management, and debugging. Provides access to config files, runtime state, and control tools for managing desktops, monitors, and tiling operations.
- AlicenseAqualityDmaintenanceAllows AI assistants to create, manage, and interact with tmux sessions, windows, and panes programmatically.19MIT
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Manage projects, tasks, time tracking, and team collaboration through natural language.
LLM chat, text summarization and AI image generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kuhyx/i3wm-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server