@minicor/mcp-server 2.0.2 → 2.0.4
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 +102 -124
- package/dist/__tests__/helpers.test.js +3 -3
- package/dist/config.d.ts +3 -13
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +4 -30
- package/dist/config.js.map +1 -1
- package/dist/helpers.d.ts +2 -5
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +7 -35
- package/dist/helpers.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -36
- package/dist/index.js.map +1 -1
- package/dist/inspect-scripts.d.ts +1 -1
- package/dist/inspect-scripts.js +1 -1
- package/dist/lds-client.d.ts +1 -1
- package/dist/lds-client.js +2 -2
- package/dist/prompts/build-nerve-rpa.d.ts +3 -0
- package/dist/prompts/build-nerve-rpa.d.ts.map +1 -0
- package/dist/prompts/build-nerve-rpa.js +148 -0
- package/dist/prompts/build-nerve-rpa.js.map +1 -0
- package/dist/prompts/build-rpa.d.ts.map +1 -1
- package/dist/prompts/build-rpa.js +153 -22
- package/dist/prompts/build-rpa.js.map +1 -1
- package/dist/prompts/debug-execution.d.ts.map +1 -1
- package/dist/prompts/debug-execution.js +22 -1
- package/dist/prompts/debug-execution.js.map +1 -1
- package/dist/prompts/workflow-guide.d.ts.map +1 -1
- package/dist/prompts/workflow-guide.js +3 -14
- package/dist/prompts/workflow-guide.js.map +1 -1
- package/dist/setup.js +19 -83
- package/dist/setup.js.map +1 -1
- package/dist/state.d.ts +0 -9
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +0 -9
- package/dist/state.js.map +1 -1
- package/dist/tools/core.d.ts.map +1 -1
- package/dist/tools/core.js +0 -7
- package/dist/tools/core.js.map +1 -1
- package/dist/tools/vm-rpa.d.ts.map +1 -1
- package/dist/tools/vm-rpa.js +72 -15
- package/dist/tools/vm-rpa.js.map +1 -1
- package/dist/tools/vm.d.ts.map +1 -1
- package/dist/tools/vm.js +19 -8
- package/dist/tools/vm.js.map +1 -1
- package/dist/tools/workflow-ops.js +1 -1
- package/dist/types.d.ts +0 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
# Minicor MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Build, deploy, and debug VM-based browser and desktop automations from **Cursor** or **Claude Code**. The AI agent connects to your Windows VM, writes Python automation scripts, tests them live, and saves them as Minicor workflows.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Quick Start
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Cursor
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
npm install -g @minicor/mcp-server
|
|
11
|
-
minicor-mcp-setup
|
|
12
|
-
claude mcp add minicor -- minicor-mcp
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Add to Cursor
|
|
16
|
-
|
|
17
|
-
Run the setup, then add to your Cursor MCP config (`~/.cursor/mcp.json`):
|
|
9
|
+
Run the setup wizard, then add to your Cursor MCP config (`~/.cursor/mcp.json`):
|
|
18
10
|
|
|
19
11
|
```json
|
|
20
12
|
{
|
|
@@ -27,119 +19,126 @@ Run the setup, then add to your Cursor MCP config (`~/.cursor/mcp.json`):
|
|
|
27
19
|
}
|
|
28
20
|
```
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
If you run `minicor-mcp-setup`, it writes this config automatically.
|
|
31
23
|
|
|
32
|
-
|
|
24
|
+
### Claude Code
|
|
33
25
|
|
|
34
26
|
```bash
|
|
35
27
|
npm install -g @minicor/mcp-server
|
|
36
28
|
minicor-mcp-setup
|
|
29
|
+
claude mcp add minicor -- minicor-mcp
|
|
37
30
|
```
|
|
38
31
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
For headless environments:
|
|
32
|
+
### Authenticate
|
|
42
33
|
|
|
43
34
|
```bash
|
|
44
|
-
minicor
|
|
35
|
+
npx @minicor/mcp-server-setup
|
|
45
36
|
```
|
|
46
37
|
|
|
47
|
-
|
|
38
|
+
Opens a browser to sign in or create an account. Tokens are stored at `~/.minicor/tokens.json` and auto-refresh. For headless environments: `npx @minicor/mcp-server-setup --cli`.
|
|
48
39
|
|
|
49
|
-
|
|
40
|
+
### Update
|
|
50
41
|
|
|
51
|
-
|
|
52
|
-
- **Workflows** -- create, update, clone, delete, restore workflows
|
|
53
|
-
- **Flows (Steps)** -- read/write individual steps, view version history, bulk update
|
|
54
|
-
- **Executions** -- list, search, filter by date/status, inspect full payloads, view per-step results
|
|
55
|
-
- **Execute** -- trigger workflows synchronously or async, poll for status
|
|
56
|
-
- **Configuration Stores** -- manage key-value configs used by `{{config.xxx}}` references
|
|
57
|
-
- **Issues** -- create and manage workspace issues
|
|
58
|
-
- **Desktop RPA** -- connect to a VM, take screenshots, inspect UI, run scripts, build RPA workflows iteratively
|
|
59
|
-
- **Browser RPA** -- session-based browser automation with natural-language actions
|
|
60
|
-
- **RPA Debugging** -- before/after screenshots, batch testing, state reset, execution diagnosis
|
|
61
|
-
- **Log Search** _(advanced)_ -- full-text Elasticsearch search across execution logs
|
|
62
|
-
- **Incident Investigation** -- correlate failures across workflows with timeline analysis
|
|
63
|
-
- **CRON Management** _(advanced)_ -- scheduled job management
|
|
64
|
-
- **Workflow File Sync** -- pull/push workflows to local files for git version control
|
|
42
|
+
`npx` users: just restart your editor (fetches latest automatically). Global install: `npm update -g @minicor/mcp-server`.
|
|
65
43
|
|
|
66
|
-
##
|
|
44
|
+
## How It Works
|
|
67
45
|
|
|
68
|
-
Connect to a VM running the Laminar Desktop Service (LDS)
|
|
46
|
+
1. **Connect to a VM** — The agent connects to your Windows VM running the Laminar Desktop Service (LDS) via a Cloudflare tunnel
|
|
47
|
+
2. **Build automations** — The agent takes screenshots, inspects UI elements, writes Python scripts, and tests them on the VM in real time
|
|
48
|
+
3. **Deploy as workflows** — Validated scripts are saved as step-based Minicor workflows with credentials stored in config stores
|
|
49
|
+
4. **Debug failures** — Before/after screenshots, video recordings of each step, execution diagnosis, and replay on live VMs
|
|
69
50
|
|
|
70
|
-
|
|
51
|
+
## What You Can Automate
|
|
71
52
|
|
|
72
|
-
|
|
53
|
+
- **Web portals** — Chrome on the VM controlled via CDP (Chrome DevTools Protocol). Works on React/Angular SPAs, anti-bot protected sites, payor portals, EHR web apps.
|
|
54
|
+
- **Desktop applications** — Native Windows apps driven via uiautomation, pywinauto, or pyautogui. EMR clients, billing software, legacy systems.
|
|
55
|
+
- **APIs** — Direct HTTP calls when the agent discovers usable REST endpoints behind a web portal.
|
|
56
|
+
- **Hybrid workflows** — Mix browser, desktop, and API steps in a single workflow.
|
|
73
57
|
|
|
74
|
-
|
|
75
|
-
2. Start it on port 1016
|
|
76
|
-
3. Expose via Cloudflare Tunnel: `cloudflared tunnel --url http://localhost:1016`
|
|
77
|
-
4. In Cursor: `vm_connect` with the tunnel URL
|
|
78
|
-
|
|
79
|
-
### RPA Tools
|
|
80
|
-
|
|
81
|
-
| Tool | Description |
|
|
82
|
-
|---|---|
|
|
83
|
-
| `vm_connect` | Connect to LDS via Cloudflare Tunnel URL |
|
|
84
|
-
| `vm_screenshot` | Capture VM desktop screenshot |
|
|
85
|
-
| `vm_inspect_ui` | Inspect UI elements (accessibility tree, element at point, etc.) |
|
|
86
|
-
| `vm_execute_script` | Run Python script on the VM |
|
|
87
|
-
| `create_rpa_flow` | Save validated Python script as an RPA step (auto-wraps in correct format) |
|
|
88
|
-
| `vm_read_clipboard` | Read clipboard text after copy operations |
|
|
89
|
-
| `vm_screenshot_region` | Crop and zoom a specific screen region |
|
|
90
|
-
| `debug_rpa_step` | Run script with before/after screenshots |
|
|
91
|
-
| `vm_reset_state` | Smart Launch -- reset app to known state |
|
|
92
|
-
| `batch_test_rpa` | Run workflow with multiple test inputs |
|
|
93
|
-
| `get_lds_setup_guide` | Full LDS installation walkthrough |
|
|
94
|
-
|
|
95
|
-
## Browser RPA
|
|
96
|
-
|
|
97
|
-
Session-based browser automation for web applications.
|
|
98
|
-
|
|
99
|
-
| Tool | Description |
|
|
100
|
-
|---|---|
|
|
101
|
-
| `browser_connect` | Connect to browser RPA service |
|
|
102
|
-
| `browser_create_session` | Start a new browser session |
|
|
103
|
-
| `browser_act` | Natural-language browser actions |
|
|
104
|
-
| `browser_extract` | Extract data from the current page |
|
|
105
|
-
| `browser_screenshot` | Screenshot the browser |
|
|
106
|
-
| `browser_close_session` | Clean up session |
|
|
107
|
-
| `create_browser_rpa_flow` | Save browser action as a workflow step |
|
|
108
|
-
|
|
109
|
-
## Workflow Tools
|
|
110
|
-
|
|
111
|
-
| Tool | Description |
|
|
112
|
-
|---|---|
|
|
113
|
-
| `preview_flow_changes` | Diff current vs proposed code before pushing |
|
|
114
|
-
| `get_workflow_overview` | Full workflow snapshot with code + executions |
|
|
115
|
-
| `test_workflow_step` | Run up to / from / only a specific step |
|
|
116
|
-
| `diagnose_execution` | Find failures with RPA-specific error analysis |
|
|
117
|
-
| `compare_flow_versions` | Diff between two step versions |
|
|
118
|
-
|
|
119
|
-
## Advanced Setup
|
|
120
|
-
|
|
121
|
-
Elasticsearch (log search) and CRON (scheduling) are configured during `minicor-mcp-setup` under Advanced Settings, or via `~/.minicor/config.json`:
|
|
58
|
+
## VM Setup
|
|
122
59
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
60
|
+
1. Install LDS on a Windows 10/11 or Server VM with Python 3.11+
|
|
61
|
+
2. Start LDS on port 1016
|
|
62
|
+
3. Expose via Cloudflare Tunnel: `cloudflared tunnel --url http://localhost:1016`
|
|
63
|
+
4. For browser automation: start Chrome with `--remote-debugging-port=9222`
|
|
64
|
+
5. In your editor, tell the agent: "Connect to my VM at https://your-tunnel-url.com"
|
|
65
|
+
|
|
66
|
+
Use the `get_lds_setup_guide` tool for detailed step-by-step instructions.
|
|
67
|
+
|
|
68
|
+
## Tools
|
|
69
|
+
|
|
70
|
+
### VM Tools
|
|
71
|
+
|
|
72
|
+
| Tool | What it does |
|
|
73
|
+
| ---------------------- | ------------------------------------------------------------------------------------------ |
|
|
74
|
+
| `vm_connect` | Connect to VM via LDS Cloudflare tunnel URL |
|
|
75
|
+
| `vm_disconnect` | Disconnect from VM |
|
|
76
|
+
| `vm_status` | Health check for the connected VM |
|
|
77
|
+
| `vm_screenshot` | Full-screen capture of the VM desktop |
|
|
78
|
+
| `vm_screenshot_region` | Zoom into a specific screen area |
|
|
79
|
+
| `vm_execute_script` | Run a Python script on the VM |
|
|
80
|
+
| `vm_execution_status` | Check status of a running script |
|
|
81
|
+
| `vm_execution_control` | Pause, resume, stop, or skip a running script |
|
|
82
|
+
| `vm_inspect_ui` | Inspect Windows UI elements (window list, element tree, element at point, focused element) |
|
|
83
|
+
| `vm_read_clipboard` | Read VM clipboard contents |
|
|
84
|
+
|
|
85
|
+
### Automation Building
|
|
86
|
+
|
|
87
|
+
| Tool | What it does |
|
|
88
|
+
| ----------------------- | --------------------------------------------------------- |
|
|
89
|
+
| `create_rpa_flow` | Save a validated Python script as a Minicor workflow step |
|
|
90
|
+
| `debug_rpa_step` | Test a script with before/after screenshots |
|
|
91
|
+
| `vm_reset_state` | Manage windows: focus app, minimize all, close dialogs |
|
|
92
|
+
| `batch_test_rpa` | Run a workflow with multiple test inputs |
|
|
93
|
+
| `replay_execution_step` | Re-run a step from a failed execution on the VM |
|
|
94
|
+
| `get_lds_setup_guide` | LDS installation walkthrough |
|
|
95
|
+
|
|
96
|
+
### Workflows and Executions
|
|
97
|
+
|
|
98
|
+
| Tool | What it does |
|
|
99
|
+
| ---------------------------------------------------------- | --------------------------------------------------- |
|
|
100
|
+
| `create_workflow` / `update_workflow` / `delete_workflow` | Workflow CRUD |
|
|
101
|
+
| `create_flow` / `update_flow` / `delete_flow` | Step CRUD |
|
|
102
|
+
| `execute_workflow` / `execute_workflow_async` | Run workflows synchronously or async |
|
|
103
|
+
| `list_executions` / `get_execution` / `get_full_execution` | View execution history and details |
|
|
104
|
+
| `diagnose_execution` | Analyze failures with RPA-specific pattern matching |
|
|
105
|
+
| `get_workflow_overview` | Full snapshot: steps, code, recent executions |
|
|
106
|
+
| `test_workflow_step` | Run a single step in isolation |
|
|
107
|
+
| `preview_flow_changes` / `compare_flow_versions` | Diff code before deploying |
|
|
108
|
+
|
|
109
|
+
### Config Stores
|
|
110
|
+
|
|
111
|
+
| Tool | What it does |
|
|
112
|
+
| --------------------------------------------------- | --------------------------------------------------- |
|
|
113
|
+
| `create_config_store` | Create a credential store with key-value properties |
|
|
114
|
+
| `list_config_stores` / `get_config_store` | Browse stores |
|
|
115
|
+
| `update_config_property` / `remove_config_property` | Manage individual properties |
|
|
116
|
+
|
|
117
|
+
Scripts reference credentials as `{{config.propertyKey}}` — resolved at runtime by the workflow engine.
|
|
118
|
+
|
|
119
|
+
### Workflow Sync
|
|
120
|
+
|
|
121
|
+
| Tool | What it does |
|
|
122
|
+
| --------------------------------- | --------------------------------------------- |
|
|
123
|
+
| `init_project` | Scaffold a git-ready project from a workspace |
|
|
124
|
+
| `pull_workflow` / `push_workflow` | Sync individual workflows |
|
|
125
|
+
| `pull_all` / `push_changed` | Bulk sync |
|
|
126
|
+
| `sync_status` | Diff local vs deployed |
|
|
127
|
+
|
|
128
|
+
## Prompts
|
|
129
|
+
|
|
130
|
+
| Prompt | What it does |
|
|
131
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
132
|
+
| `build-rpa-workflow` | Guided automation building: strategy selection, iterative build loop, Minicor testing, deployment |
|
|
133
|
+
| `debug-workflow-execution` | Analyze a failed execution with VM-aware debugging and replay |
|
|
134
|
+
| `minicor-workflow-guide` | Full workflow specification: step types, data access, keywords, libraries |
|
|
134
135
|
|
|
135
136
|
## Auth
|
|
136
137
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
- **
|
|
140
|
-
- **
|
|
141
|
-
- **Auto-refresh**: tokens refresh automatically before expiry
|
|
142
|
-
- **Region**: US (default) or Canada, selected during setup
|
|
138
|
+
- **Sign in**: `minicor-mcp-setup` (browser) or `minicor-mcp-setup --cli`
|
|
139
|
+
- **Token storage**: `~/.minicor/tokens.json`
|
|
140
|
+
- **Auto-refresh**: tokens refresh before expiry
|
|
141
|
+
- **Regions**: US (default) or Canada
|
|
143
142
|
|
|
144
143
|
## Development
|
|
145
144
|
|
|
@@ -147,25 +146,4 @@ Authentication uses stored session tokens only. No API keys.
|
|
|
147
146
|
npm install
|
|
148
147
|
npm run build
|
|
149
148
|
npm test
|
|
150
|
-
npm run dev # watch mode
|
|
151
|
-
npm run test:watch # test watch mode
|
|
152
149
|
```
|
|
153
|
-
|
|
154
|
-
### Project Structure
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
src/
|
|
158
|
-
index.ts -- server orchestrator (auth, init, registration)
|
|
159
|
-
helpers.ts -- shared response helpers (ok, text, safe, buildRpaProgram)
|
|
160
|
-
state.ts -- session state (VM + browser connections)
|
|
161
|
-
paths.ts -- token/config path resolution with ~/.minicor/ + ~/.laminar/ fallback
|
|
162
|
-
types.ts -- shared ToolDeps interface
|
|
163
|
-
setup.ts -- interactive setup (browser + CLI modes)
|
|
164
|
-
tools/ -- tool modules (each exports register())
|
|
165
|
-
prompts/ -- prompt modules (each exports register())
|
|
166
|
-
__tests__/ -- vitest unit tests
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## License
|
|
170
|
-
|
|
171
|
-
MIT
|
|
@@ -40,9 +40,9 @@ describe("buildRpaProgram", () => {
|
|
|
40
40
|
it("generates cloudflare_tunnel pattern with lam.httpRequest", () => {
|
|
41
41
|
const program = buildRpaProgram('print("hello")', "cloudflare_tunnel", "test-step", "Test Step", "A test step");
|
|
42
42
|
expect(program).toContain("lam.httpRequest");
|
|
43
|
-
expect(program).toContain("{{config.
|
|
44
|
-
expect(program).toContain("{{config.
|
|
45
|
-
expect(program).toContain("{{config.
|
|
43
|
+
expect(program).toContain("{{config.minicor_desktop_service_url}}/execute");
|
|
44
|
+
expect(program).toContain("{{config.minicor_desktop_service_api_key}}");
|
|
45
|
+
expect(program).toContain("{{config.minicor_desktop_service_id}}");
|
|
46
46
|
expect(program).toContain('"flowId": "test-step"');
|
|
47
47
|
expect(program).toContain('print("hello")');
|
|
48
48
|
expect(program).toMatch(/^\(data\) =>/);
|
package/dist/config.d.ts
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Configuration helpers for Minicor MCP.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Previously housed Elasticsearch + CRON service config.
|
|
5
|
+
* Kept for future extensibility; config file paths still used by setup.
|
|
5
6
|
*/
|
|
6
|
-
export interface ElasticsearchConfig {
|
|
7
|
-
endpoint: string;
|
|
8
|
-
apiKey: string;
|
|
9
|
-
indexName?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface CronConfig {
|
|
12
|
-
apiBase?: string;
|
|
13
|
-
apiKey: string;
|
|
14
|
-
}
|
|
15
7
|
export interface ServiceConfig {
|
|
16
|
-
elasticsearch?: ElasticsearchConfig;
|
|
17
|
-
cron?: CronConfig;
|
|
18
8
|
}
|
|
19
9
|
export declare function loadServiceConfig(): ServiceConfig;
|
|
20
10
|
export declare function saveServiceConfig(update: ServiceConfig): void;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,WAAW,aAAa;CAAG;AAEjC,wBAAgB,iBAAiB,IAAI,aAAa,CAEjD;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,QAiBtD"}
|
package/dist/config.js
CHANGED
|
@@ -1,40 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Configuration helpers for Minicor MCP.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Previously housed Elasticsearch + CRON service config.
|
|
5
|
+
* Kept for future extensibility; config file paths still used by setup.
|
|
5
6
|
*/
|
|
6
7
|
import fs from "node:fs";
|
|
7
8
|
import path from "node:path";
|
|
8
9
|
import { getConfigPath, getWriteConfigPath } from "./paths.js";
|
|
9
10
|
export function loadServiceConfig() {
|
|
10
|
-
|
|
11
|
-
if (process.env.ELASTICSEARCH_ENDPOINT && process.env.ELASTICSEARCH_API_KEY) {
|
|
12
|
-
config.elasticsearch = {
|
|
13
|
-
endpoint: process.env.ELASTICSEARCH_ENDPOINT,
|
|
14
|
-
apiKey: process.env.ELASTICSEARCH_API_KEY,
|
|
15
|
-
indexName: process.env.ELASTICSEARCH_INDEX_NAME,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
if (process.env.CRON_API_KEY) {
|
|
19
|
-
config.cron = {
|
|
20
|
-
apiBase: process.env.CRON_API_BASE,
|
|
21
|
-
apiKey: process.env.CRON_API_KEY,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
try {
|
|
25
|
-
const cfgPath = getConfigPath();
|
|
26
|
-
if (fs.existsSync(cfgPath)) {
|
|
27
|
-
const file = JSON.parse(fs.readFileSync(cfgPath, "utf-8"));
|
|
28
|
-
if (!config.elasticsearch && file.elasticsearch) {
|
|
29
|
-
config.elasticsearch = file.elasticsearch;
|
|
30
|
-
}
|
|
31
|
-
if (!config.cron && file.cron) {
|
|
32
|
-
config.cron = file.cron;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
catch { }
|
|
37
|
-
return config;
|
|
11
|
+
return {};
|
|
38
12
|
}
|
|
39
13
|
export function saveServiceConfig(update) {
|
|
40
14
|
const writePath = getWriteConfigPath();
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAI/D,MAAM,UAAU,iBAAiB;IAC/B,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAqB;IACrD,MAAM,SAAS,GAAG,kBAAkB,EAAE,CAAC;IACvC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEhE,IAAI,QAAQ,GAAkB,EAAE,CAAC;IACjC,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,aAAa,EAAE,CAAC;QACjC,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC5B,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IAEV,MAAM,MAAM,GAAG,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC;IAC1C,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE;QAClE,IAAI,EAAE,KAAK;KACZ,CAAC,CAAC;AACL,CAAC"}
|
package/dist/helpers.d.ts
CHANGED
|
@@ -20,9 +20,6 @@ export declare function safe<T>(fn: () => Promise<T>): Promise<{
|
|
|
20
20
|
text: string;
|
|
21
21
|
}[];
|
|
22
22
|
}>;
|
|
23
|
-
export declare const
|
|
24
|
-
export declare
|
|
25
|
-
export declare const NOT_CONNECTED_VM = "No VM connected. Ask the user for their Cloudflare Tunnel URL for the Laminar Desktop Service, then call vm_connect.";
|
|
26
|
-
export declare const NOT_CONNECTED_BROWSER = "No browser RPA service connected. Call browser_connect with the service base URL and bearer token first.";
|
|
27
|
-
export declare function buildRpaProgram(pythonScript: string, pattern: "cloudflare_tunnel" | "channel", flowId: string, stepName: string, stepDescription: string): string;
|
|
23
|
+
export declare const NOT_CONNECTED_VM = "No VM connected. Ask the user for their Cloudflare Tunnel URL for the Minicor Desktop Service, then call vm_connect.";
|
|
24
|
+
export declare function buildRpaProgram(pythonScript: string, pattern: "cloudflare_tunnel" | "channel" | "browser", flowId: string, stepName: string, stepDescription: string): string;
|
|
28
25
|
//# sourceMappingURL=helpers.d.ts.map
|
package/dist/helpers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,wBAAgB,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAE1C;AAED,wBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO;;;;;EAE/B;AAED,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM;;;;;EAE/B;AAED,wBAAsB,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC;;;;;GAMjD;AAED,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,wBAAgB,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAE1C;AAED,wBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO;;;;;EAE/B;AAED,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM;;;;;EAE/B;AAED,wBAAsB,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC;;;;;GAMjD;AAED,eAAO,MAAM,gBAAgB,yHAAyH,CAAC;AAEvJ,wBAAgB,eAAe,CAC7B,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,mBAAmB,GAAG,SAAS,GAAG,SAAS,EACpD,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,MAAM,GACtB,MAAM,CAwCR"}
|
package/dist/helpers.js
CHANGED
|
@@ -18,38 +18,7 @@ export async function safe(fn) {
|
|
|
18
18
|
return text(`Error: ${e.message}`);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
export const
|
|
22
|
-
|
|
23
|
-
**Option 1 — Environment variables:**
|
|
24
|
-
ELASTICSEARCH_ENDPOINT=https://your-es-cluster
|
|
25
|
-
ELASTICSEARCH_API_KEY=your-api-key
|
|
26
|
-
ELASTICSEARCH_INDEX_NAME=search-workflow-executions (optional)
|
|
27
|
-
|
|
28
|
-
**Option 2 — Config file** (~/.laminar/config.json):
|
|
29
|
-
{
|
|
30
|
-
"elasticsearch": {
|
|
31
|
-
"endpoint": "https://your-es-cluster",
|
|
32
|
-
"apiKey": "your-api-key"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
**Option 3 — Run setup:** laminar-mcp-setup → Advanced Settings`;
|
|
37
|
-
export const NOT_CONFIGURED_CRON = `CRON service is not configured. Scheduling requires CRON credentials.
|
|
38
|
-
|
|
39
|
-
**Option 1 — Environment variables:**
|
|
40
|
-
CRON_API_KEY=your-cron-api-key
|
|
41
|
-
CRON_API_BASE=https://cron.laminar.run (optional)
|
|
42
|
-
|
|
43
|
-
**Option 2 — Config file** (~/.laminar/config.json):
|
|
44
|
-
{
|
|
45
|
-
"cron": {
|
|
46
|
-
"apiKey": "your-cron-api-key"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
**Option 3 — Run setup:** laminar-mcp-setup → Advanced Settings`;
|
|
51
|
-
export const NOT_CONNECTED_VM = `No VM connected. Ask the user for their Cloudflare Tunnel URL for the Laminar Desktop Service, then call vm_connect.`;
|
|
52
|
-
export const NOT_CONNECTED_BROWSER = `No browser RPA service connected. Call browser_connect with the service base URL and bearer token first.`;
|
|
21
|
+
export const NOT_CONNECTED_VM = `No VM connected. Ask the user for their Cloudflare Tunnel URL for the Minicor Desktop Service, then call vm_connect.`;
|
|
53
22
|
export function buildRpaProgram(pythonScript, pattern, flowId, stepName, stepDescription) {
|
|
54
23
|
const escaped = pythonScript.replace(/`/g, "\\`").replace(/\$/g, "\\$");
|
|
55
24
|
if (pattern === "channel") {
|
|
@@ -65,6 +34,9 @@ ${escaped}
|
|
|
65
34
|
};
|
|
66
35
|
}`;
|
|
67
36
|
}
|
|
37
|
+
// Browser scripts go to /execute/browser — MDS provides an isolated Chrome tab
|
|
38
|
+
// Desktop scripts go to /execute — no Chrome, just runs the script
|
|
39
|
+
const endpoint = pattern === "browser" ? "/execute/browser" : "/execute";
|
|
68
40
|
return `(data) => {
|
|
69
41
|
const pythonScript = \`
|
|
70
42
|
${escaped}
|
|
@@ -72,11 +44,11 @@ ${escaped}
|
|
|
72
44
|
return {
|
|
73
45
|
"lam.httpRequest": {
|
|
74
46
|
"method": "POST",
|
|
75
|
-
"url": "{{config.
|
|
47
|
+
"url": "{{config.minicor_desktop_service_url}}${endpoint}",
|
|
76
48
|
"headers": {
|
|
77
49
|
"Content-Type": "application/json",
|
|
78
|
-
"X-API-Key": "{{config.
|
|
79
|
-
"X-Service-ID": "{{config.
|
|
50
|
+
"X-API-Key": "{{config.minicor_desktop_service_api_key}}",
|
|
51
|
+
"X-Service-ID": "{{config.minicor_desktop_service_id}}"
|
|
80
52
|
},
|
|
81
53
|
"body": {
|
|
82
54
|
"flowId": "${flowId}",
|
package/dist/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,UAAU,IAAI,CAAC,IAAa;IAChC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,EAAE,CAAC,IAAa;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,GAAW;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;AAC7D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,IAAI,CAAI,EAAoB;IAChD,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACxB,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACrC,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,UAAU,IAAI,CAAC,IAAa;IAChC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,EAAE,CAAC,IAAa;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAC,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dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Minicor MCP Server
|
|
3
|
+
* Minicor MCP Server
|
|
4
4
|
*
|
|
5
5
|
* Brings your Minicor workspace into Cursor / Claude Code.
|
|
6
|
-
*
|
|
6
|
+
* Build, deploy, and debug VM-based automations from your IDE.
|
|
7
7
|
*/
|
|
8
8
|
export declare function getApiBase(): string;
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AA0DH,wBAAgB,UAAU,IAAI,MAAM,CAKnC"}
|
package/dist/index.js
CHANGED
|
@@ -1,33 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Minicor MCP Server
|
|
3
|
+
* Minicor MCP Server
|
|
4
4
|
*
|
|
5
5
|
* Brings your Minicor workspace into Cursor / Claude Code.
|
|
6
|
-
*
|
|
6
|
+
* Build, deploy, and debug VM-based automations from your IDE.
|
|
7
7
|
*/
|
|
8
8
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
9
9
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
10
10
|
import fs from "node:fs";
|
|
11
11
|
import path from "node:path";
|
|
12
|
-
import { loadServiceConfig } from "./config.js";
|
|
13
12
|
import { LaminarClient } from "./laminar-client.js";
|
|
14
13
|
import { getTokenPath, getWriteTokenPath, regionToApiBase, apiBaseToRegion, } from "./paths.js";
|
|
15
|
-
import { CronService, ElasticsearchService } from "./services.js";
|
|
16
14
|
import { register as registerCore } from "./tools/core.js";
|
|
17
15
|
import { register as registerWorkflowOps } from "./tools/workflow-ops.js";
|
|
18
16
|
import { register as registerConfigStores } from "./tools/config-stores.js";
|
|
19
|
-
import { register as registerIssues } from "./tools/issues.js";
|
|
20
|
-
import { register as registerStats } from "./tools/stats.js";
|
|
21
|
-
import { register as registerElasticsearch } from "./tools/elasticsearch.js";
|
|
22
|
-
import { register as registerCron } from "./tools/cron.js";
|
|
23
17
|
import { register as registerSyncTools } from "./tools/sync-tools.js";
|
|
24
18
|
import { register as registerVm } from "./tools/vm.js";
|
|
25
19
|
import { register as registerVmRpa } from "./tools/vm-rpa.js";
|
|
26
|
-
import { register as registerBrowser } from "./tools/browser.js";
|
|
27
20
|
import { register as registerWorkflowGuide } from "./prompts/workflow-guide.js";
|
|
28
21
|
import { register as registerDebugExecution } from "./prompts/debug-execution.js";
|
|
29
22
|
import { register as registerBuildRpa } from "./prompts/build-rpa.js";
|
|
30
|
-
import { register as registerBuildBrowserRpa } from "./prompts/build-browser-rpa.js";
|
|
31
23
|
// ─── Token management ────────────────────────────────────────
|
|
32
24
|
const REFRESH_BUFFER_MS = 5 * 60 * 1000;
|
|
33
25
|
function readStoredTokens() {
|
|
@@ -111,11 +103,9 @@ async function resolveAuth() {
|
|
|
111
103
|
}
|
|
112
104
|
// ─── Server state ────────────────────────────────────────────
|
|
113
105
|
let client;
|
|
114
|
-
let esService = null;
|
|
115
|
-
let cronService = null;
|
|
116
106
|
const server = new McpServer({
|
|
117
107
|
name: "minicor",
|
|
118
|
-
version: "
|
|
108
|
+
version: "3.0.0",
|
|
119
109
|
});
|
|
120
110
|
function scheduleTokenRefresh() {
|
|
121
111
|
const tokens = readStoredTokens();
|
|
@@ -155,24 +145,16 @@ function registerAll() {
|
|
|
155
145
|
server,
|
|
156
146
|
client: () => client,
|
|
157
147
|
getApiBase,
|
|
158
|
-
esService: () => esService,
|
|
159
|
-
cronService: () => cronService,
|
|
160
148
|
};
|
|
161
149
|
registerCore(deps);
|
|
162
150
|
registerWorkflowOps(deps);
|
|
163
151
|
registerConfigStores(deps);
|
|
164
|
-
registerIssues(deps);
|
|
165
|
-
registerStats(deps);
|
|
166
|
-
registerElasticsearch(deps);
|
|
167
|
-
registerCron(deps);
|
|
168
152
|
registerSyncTools(deps);
|
|
169
153
|
registerVm(deps);
|
|
170
154
|
registerVmRpa(deps);
|
|
171
|
-
registerBrowser(deps);
|
|
172
155
|
registerWorkflowGuide(deps);
|
|
173
156
|
registerDebugExecution(deps);
|
|
174
157
|
registerBuildRpa(deps);
|
|
175
|
-
registerBuildBrowserRpa(deps);
|
|
176
158
|
}
|
|
177
159
|
// ─── Main ────────────────────────────────────────────────────
|
|
178
160
|
async function main() {
|
|
@@ -184,21 +166,6 @@ async function main() {
|
|
|
184
166
|
else {
|
|
185
167
|
client = new LaminarClient(authResult.auth, authResult.baseUrl);
|
|
186
168
|
scheduleTokenRefresh();
|
|
187
|
-
const svcConfig = loadServiceConfig();
|
|
188
|
-
if (svcConfig.elasticsearch) {
|
|
189
|
-
esService = new ElasticsearchService(svcConfig.elasticsearch);
|
|
190
|
-
console.error("Elasticsearch: configured");
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
console.error("Elasticsearch: not configured (log search disabled)");
|
|
194
|
-
}
|
|
195
|
-
if (svcConfig.cron) {
|
|
196
|
-
cronService = new CronService(svcConfig.cron);
|
|
197
|
-
console.error("CRON service: configured");
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
console.error("CRON service: not configured (scheduling disabled)");
|
|
201
|
-
}
|
|
202
169
|
registerAll();
|
|
203
170
|
}
|
|
204
171
|
const transport = new StdioServerTransport();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2C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C;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CACX,UAAU;QACR,CAAC,CAAC,qCAAqC;QACvC,CAAC,CAAC,mFAAmF,CACxF,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Python script generators for VM UI inspection.
|
|
3
3
|
*
|
|
4
4
|
* Each function returns a Python script string that, when executed on the VM
|
|
5
|
-
* via
|
|
5
|
+
* via MDS /execute, prints structured JSON to stdout for the agent to parse.
|
|
6
6
|
*/
|
|
7
7
|
export type InspectMode = "window_list" | "screen_info" | "element_at_point" | "element_tree" | "focused_element";
|
|
8
8
|
export type InspectFramework = "auto" | "uiautomation" | "pywinauto" | "jab";
|
package/dist/inspect-scripts.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Python script generators for VM UI inspection.
|
|
3
3
|
*
|
|
4
4
|
* Each function returns a Python script string that, when executed on the VM
|
|
5
|
-
* via
|
|
5
|
+
* via MDS /execute, prints structured JSON to stdout for the agent to parse.
|
|
6
6
|
*/
|
|
7
7
|
export function generateInspectScript(params) {
|
|
8
8
|
const fw = params.framework ?? "auto";
|
package/dist/lds-client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Stateless HTTP client for the
|
|
2
|
+
* Stateless HTTP client for the Minicor Desktop Service (MDS).
|
|
3
3
|
*
|
|
4
4
|
* Every method receives the base URL (Cloudflare Tunnel) and optional auth
|
|
5
5
|
* credentials so the caller (tool handler) can pull them from session state.
|