terminator-mcp-agent 0.6.14 → 0.6.16

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.
Files changed (2) hide show
  1. package/README.md +67 -43
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -10,77 +10,102 @@
10
10
 
11
11
  A Model Context Protocol (MCP) server that provides desktop GUI automation capabilities using the [Terminator](https://github.com/mediar-ai/terminator) library. This server enables LLMs and agentic clients to interact with Windows, macOS, and Linux applications through structured accessibility APIs—no vision models or screenshots required.
12
12
 
13
- ### Key Features
13
+ ### Getting Started
14
14
 
15
- - **Fast and lightweight**. Uses OS-level accessibility APIs, not pixel-based input.
16
- - **LLM/agent-friendly**. No vision models needed, operates purely on structured data.
17
- - **Deterministic automation**. Avoids ambiguity common with screenshot-based approaches.
18
- - **Multi-platform**. Supports Windows (full), macOS (partial), Linux (partial).
15
+ The easiest way to get started is to use the one-click install buttons above for your specific editor (VS Code, Cursor, etc.).
19
16
 
20
- ### Requirements
17
+ Alternatively, you can install and configure the agent from your command line.
21
18
 
22
- - Node.js 16 or newer
23
- - VS Code, Cursor, Windsurf, Claude Desktop, or any other MCP client
19
+ **1. Install & Configure Automatically**
20
+ Run the following command and select your MCP client from the list:
24
21
 
25
- ### Getting started
22
+ ```sh
23
+ npx -y terminator-mcp-agent --add-to-app
24
+ ```
26
25
 
27
- First, install the Terminator MCP server with your client. A typical configuration looks like this:
26
+ **2. Manual Configuration**
27
+ If you prefer, you can add the following to your MCP client's settings file:
28
28
 
29
29
  ```json
30
30
  {
31
- "mcpServers": {
32
- "terminator-mcp-agent": {
33
- "command": "npx",
34
- "args": ["-y", "terminator-mcp-agent"]
35
- }
36
- }
31
+ "mcpServers": {
32
+ "terminator-mcp-agent": {
33
+ "command": "npx",
34
+ "args": ["-y", "terminator-mcp-agent"]
35
+ }
36
+ }
37
37
  }
38
38
  ```
39
39
 
40
- You can also use the CLI to configure your app automatically:
40
+ ### Core Workflows: From Interaction to Structured Data
41
41
 
42
- ```sh
43
- npx -y terminator-mcp-agent --add-to-app [app]
44
- ```
42
+ The Terminator MCP agent offers two primary workflows for automating desktop tasks. Both paths lead to the same goal: creating a >95% accuracy, 10000x faster than humans, automation.
45
43
 
46
- Replace `[app]` with one of:
44
+ #### 1. Iterative Development with `execute_sequence`
47
45
 
48
- - cursor
49
- - claude
50
- - vscode
51
- - insiders
52
- - windsurf
53
- - cline
54
- - roocode
55
- - witsy
56
- - enconvo
57
- - boltai
58
- - amazon-bedrock
59
- - amazonq
46
+ This is the most powerful and flexible method. You build a workflow step-by-step, using MCP tools to inspect the UI and refine your actions.
60
47
 
61
- If you omit `[app]`, the CLI will prompt you to select from all available options.
48
+ 1. **Inspect the UI**: Start by using `get_focused_window_tree` to understand the structure of your target application. This gives you the roles, names, and IDs of all elements.
49
+ 2. **Build a Sequence**: Create an `execute_sequence` tool call with a series of actions (`click_element`, `type_into_element`, etc.). Use robust selectors (like `role|name` or stable `properties:AutomationId:value` selectors) whenever possible.
50
+ 3. **Capture the Final State**: Ensure the last step in your sequence is an action that returns a UI tree. The `wait_for_element` tool with `include_tree: true` is perfect for this, as it captures the application's state after your automation has run.
51
+ 4. **Extract Structured Data with `output_parser`**: Add the `output_parser` argument to your `execute_sequence` call. Define a set of rules using our JSON-based DSL to parse the final UI tree. If successful, the tool result will contain a `parsed_output` field with your clean JSON data.
62
52
 
63
- ---
53
+ Here is an example of an `output_parser` that extracts insurance quote data from a web page:
54
+ ```json
55
+ "output_parser": {
56
+ "uiTreeJsonPath": "$.results[-1].results[-1].result.content[0].Json.ui_tree",
57
+ "itemContainerDefinition": {
58
+ "nodeConditions": [{ "property": "role", "op": "equals", "value": "Group" }],
59
+ "childConditions": {
60
+ "logic": "and",
61
+ "conditions": [
62
+ { "existsChild": { "conditions": [{ "property": "name", "op": "startsWith", "value": "$" }] } },
63
+ { "existsChild": { "conditions": [{ "property": "name", "op": "equals", "value": "Monthly Price" }] } }
64
+ ]
65
+ }
66
+ },
67
+ "fieldsToExtract": {
68
+ "monthlyPrice": {
69
+ "fromChild": {
70
+ "conditions": [{ "property": "name", "op": "startsWith", "value": "$" }],
71
+ "extractProperty": "name"
72
+ }
73
+ }
74
+ }
75
+ }
76
+ ```
64
77
 
65
- <img width="1512" alt="Screenshot 2025-04-16 at 9 29 42 AM" src="https://github.com/user-attachments/assets/457ebaf2-640c-4f21-a236-fcb2b92748ab" />
78
+ #### 2. Recording Human Actions with `record_workflow`
66
79
 
67
- MCP is useful to test out the `terminator` lib and see what you can do. You can use any model.
80
+ For simpler tasks, you can record your own actions to generate a baseline workflow.
68
81
 
69
- <br>
82
+ 1. **Start Recording**: Call `record_workflow` with `action: "start"`.
83
+ 2. **Perform the Task**: Manually perform the clicks, typing, and other interactions in the target application.
84
+ 3. **Stop and Save**: Call `record_workflow` with `action: "stop"`. This returns a complete workflow JSON file containing all your recorded actions.
85
+ 4. **Refine and Parse**: The recorded workflow is a great starting point. You can then refine the selectors for robustness, add a final step to capture the UI tree, and attach an `output_parser` to extract structured data, just as you would in the iterative workflow.
70
86
 
71
- ## Development
87
+ ## Local Development
72
88
 
73
- If you want to build and test the agent locally, clone the repo and run:
89
+ To build and test the agent from the source code:
74
90
 
75
91
  ```sh
92
+ # 1. Clone the entire Terminator repository
76
93
  git clone https://github.com/mediar-ai/terminator
94
+
95
+ # 2. Navigate to the agent's directory
77
96
  cd terminator/terminator-mcp-agent
97
+
98
+ # 3. Install Node.js dependencies
78
99
  npm install
100
+
101
+ # 4. Build the Rust binary and Node.js wrapper
79
102
  npm run build
103
+
104
+ # 5. To use your local build in your MCP client, link it globally
80
105
  npm install --global .
81
106
  ```
82
107
 
83
- You can then use the CLI as above.
108
+ Now, when your MCP client runs `terminator-mcp-agent`, it will use your local build instead of the published `npm` version.
84
109
 
85
110
  ---
86
111
 
@@ -88,6 +113,5 @@ You can then use the CLI as above.
88
113
 
89
114
  - Make sure you have Node.js installed (v16+ recommended).
90
115
  - For VS Code/Insiders, ensure the CLI (`code` or `code-insiders`) is available in your PATH.
91
- - If you encounter issues, try running with elevated permissions or check the config file paths above.
116
+ - If you encounter issues, try running with elevated permissions.
92
117
 
93
- ---
package/package.json CHANGED
@@ -12,10 +12,10 @@
12
12
  ],
13
13
  "name": "terminator-mcp-agent",
14
14
  "optionalDependencies": {
15
- "terminator-mcp-darwin-arm64": "0.6.14",
16
- "terminator-mcp-darwin-x64": "0.6.14",
17
- "terminator-mcp-linux-x64-gnu": "0.6.14",
18
- "terminator-mcp-win32-x64-msvc": "0.6.14"
15
+ "terminator-mcp-darwin-arm64": "0.6.16",
16
+ "terminator-mcp-darwin-x64": "0.6.16",
17
+ "terminator-mcp-linux-x64-gnu": "0.6.16",
18
+ "terminator-mcp-win32-x64-msvc": "0.6.16"
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
@@ -27,5 +27,5 @@
27
27
  "sync-version": "node ./utils/sync-version.js",
28
28
  "update-badges": "node ./utils/update-badges.js"
29
29
  },
30
- "version": "0.6.14"
30
+ "version": "0.6.16"
31
31
  }