keyboard-maestro-mcp 0.1.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/LICENSE +21 -0
- package/README.md +211 -0
- package/dist/config-manager.d.ts +92 -0
- package/dist/config-manager.d.ts.map +1 -0
- package/dist/config-manager.js +209 -0
- package/dist/config-manager.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1133 -0
- package/dist/index.js.map +1 -0
- package/dist/macros-template.d.ts +38 -0
- package/dist/macros-template.d.ts.map +1 -0
- package/dist/macros-template.js +263 -0
- package/dist/macros-template.js.map +1 -0
- package/dist/test.d.ts +5 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/test.js +137 -0
- package/dist/test.js.map +1 -0
- package/dist/ui/config.html +794 -0
- package/package.json +58 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sarasvati Akari Lara
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# Keyboard Maestro MCP Server
|
|
2
|
+
|
|
3
|
+
An MCP (Model Context Protocol) server that connects AI assistants like Claude to [Keyboard Maestro](https://www.keyboardmaestro.com/), enabling them to trigger macros and retrieve clipboard results from your Mac.
|
|
4
|
+
|
|
5
|
+
## What It Does
|
|
6
|
+
|
|
7
|
+
This MCP server lets AI assistants:
|
|
8
|
+
- **Trigger macros** on one or multiple Macs
|
|
9
|
+
- **Capture clipboard contents** (text and images) from macros
|
|
10
|
+
- **Take screenshots** and analyze them
|
|
11
|
+
- **Run OCR** and extract text
|
|
12
|
+
- **Control multiple machines** from a single configuration
|
|
13
|
+
|
|
14
|
+
When you run a macro that copies something to the clipboard (like a screenshot), the AI can retrieve and see that content directly.
|
|
15
|
+
|
|
16
|
+
## Requirements
|
|
17
|
+
|
|
18
|
+
- macOS with [Keyboard Maestro](https://www.keyboardmaestro.com/) 11+ installed
|
|
19
|
+
- Keyboard Maestro Web Server enabled
|
|
20
|
+
- Node.js 18+
|
|
21
|
+
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
### 1. Add the MCP Server
|
|
25
|
+
|
|
26
|
+
Add to your MCP client configuration:
|
|
27
|
+
|
|
28
|
+
**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"mcpServers": {
|
|
32
|
+
"keyboard-maestro": {
|
|
33
|
+
"command": "npx",
|
|
34
|
+
"args": ["-y", "keyboard-maestro-mcp"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Claude Code** (`~/.claude/mcp.json`):
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"keyboard-maestro": {
|
|
44
|
+
"command": "npx",
|
|
45
|
+
"args": ["-y", "keyboard-maestro-mcp"]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 2. Run the Config Tool
|
|
51
|
+
|
|
52
|
+
After adding the server and restarting your MCP client, ask the AI:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Open the Keyboard Maestro config tool
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The config tool will guide you through:
|
|
59
|
+
|
|
60
|
+
1. **Enable Web Server** - Instructions for Keyboard Maestro's Web Server settings
|
|
61
|
+
2. **Add Machine(s)** - Enter connection details and test the connection
|
|
62
|
+
3. **Update Config** - Automatically update your MCP config file (or copy JSON)
|
|
63
|
+
4. **Install Macros** - Generate and import the required Keyboard Maestro macros
|
|
64
|
+
|
|
65
|
+
## Configuration Reference
|
|
66
|
+
|
|
67
|
+
### Environment Variables
|
|
68
|
+
|
|
69
|
+
When machines are configured, the server uses these environment variables:
|
|
70
|
+
|
|
71
|
+
| Variable | Description |
|
|
72
|
+
|----------|-------------|
|
|
73
|
+
| `KM_MACHINES` | JSON array of machine configurations |
|
|
74
|
+
|
|
75
|
+
Or for a single machine:
|
|
76
|
+
|
|
77
|
+
| Variable | Required | Default | Description |
|
|
78
|
+
|----------|----------|---------|-------------|
|
|
79
|
+
| `KM_HOST` | Yes | - | Hostname or IP address |
|
|
80
|
+
| `KM_PORT` | No | 4490 | Web server port |
|
|
81
|
+
| `KM_USERNAME` | Yes | - | Web server username |
|
|
82
|
+
| `KM_PASSWORD` | Yes | - | Web server password |
|
|
83
|
+
| `KM_SECURE` | No | false | Use HTTPS instead of HTTP |
|
|
84
|
+
| `KM_NAME` | No | Host value | Friendly name for the machine |
|
|
85
|
+
| `KM_OUTPUT_DIR` | Yes | - | Folder where clipboard files are saved |
|
|
86
|
+
|
|
87
|
+
### Machine Configuration Object
|
|
88
|
+
|
|
89
|
+
Each machine in `KM_MACHINES` supports:
|
|
90
|
+
|
|
91
|
+
| Field | Required | Default | Description |
|
|
92
|
+
|-------|----------|---------|-------------|
|
|
93
|
+
| `name` | Yes | - | Friendly name for the machine |
|
|
94
|
+
| `host` | Yes | - | Hostname or IP address |
|
|
95
|
+
| `port` | No | 4490 | Web server HTTP port |
|
|
96
|
+
| `username` | Yes | - | Web server username |
|
|
97
|
+
| `password` | Yes | - | Web server password |
|
|
98
|
+
| `secure` | No | false | Use HTTPS instead of HTTP |
|
|
99
|
+
| `outputDir` | Yes | - | Folder where clipboard files are saved |
|
|
100
|
+
|
|
101
|
+
> **Port Spacing:** Keyboard Maestro uses two consecutive ports (HTTP and HTTPS on port + 1). When configuring multiple machines, space ports by at least 2 (e.g., 4490, 4492, 4494).
|
|
102
|
+
|
|
103
|
+
## Available Tools
|
|
104
|
+
|
|
105
|
+
### interactive_config
|
|
106
|
+
|
|
107
|
+
Visual configuration tool with interactive UI (for Claude Desktop and other MCP Apps-supporting clients). Provides:
|
|
108
|
+
- Machine management (add, edit, remove, test)
|
|
109
|
+
- MCP config file updates
|
|
110
|
+
- Macro group generation and installation
|
|
111
|
+
|
|
112
|
+
### config
|
|
113
|
+
|
|
114
|
+
Text-based configuration tool (for Claude Code and other CLI clients).
|
|
115
|
+
|
|
116
|
+
### list_machines
|
|
117
|
+
|
|
118
|
+
List all configured Keyboard Maestro machines.
|
|
119
|
+
|
|
120
|
+
### list_macros
|
|
121
|
+
|
|
122
|
+
List available macros from a machine.
|
|
123
|
+
|
|
124
|
+
### trigger_macro
|
|
125
|
+
|
|
126
|
+
Trigger a macro by name or UUID.
|
|
127
|
+
|
|
128
|
+
### trigger_macro_on_all
|
|
129
|
+
|
|
130
|
+
Trigger a macro on all configured machines simultaneously.
|
|
131
|
+
|
|
132
|
+
### get_clipboard_result
|
|
133
|
+
|
|
134
|
+
Retrieve the current clipboard contents from a machine.
|
|
135
|
+
|
|
136
|
+
### trigger_and_capture
|
|
137
|
+
|
|
138
|
+
Trigger a macro and automatically capture the clipboard result.
|
|
139
|
+
|
|
140
|
+
## Example Workflows
|
|
141
|
+
|
|
142
|
+
### Screenshot Analysis
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
Take a screenshot of the active window and describe what you see
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### OCR Text Extraction
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
Run OCR on my clipboard image and read the text
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Multi-Machine Control
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
Mute audio on all my machines
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Keyboard Maestro Setup
|
|
161
|
+
|
|
162
|
+
The config tool will guide you, but here's a summary:
|
|
163
|
+
|
|
164
|
+
### Enable Web Server
|
|
165
|
+
|
|
166
|
+
1. Open **Keyboard Maestro**
|
|
167
|
+
2. Go to **Keyboard Maestro → Preferences** (⌘,)
|
|
168
|
+
3. Click the **Web Server** tab
|
|
169
|
+
4. Check **Web Server Enabled**
|
|
170
|
+
5. Set a **Username** and **Password**
|
|
171
|
+
6. Note the **HTTP Port** (default: 4490)
|
|
172
|
+
|
|
173
|
+
### Import Macros
|
|
174
|
+
|
|
175
|
+
After generating macros with the config tool:
|
|
176
|
+
|
|
177
|
+
1. Go to **File → Import → Import Macros Safely...**
|
|
178
|
+
2. Select the downloaded `keyboard-maestro-mcp.kmmacros` file
|
|
179
|
+
3. The "Keyboard Maestro MCP" group will appear
|
|
180
|
+
|
|
181
|
+
## Security Considerations
|
|
182
|
+
|
|
183
|
+
- Credentials are passed via environment variables
|
|
184
|
+
- Use HTTPS (`secure: true`) when connecting over untrusted networks
|
|
185
|
+
- The web server uses HTTP Basic Authentication
|
|
186
|
+
- Consider firewall rules to restrict access to the web server port
|
|
187
|
+
- Clipboard files are stored in your configured folder
|
|
188
|
+
|
|
189
|
+
## Troubleshooting
|
|
190
|
+
|
|
191
|
+
### "Connection refused" errors
|
|
192
|
+
|
|
193
|
+
- Verify Keyboard Maestro's web server is enabled
|
|
194
|
+
- Check the port number matches your configuration
|
|
195
|
+
- Ensure no firewall is blocking the connection
|
|
196
|
+
|
|
197
|
+
### Macros not appearing in list
|
|
198
|
+
|
|
199
|
+
- The macro must be enabled
|
|
200
|
+
- The macro group must be enabled
|
|
201
|
+
- The macro must have a name
|
|
202
|
+
|
|
203
|
+
### Clipboard capture returns nothing
|
|
204
|
+
|
|
205
|
+
- Run the config tool to verify macros are installed
|
|
206
|
+
- Check that `outputDir` points to the same folder configured in the macros
|
|
207
|
+
- Ensure the folder exists and is writable
|
|
208
|
+
|
|
209
|
+
## License
|
|
210
|
+
|
|
211
|
+
MIT
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Manager for Keyboard Maestro MCP
|
|
3
|
+
* Handles machine configuration, testing, and MCP config file updates
|
|
4
|
+
*/
|
|
5
|
+
import { MachineConfig } from "./index.js";
|
|
6
|
+
/**
|
|
7
|
+
* Known MCP config file locations
|
|
8
|
+
*/
|
|
9
|
+
export declare const CONFIG_PATHS: {
|
|
10
|
+
claudeDesktop: string;
|
|
11
|
+
claudeCode: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Test connection to a Keyboard Maestro machine
|
|
15
|
+
*/
|
|
16
|
+
export declare function testMachineConnection(config: {
|
|
17
|
+
host: string;
|
|
18
|
+
port: number;
|
|
19
|
+
username: string;
|
|
20
|
+
password: string;
|
|
21
|
+
secure?: boolean;
|
|
22
|
+
}): Promise<{
|
|
23
|
+
success: boolean;
|
|
24
|
+
message: string;
|
|
25
|
+
macroCount?: number;
|
|
26
|
+
hasMacroGroup?: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Check if the Keyboard Maestro MCP macro group exists on a machine
|
|
30
|
+
*/
|
|
31
|
+
export declare function checkMacroGroupExists(machine: MachineConfig): Promise<{
|
|
32
|
+
exists: boolean;
|
|
33
|
+
hasClipboardMacro: boolean;
|
|
34
|
+
clipboardMacroUid?: string;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Read an MCP config file
|
|
38
|
+
*/
|
|
39
|
+
export declare function readMcpConfig(configPath: string): Promise<{
|
|
40
|
+
success: boolean;
|
|
41
|
+
config?: Record<string, unknown>;
|
|
42
|
+
error?: string;
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* Write an MCP config file
|
|
46
|
+
*/
|
|
47
|
+
export declare function writeMcpConfig(configPath: string, config: Record<string, unknown>): Promise<{
|
|
48
|
+
success: boolean;
|
|
49
|
+
error?: string;
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Generate the MCP server configuration JSON for machines
|
|
53
|
+
*/
|
|
54
|
+
export declare function generateServerConfig(machines: Array<{
|
|
55
|
+
name: string;
|
|
56
|
+
host: string;
|
|
57
|
+
port: number;
|
|
58
|
+
username: string;
|
|
59
|
+
password: string;
|
|
60
|
+
secure?: boolean;
|
|
61
|
+
outputDir?: string;
|
|
62
|
+
}>): Record<string, unknown>;
|
|
63
|
+
/**
|
|
64
|
+
* Parse machines from KM_MACHINES environment variable or return empty array
|
|
65
|
+
*/
|
|
66
|
+
export declare function parseMachinesFromEnv(): MachineConfig[];
|
|
67
|
+
/**
|
|
68
|
+
* Configuration state for the wizard
|
|
69
|
+
*/
|
|
70
|
+
export interface ConfigState {
|
|
71
|
+
mode: "setup" | "manage";
|
|
72
|
+
machines: Array<{
|
|
73
|
+
name: string;
|
|
74
|
+
host: string;
|
|
75
|
+
port: number;
|
|
76
|
+
username: string;
|
|
77
|
+
password: string;
|
|
78
|
+
secure: boolean;
|
|
79
|
+
outputDir?: string;
|
|
80
|
+
status?: "untested" | "connected" | "error";
|
|
81
|
+
errorMessage?: string;
|
|
82
|
+
hasMacroGroup?: boolean;
|
|
83
|
+
}>;
|
|
84
|
+
mcpConfigPath?: string;
|
|
85
|
+
macroStoragePath?: string;
|
|
86
|
+
needsMacroSetup: boolean;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Get the current configuration state
|
|
90
|
+
*/
|
|
91
|
+
export declare function getConfigState(): Promise<ConfigState>;
|
|
92
|
+
//# sourceMappingURL=config-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-manager.d.ts","sourceRoot":"","sources":["../src/config-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,aAAa,EAA4B,MAAM,YAAY,CAAC;AAGrE;;GAEG;AACH,eAAO,MAAM,YAAY;;;CASxB,CAAC;AAEF;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,OAAO,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC,CAmCD;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC;IAC3E,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC,CAwBD;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EA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AAE,MAAM,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CA2C3D"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Manager for Keyboard Maestro MCP
|
|
3
|
+
* Handles machine configuration, testing, and MCP config file updates
|
|
4
|
+
*/
|
|
5
|
+
import { readFile, writeFile, access } from "fs/promises";
|
|
6
|
+
import { constants } from "fs";
|
|
7
|
+
import { homedir } from "os";
|
|
8
|
+
import { join } from "path";
|
|
9
|
+
import { listMacros } from "./index.js";
|
|
10
|
+
import { SAVE_CLIPBOARD_MACRO_UID, expandPath } from "./macros-template.js";
|
|
11
|
+
/**
|
|
12
|
+
* Known MCP config file locations
|
|
13
|
+
*/
|
|
14
|
+
export const CONFIG_PATHS = {
|
|
15
|
+
claudeDesktop: join(homedir(), "Library", "Application Support", "Claude", "claude_desktop_config.json"),
|
|
16
|
+
claudeCode: join(homedir(), ".claude", "mcp.json"),
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Test connection to a Keyboard Maestro machine
|
|
20
|
+
*/
|
|
21
|
+
export async function testMachineConnection(config) {
|
|
22
|
+
const machine = {
|
|
23
|
+
name: "test",
|
|
24
|
+
host: config.host,
|
|
25
|
+
port: config.port,
|
|
26
|
+
username: config.username,
|
|
27
|
+
password: config.password,
|
|
28
|
+
secure: config.secure ?? false,
|
|
29
|
+
};
|
|
30
|
+
try {
|
|
31
|
+
const result = await listMacros(machine);
|
|
32
|
+
if (result.success) {
|
|
33
|
+
// Check if the MCP macro group exists
|
|
34
|
+
const macroGroupCheck = await checkMacroGroupExists(machine);
|
|
35
|
+
return {
|
|
36
|
+
success: true,
|
|
37
|
+
message: `Connected successfully! Found ${result.macros?.length || 0} macros.`,
|
|
38
|
+
macroCount: result.macros?.length || 0,
|
|
39
|
+
hasMacroGroup: macroGroupCheck.exists && macroGroupCheck.hasClipboardMacro,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return {
|
|
44
|
+
success: false,
|
|
45
|
+
message: result.message || "Connection failed",
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
return {
|
|
51
|
+
success: false,
|
|
52
|
+
message: error instanceof Error ? error.message : "Unknown error",
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Check if the Keyboard Maestro MCP macro group exists on a machine
|
|
58
|
+
*/
|
|
59
|
+
export async function checkMacroGroupExists(machine) {
|
|
60
|
+
try {
|
|
61
|
+
const result = await listMacros(machine);
|
|
62
|
+
if (!result.success || !result.macros) {
|
|
63
|
+
return { exists: false, hasClipboardMacro: false };
|
|
64
|
+
}
|
|
65
|
+
const mcpMacros = result.macros.filter((m) => m.group === "Keyboard Maestro MCP");
|
|
66
|
+
const clipboardMacro = mcpMacros.find((m) => m.name === "Save Clipboard to File");
|
|
67
|
+
return {
|
|
68
|
+
exists: mcpMacros.length > 0,
|
|
69
|
+
hasClipboardMacro: !!clipboardMacro,
|
|
70
|
+
clipboardMacroUid: clipboardMacro?.uid,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return { exists: false, hasClipboardMacro: false };
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Read an MCP config file
|
|
79
|
+
*/
|
|
80
|
+
export async function readMcpConfig(configPath) {
|
|
81
|
+
try {
|
|
82
|
+
const expanded = expandPath(configPath);
|
|
83
|
+
await access(expanded, constants.R_OK);
|
|
84
|
+
const content = await readFile(expanded, "utf-8");
|
|
85
|
+
const config = JSON.parse(content);
|
|
86
|
+
return { success: true, config };
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
if (error.code === "ENOENT") {
|
|
90
|
+
return { success: true, config: {} }; // File doesn't exist, start fresh
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
success: false,
|
|
94
|
+
error: error instanceof Error ? error.message : "Failed to read config",
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Write an MCP config file
|
|
100
|
+
*/
|
|
101
|
+
export async function writeMcpConfig(configPath, config) {
|
|
102
|
+
try {
|
|
103
|
+
const expanded = expandPath(configPath);
|
|
104
|
+
const content = JSON.stringify(config, null, 2);
|
|
105
|
+
await writeFile(expanded, content, "utf-8");
|
|
106
|
+
return { success: true };
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
return {
|
|
110
|
+
success: false,
|
|
111
|
+
error: error instanceof Error ? error.message : "Failed to write config",
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Generate the MCP server configuration JSON for machines
|
|
117
|
+
*/
|
|
118
|
+
export function generateServerConfig(machines) {
|
|
119
|
+
const machinesJson = machines.map((m) => ({
|
|
120
|
+
name: m.name,
|
|
121
|
+
host: m.host,
|
|
122
|
+
port: m.port,
|
|
123
|
+
username: m.username,
|
|
124
|
+
password: m.password,
|
|
125
|
+
secure: m.secure ?? false,
|
|
126
|
+
outputDir: m.outputDir,
|
|
127
|
+
saveClipboardMacroUid: SAVE_CLIPBOARD_MACRO_UID,
|
|
128
|
+
}));
|
|
129
|
+
return {
|
|
130
|
+
command: "npx",
|
|
131
|
+
args: ["-y", "keyboard-maestro-mcp"],
|
|
132
|
+
env: {
|
|
133
|
+
KM_MACHINES: JSON.stringify(machinesJson),
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Parse machines from KM_MACHINES environment variable or return empty array
|
|
139
|
+
*/
|
|
140
|
+
export function parseMachinesFromEnv() {
|
|
141
|
+
const machinesEnv = process.env.KM_MACHINES;
|
|
142
|
+
if (!machinesEnv) {
|
|
143
|
+
// Check for single machine config
|
|
144
|
+
const host = process.env.KM_HOST;
|
|
145
|
+
const username = process.env.KM_USERNAME;
|
|
146
|
+
const password = process.env.KM_PASSWORD;
|
|
147
|
+
if (host && username && password) {
|
|
148
|
+
return [{
|
|
149
|
+
name: process.env.KM_NAME || host,
|
|
150
|
+
host,
|
|
151
|
+
port: parseInt(process.env.KM_PORT || "4490", 10),
|
|
152
|
+
username,
|
|
153
|
+
password,
|
|
154
|
+
secure: process.env.KM_SECURE === "true",
|
|
155
|
+
outputDir: process.env.KM_OUTPUT_DIR,
|
|
156
|
+
saveClipboardMacroUid: process.env.KM_SAVE_CLIPBOARD_MACRO_UID || SAVE_CLIPBOARD_MACRO_UID,
|
|
157
|
+
}];
|
|
158
|
+
}
|
|
159
|
+
return [];
|
|
160
|
+
}
|
|
161
|
+
try {
|
|
162
|
+
const parsed = JSON.parse(machinesEnv);
|
|
163
|
+
if (!Array.isArray(parsed))
|
|
164
|
+
return [];
|
|
165
|
+
return parsed;
|
|
166
|
+
}
|
|
167
|
+
catch {
|
|
168
|
+
return [];
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Get the current configuration state
|
|
173
|
+
*/
|
|
174
|
+
export async function getConfigState() {
|
|
175
|
+
const machines = parseMachinesFromEnv();
|
|
176
|
+
if (machines.length === 0) {
|
|
177
|
+
return {
|
|
178
|
+
mode: "setup",
|
|
179
|
+
machines: [],
|
|
180
|
+
needsMacroSetup: true,
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
// Check each machine's status and macro group
|
|
184
|
+
const machinesWithStatus = await Promise.all(machines.map(async (m) => {
|
|
185
|
+
const testResult = await testMachineConnection(m);
|
|
186
|
+
const macroCheck = testResult.success
|
|
187
|
+
? await checkMacroGroupExists(m)
|
|
188
|
+
: { exists: false, hasClipboardMacro: false };
|
|
189
|
+
return {
|
|
190
|
+
name: m.name,
|
|
191
|
+
host: m.host,
|
|
192
|
+
port: m.port,
|
|
193
|
+
username: m.username,
|
|
194
|
+
password: m.password,
|
|
195
|
+
secure: m.secure ?? false,
|
|
196
|
+
outputDir: m.outputDir,
|
|
197
|
+
status: testResult.success ? "connected" : "error",
|
|
198
|
+
errorMessage: testResult.success ? undefined : testResult.message,
|
|
199
|
+
hasMacroGroup: macroCheck.hasClipboardMacro,
|
|
200
|
+
};
|
|
201
|
+
}));
|
|
202
|
+
const anyMissingMacros = machinesWithStatus.some((m) => m.status === "connected" && !m.hasMacroGroup);
|
|
203
|
+
return {
|
|
204
|
+
mode: "manage",
|
|
205
|
+
machines: machinesWithStatus,
|
|
206
|
+
needsMacroSetup: anyMissingMacros,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=config-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-manager.js","sourceRoot":"","sources":["../src/config-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAA+B,UAAU,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAsB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhG;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,aAAa,EAAE,IAAI,CACjB,OAAO,EAAE,EACT,SAAS,EACT,qBAAqB,EACrB,QAAQ,EACR,4BAA4B,CAC7B;IACD,UAAU,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC;CACnD,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,MAM3C;IAMC,M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C,IAAI,CAC9C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,IAAI,CAAC,CAAC,CAAC,aAAa,CACpD,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,kBAAkB;QAC5B,eAAe,EAAE,gBAAgB;KAClC,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export interface MachineConfig {
|
|
3
|
+
name: string;
|
|
4
|
+
host: string;
|
|
5
|
+
port: number;
|
|
6
|
+
username: string;
|
|
7
|
+
password: string;
|
|
8
|
+
secure?: boolean;
|
|
9
|
+
outputDir?: string;
|
|
10
|
+
saveClipboardMacroUid?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function getMachines(): MachineConfig[];
|
|
13
|
+
export declare function getBaseUrl(machine: MachineConfig): string;
|
|
14
|
+
export declare function getAuthHeader(machine: MachineConfig): string;
|
|
15
|
+
export declare function findMachine(machines: MachineConfig[], name?: string): MachineConfig | undefined;
|
|
16
|
+
export declare function decodeHtmlEntities(text: string): string;
|
|
17
|
+
export declare function listMacros(machine: MachineConfig): Promise<{
|
|
18
|
+
success: boolean;
|
|
19
|
+
macros?: {
|
|
20
|
+
name: string;
|
|
21
|
+
uid?: string;
|
|
22
|
+
group?: string;
|
|
23
|
+
}[];
|
|
24
|
+
message?: string;
|
|
25
|
+
}>;
|
|
26
|
+
export declare function triggerMacro(machine: MachineConfig, macro: string, value?: string): Promise<{
|
|
27
|
+
success: boolean;
|
|
28
|
+
message: string;
|
|
29
|
+
result?: string;
|
|
30
|
+
}>;
|
|
31
|
+
export declare function fetchUrl(machine: MachineConfig, path: string): Promise<{
|
|
32
|
+
status: number;
|
|
33
|
+
headers: Record<string, string>;
|
|
34
|
+
body: string;
|
|
35
|
+
}>;
|
|
36
|
+
export declare function getClipboardResult(machine: MachineConfig): Promise<{
|
|
37
|
+
success: boolean;
|
|
38
|
+
message: string;
|
|
39
|
+
type?: "text" | "image";
|
|
40
|
+
content?: string;
|
|
41
|
+
filePath?: string;
|
|
42
|
+
}>;
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAyCA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAGD,wBAAgB,WAAW,IAAI,aAAa,EAAE,CAgD7C;AAGD,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAIzD;AAGD,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAK5D;AAGD,wBAAgB,WAAW,CACzB,QAAQ,EAAE,aAAa,EAAE,EACzB,IAAI,CAAC,EAAE,MAAM,GACZ,aAAa,GAAG,SAAS,CAK3B;AAGD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CASvD;AAGD,wBAAsB,UAAU,CAC9B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAwE5G;AAGD,wBAAsB,YAAY,CAChC,OAAO,EAAE,aAAa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