Skip to main content
Glama
kefimoto

Sway MCP

by kefimoto

Sway MCP

A Model Context Protocol (MCP) server that exposes Sway window manager commands as native tools for Claude Code.

What it does

This server wraps swaymsg and exposes all Sway functionality as structured tools that Claude can use directly, just like the claude-in-chrome extension for the browser.

Tools available:

  • sway_command - Execute any swaymsg command with full flexibility

  • sway_get_tree - Get the complete window tree

  • sway_get_workspaces - List all workspaces

  • sway_get_outputs - List all displays

  • sway_get_marks - Get all bookmarks

  • sway_get_version - Get Sway version

  • sway_get_inputs - List input devices

  • sway_get_config - Get config

Related MCP server: TmuxControlLib MCP Server

Building

npm install
npm run build

Or with Bun:

bun install
bun run build

Running

npm start

Or with Bun:

bun run start

Registration with Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "sway": {
      "command": "node",
      "args": ["/path/to/sway-mcp/dist/index.js"]
    }
  }
}

Or with Bun:

{
  "mcpServers": {
    "sway": {
      "command": "bun",
      "args": ["/path/to/sway-mcp/dist/index.js"]
    }
  }
}

Related MCP Connectors

Related MCP Servers