Skip to main content
Glama
Spacepal MCP Server

Spacepal MCP Server

Spacepal MCP server

Lets Claude, Cursor and other MCP clients work with your macOS Spaces through Spacepal: "switch to my Mail Space", "what's on Desktop 3?", "name this desktop Research".

An agent lists Spaces, switches to Research and names a desktop through the Spacepal MCP server (illustration)

It runs locally over stdio. It reads the Space list Spacepal writes to ~/Library/Application Support/Spacepal/state.json and sends commands through the spacepal:// URL scheme. It makes no network calls.

Several Claude Code sessions

If you run Claude Code on several Spaces, Spacepal 1.2.12 and later marks the Space whose session is waiting for you (a permission request or a question) or has finished, and agent_sessions lets an agent see the same thing, for example to check whether the backend session is done. Turn it on in Spacepal: Settings > General > Claude Code > Add to Claude Code. list_spaces also shows each project's git branch, changed files and local dev servers.

The Spacepal overview: two Spaces marked Waiting and one Done, with git branches and localhost servers (demo mode)

More: Spacepal for Claude Code

Related MCP server: arc-mcp

Requirements

  • macOS 14 or later, with Spacepal running (direct or Mac App Store build). Download Spacepal: 14-day free trial, no account; names, notes and switching stay free after it.

  • Node.js 18 or later

Tools

Tool

What it does

list_spaces

Every Space with its number, name, display, apps, note, and which one is active

current_space

The Space you are on

switch_space

Switch by number or name, or step with next, previous, back

move_window_to_space

Send the frontmost window to a Space by number or name, or to next or previous

open_url

Open a link in a new browser window on a chosen Space, or on the project's own Space by default, so it does not land in a browser window on another Space

agent_sessions

The Claude Code sessions by Space: which one is waiting for the user (and why), which finished, and since when

new_project_space

Make a named Space for a project folder and start Claude Code there (direct version of Spacepal)

rename_space

Name a Space; an empty name restores "Desktop N"

set_space_note

Attach a short note to a Space

open_overview

Open Spacepal's overview grid

list_profiles

Names of your saved profiles

apply_profile

Apply a saved profile (names, colours, notes and automations)

apply_template

Name the Spaces from a starter template: Developer, Designer, Freelancer, Student, Streamer

set_up_space

Switch to a Space and run its automations: open its apps, URLs and files

save_window_layout

Save which Space and position every window is in

restore_window_layout

Put windows back from the last saved layout

save_sessions

Save terminal sessions and Chrome windows on one Space or all of them

restore_sessions

Reopen saved sessions on their Spaces

place_window

Put the front window in a half, a quarter, maximized, centred, or on the next display

set_presentation_mode

Hide Space names, notes and previews for a screen share, or show them again

add_desktop

Add a desktop on the current display

remove_desktop

Remove a desktop; its windows move to another one

Every tool is marked with MCP hints, so clients can tell the read-only tools apart and ask before remove_desktop or apply_template, which change your setup.

move_window_to_space acts on the frontmost window. In Claude Desktop that is usually Claude's own window. It moves the window directly on macOS 14.0–14.4 and 26.4+, and by dragging it on other versions. restore_window_layout can only move windows between Spaces on 14.0–14.4 and 26.4+.

The MCP server is free. The tools follow the app's own limits: after Spacepal's 14-day trial, names and notes stay free, while the overview, sessions and other Pro features need a license.

Install

Claude Code

claude mcp add spacepal -- npx -y spacepal-mcp

Claude Desktop

Add this to ~/Library/Application Support/Claude/claude_desktop_config.json, then restart Claude:

{
  "mcpServers": {
    "spacepal": { "command": "npx", "args": ["-y", "spacepal-mcp"] }
  }
}

Cursor

Add the same block to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project:

{
  "mcpServers": {
    "spacepal": { "command": "npx", "args": ["-y", "spacepal-mcp"] }
  }
}

From source

cd mcp && npm install
claude mcp add spacepal -- node "$PWD/index.js"

Troubleshooting

  • "Spacepal is not running": open Spacepal from Applications.

  • Names are out of date: Spacepal rewrites state.json when Spaces change. Open its menu once to refresh it.

  • Switching does nothing: check Spacepal > Settings > Setup. It needs Accessibility permission.

MIT © Halberd LLC

Available Tools

19 tools
add_desktopAdd desktopA

Create a new empty desktop at the end of the display the pointer is on. Mission Control opens for a moment while Spacepal adds it. Undo with remove_desktop. Returns the new number of Spaces once Spacepal confirms it.

Inputs: no named parameters.

apply_profileApply profileA
DestructiveIdempotent

Switch to one of the user's saved profiles, replacing the names, colours, notes and automations of every Space with the profile's. If a profile was active, Spacepal first saves the current set under it, so the user can switch back. If none was active, the current names are not saved anywhere and are lost, so ask the user to save them as a profile first. Windows and desktops are not changed. Unlike apply_template, which uses built-in starter names, this uses the user's own saved sets. Get valid names from list_profiles; fails with the list of names if the profile does not exist. Ask the user first.

Inputs: name (required).

apply_templateApply templateA
DestructiveIdempotent

Name and colour the user's desktops from one of Spacepal's built-in starter templates: Developer, Designer, Freelancer, Student, Streamer. Overwrites the names, colours and notes of the desktops it covers, so ask the user first; to keep the current names they can save them as a profile in Spacepal. If the template needs more desktops than exist, Spacepal shows a dialog on screen asking the user whether to add them. For the user's own saved sets use apply_profile instead.

Inputs: name (required).

current_spaceCurrent SpaceA
Read-onlyIdempotent

Return the Space the user is on now: its name and desktop number (one per display). Read-only and cheaper than list_spaces when you only need the active Space.

Inputs: no named parameters. Returns: spaces

list_profilesList profilesA
Read-onlyIdempotent

List the names of the user's saved Spacepal profiles. A profile is a saved set of Space names, colours, notes and automations, such as "Work" and "Home". Read-only. Use it to get a valid name for apply_profile.

Inputs: no named parameters. Returns: profiles

list_spacesList SpacesA
Read-onlyIdempotent

List every macOS Space (desktop) on every display: desktop number, name, note, the apps with windows on it, and which one is active. Read-only. Call this first to get valid Space numbers and names for the other tools. Fails if Spacepal is not running or has not written its list yet.

Inputs: no named parameters. Returns: spaces, current

move_window_to_spaceMove window to SpaceA

Move the user's frontmost window to another Space; the window keeps its size and position. Target is a desktop number or name from list_spaces, or "next"/"previous". The frontmost window is the one the user last focused: from a terminal client that is usually the window they worked in, from Claude Desktop it is Claude's own window. On macOS 14.0-14.4 and 26.4+ the window moves directly; on other versions Spacepal drags it, which takes a moment. Depending on the user's settings the screen may follow the window. Undo by moving it back. Fails if no Space has that name.

Inputs: space (required).

open_overviewOpen overviewA

Show Spacepal's full-screen overview of every Space with live previews, for the user to look at and pick from. It is a toggle: calling it while the overview is open closes it. Changes nothing else. Needs Spacepal's trial or a license; without one Spacepal shows its license window instead. To get the Space list as data, use list_spaces.

Inputs: no named parameters.

place_windowPlace windowA
Idempotent

Resize and move the user's frontmost window on its current display: a half, a quarter, maximized or centred; or, with "next-display", move it to the next display. It stays on the same Space. The frontmost window is the one the user last focused (from Claude Desktop that is Claude's own window). Needs the Accessibility permission Spacepal already asks for. Not undoable as one step; place it again to change it. Use move_window_to_space to send a window to another Space instead. Needs Spacepal 1.2.8 or later.

Inputs: position (required).

remove_desktopRemove desktopA
Destructive

Close a desktop, as with its close button in Mission Control. Its windows move to another desktop and are not closed, but its Spacepal name, note and automation are lost and cannot be restored automatically. Full-screen Spaces cannot be removed this way. Always ask the user before calling this. Fails if the Space does not exist.

Inputs: space (required).

rename_spaceRename SpaceA
Idempotent

Set the name Spacepal shows for a Space in its menu bar, overview and Mission Control. Replaces the old name; an empty name goes back to "Desktop N". The name stays with the Space even if desktops are reordered. Reversible: call again with the old name (get it from list_spaces first). Fails if the Space does not exist.

Inputs: name (required), space.

restore_sessionsRestore sessionsA

Reopen the terminal and Chrome windows saved by save_sessions, each on the Space it was saved from. Opens new windows, so calling it twice can open duplicates. Needs Spacepal's trial or a license. To move windows that are already open, use restore_window_layout instead.

Inputs: no named parameters.

restore_window_layoutRestore window layoutA
Idempotent

Move open windows back to the Spaces and positions recorded by save_window_layout (or Spacepal's automatic save) for the current display setup. Moving windows between Spaces only works on macOS 14.0-14.4 and 26.4+; on other versions positions are restored but windows stay on their Space. Windows of apps that are not open are skipped; to reopen terminals and Chrome windows use restore_sessions. Spacepal shows how many windows it moved.

Inputs: no named parameters.

save_sessionsSave sessionsA
Idempotent

Save the terminal windows (with their folders) and Chrome windows (with their tabs) on one Space, or on every Space with all=true, so restore_sessions can reopen them on the right Space after a restart. Replaces the earlier save for those Spaces and drops windows that were closed. Needs Spacepal's trial or a license; without one nothing is saved.

Inputs: all, space.

save_window_layoutSave window layoutA
Idempotent

Record which Space and screen position every open window has, for the current display setup, so restore_window_layout can put them back. Overwrites the previous manual save for these displays (Spacepal also saves automatically in the background). Moves nothing.

Inputs: no named parameters.

set_presentation_modeSet presentation modeA
Idempotent

Turn Spacepal's presentation mode on or off. While it is on, Spacepal shows "Desktop N" instead of Space names and hides notes, badges and window previews in its overview, menu bar and Mission Control, so a screen share shows nothing private. Names and notes are kept and come back when it is turned off; list_spaces still returns the real names. Reversible by calling it again. Needs Spacepal 1.2.8 or later.

Inputs: on (required).

set_space_noteSet Space noteA
Idempotent

Set the short note that says what a Space is for, e.g. "Client B invoices"; list_spaces returns it and Spacepal shows it in its overview. Replaces any existing note; empty text removes the note. Reversible by setting the old note again (read it from list_spaces first). Fails if the Space does not exist.

Inputs: text (required), space.

set_up_spaceSet up SpaceA

Switch to a Space and open the apps, URLs and files its Spacepal automation lists, even if they were opened before. Entering the Space also runs its usual on-enter actions, such as a Shortcut. Use it to prepare a workspace; to only change the visible Space use switch_space. Opens apps on the user's Mac, so it cannot be undone automatically. Does nothing beyond switching if the Space has no automation. Fails if the Space does not exist.

Inputs: space.

switch_spaceSwitch SpaceA
Idempotent

Show another Space on the user's screen, instantly and without the slide animation. Give a desktop number or name from list_spaces, or "next", "previous" (neighbouring desktop) or "back" (the Space shown before). Changes only what is visible; no windows move. Undo with space="back". Returns the Space now shown; fails if no Space has that name.

Inputs: space (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 19 tools

    Disambiguation4/5

    Most tools target distinct Space/window/profile actions, and descriptions explicitly distinguish close pairs such as switch_space vs set_up_space and apply_profile vs apply_template. A few boundaries still require careful reading, especially save/restore sessions vs save/restore window layouts and current_space vs list_spaces, but overlap is limited.

    Naming Consistency4/5

    Nearly all tools use a consistent snake_case verb_noun pattern (list_spaces, move_window_to_space, apply_profile, restore_sessions). The main deviation is current_space, which is noun-like rather than verb-led; get_current_space would fit the convention better.

    Tool Count3/5

    The server exposes 19 tools, which is on the heavy side for a single MCP surface and includes plausible consolidation candidates such as profile vs template application and separate session/layout save-restore pairs. The domain is broad enough that most tools correspond to real workflows, but the count sits in the 16-25 range that tends to feel heavy.

    Completeness4/5

    Coverage is strong across Space lifecycle, window placement, layout/session restoration, profiles/templates, overview, and presentation mode. Minor gaps remain around creating/saving profiles, directly setting Space colours, and managing automations, but none appear fatal for the stated purpose.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      An MCP server for the Arc browser that enables programmatic management of spaces and tabs. It supports actions like listing, creating, and deleting spaces and tabs, as well as focusing spaces and opening URLs via AppleScript.
      9
      21 npm
      8
      MIT
    • A
      license
      A
      quality
      F
      maintenance
      Enables inspection and control of Arc Browser spaces and tabs on macOS, including reading sidebar/history data and performing actions like focusing spaces, creating and closing tabs.
      13
      18 PyPI
      1
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      A lightweight MCP server that bridges AI agents and macOS, enabling automation of file navigation, application control, UI interaction, browser automation, and system operations.
      239
      MIT