spacepal-mcp 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/index.js +44 -1
- package/package.json +1 -1
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -34,6 +34,8 @@ It runs locally over stdio. It reads the Space list Spacepal writes to
|
|
|
34
34
|
| `restore_window_layout` | Put windows back from the last saved layout |
|
|
35
35
|
| `save_sessions` | Save terminal sessions and Chrome windows on one Space or all of them |
|
|
36
36
|
| `restore_sessions` | Reopen saved sessions on their Spaces |
|
|
37
|
+
| `place_window` | Put the front window in a half, a quarter, maximized, centred, or on the next display |
|
|
38
|
+
| `set_presentation_mode` | Hide Space names, notes and previews for a screen share, or show them again |
|
|
37
39
|
| `add_desktop` | Add a desktop on the current display |
|
|
38
40
|
| `remove_desktop` | Remove a desktop; its windows move to another one |
|
|
39
41
|
|
package/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { join } from "node:path";
|
|
|
13
13
|
import { promisify } from "node:util";
|
|
14
14
|
|
|
15
15
|
const run = promisify(execFile);
|
|
16
|
-
const VERSION = "0.
|
|
16
|
+
const VERSION = "0.4.0";
|
|
17
17
|
|
|
18
18
|
// Direct build writes to Application Support; the App Store build is sandboxed.
|
|
19
19
|
const SUPPORT_DIRS = [
|
|
@@ -483,6 +483,49 @@ server.registerTool(
|
|
|
483
483
|
}),
|
|
484
484
|
);
|
|
485
485
|
|
|
486
|
+
server.registerTool(
|
|
487
|
+
"place_window",
|
|
488
|
+
{
|
|
489
|
+
title: "Place window",
|
|
490
|
+
description:
|
|
491
|
+
"Resize and move the user's frontmost window on its current display: a half, a quarter, maximized or centred; " +
|
|
492
|
+
'or, with "next-display", move it to the next display. It stays on the same Space. ' +
|
|
493
|
+
"The frontmost window is the one the user last focused (from Claude Desktop that is Claude's own window). " +
|
|
494
|
+
"Needs the Accessibility permission Spacepal already asks for. Not undoable as one step; place it again to change it. " +
|
|
495
|
+
"Use move_window_to_space to send a window to another Space instead. Needs Spacepal 1.2.8 or later.",
|
|
496
|
+
inputSchema: {
|
|
497
|
+
position: z
|
|
498
|
+
.enum(["left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right", "maximize", "center", "next-display"])
|
|
499
|
+
.describe('Where the window goes: a half ("left", "right", "top", "bottom"), a quarter ("top-left" etc.), "maximize", "center", or "next-display".'),
|
|
500
|
+
},
|
|
501
|
+
annotations: { title: "Place window", ...CHANGE, idempotentHint: true },
|
|
502
|
+
},
|
|
503
|
+
guarded(async ({ position }) => {
|
|
504
|
+
if (position === "next-display") await send("next-display");
|
|
505
|
+
else await send(`snap/${position}`);
|
|
506
|
+
return text(`Asked Spacepal to place the front window: ${position}.`);
|
|
507
|
+
}),
|
|
508
|
+
);
|
|
509
|
+
|
|
510
|
+
server.registerTool(
|
|
511
|
+
"set_presentation_mode",
|
|
512
|
+
{
|
|
513
|
+
title: "Set presentation mode",
|
|
514
|
+
description:
|
|
515
|
+
"Turn Spacepal's presentation mode on or off. While it is on, Spacepal shows \"Desktop N\" instead of Space names and hides notes, " +
|
|
516
|
+
"badges and window previews in its overview, menu bar and Mission Control, so a screen share shows nothing private. " +
|
|
517
|
+
"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.",
|
|
518
|
+
inputSchema: {
|
|
519
|
+
on: z.boolean().describe("true hides names, notes and previews; false shows them again."),
|
|
520
|
+
},
|
|
521
|
+
annotations: { title: "Set presentation mode", ...CHANGE, idempotentHint: true },
|
|
522
|
+
},
|
|
523
|
+
guarded(async ({ on }) => {
|
|
524
|
+
await send(`presentation/${on ? "on" : "off"}`);
|
|
525
|
+
return text(on ? "Presentation mode on: names, notes and previews hidden." : "Presentation mode off.");
|
|
526
|
+
}),
|
|
527
|
+
);
|
|
528
|
+
|
|
486
529
|
server.registerTool(
|
|
487
530
|
"add_desktop",
|
|
488
531
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spacepal-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "MCP server for Spacepal: list, switch, rename macOS Spaces and move windows between them from Claude, Cursor or any MCP client.",
|
|
5
5
|
"mcpName": "com.getspacepal/spacepal",
|
|
6
6
|
"type": "module",
|
package/server.json
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"name": "com.getspacepal/spacepal",
|
|
4
4
|
"title": "Spacepal",
|
|
5
5
|
"description": "List, switch and rename macOS Spaces and move windows between them. Needs the Spacepal app.",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.4.0",
|
|
7
7
|
"websiteUrl": "https://getspacepal.com/integrations/mcp/",
|
|
8
8
|
"packages": [
|
|
9
9
|
{
|
|
10
10
|
"registryType": "npm",
|
|
11
11
|
"identifier": "spacepal-mcp",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.4.0",
|
|
13
13
|
"transport": {
|
|
14
14
|
"type": "stdio"
|
|
15
15
|
}
|