Sway MCP
by kefimoto
README.md
# 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
## Building
```bash
npm install
npm run build
```
Or with Bun:
```bash
bun install
bun run build
```
## Running
```bash
npm start
```
Or with Bun:
```bash
bun run start
```
## Registration with Claude Code
Add to `~/.claude/settings.json`:
```json
{
"mcpServers": {
"sway": {
"command": "node",
"args": ["/path/to/sway-mcp/dist/index.js"]
}
}
}
```
Or with Bun:
```json
{
"mcpServers": {
"sway": {
"command": "bun",
"args": ["/path/to/sway-mcp/dist/index.js"]
}
}
}
```
This server cannot be deployed
Maintenance
ActivityStale
ResponsivenessNo issues