polarisagi-computer-mcp 0.1.0 → 1.0.26

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 (3) hide show
  1. package/README.md +33 -0
  2. package/dist/index.js +2 -3
  3. package/package.json +26 -3
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # PolarisAGI Computer Use MCP
2
+
3
+ [![npm version](https://img.shields.io/npm/v/polarisagi-computer-mcp.svg)](https://www.npmjs.com/package/polarisagi-computer-mcp)
4
+
5
+ An official Model Context Protocol (MCP) server plugin for [PolarisAGI](https://polarisagi.online/), providing cross-platform computer automation capabilities.
6
+
7
+ ## Features
8
+
9
+ - **Screenshot**: Capture the current screen.
10
+ - **Mouse Control**: Move, left click, right click, double click, drag.
11
+ - **Keyboard Control**: Type text and press specific keys.
12
+
13
+ ## Architecture
14
+
15
+ This plugin is written in pure TypeScript and natively invokes OS-level APIs via `@nut-tree-fork/nut-js`. It requires zero manual binary installations and supports Windows, macOS (Intel/Apple Silicon), and Linux.
16
+
17
+ ## Usage with PolarisAGI
18
+
19
+ Configure your AI agent with the following MCP server setting:
20
+
21
+ ```json
22
+ {
23
+ "mcpServers": {
24
+ "polarisagi-computer-use": {
25
+ "command": "npx",
26
+ "args": ["-y", "polarisagi-computer-mcp@latest"]
27
+ }
28
+ }
29
+ }
30
+ ```
31
+
32
+ ## Requirements
33
+ - Node.js v18 or newer.
package/dist/index.js CHANGED
@@ -125,7 +125,7 @@ rl.on('line', async (line) => {
125
125
  protocolVersion: "2024-11-05",
126
126
  capabilities: { tools: {}, prompts: {} },
127
127
  serverInfo: {
128
- name: "polaris-computer-mcp",
128
+ name: "polarisagi-computer-mcp",
129
129
  version: "0.1.0"
130
130
  }
131
131
  });
@@ -245,8 +245,7 @@ async function handleComputerUse(args) {
245
245
  return [{ type: "text", text: "success" }];
246
246
  case "double_click":
247
247
  await nut_js_1.mouse.setPosition(new nut_js_1.Point(x, y));
248
- await nut_js_1.mouse.leftClick();
249
- await nut_js_1.mouse.leftClick();
248
+ await nut_js_1.mouse.doubleClick(nut_js_1.Button.LEFT);
250
249
  return [{ type: "text", text: "success" }];
251
250
  case "left_click_drag":
252
251
  await nut_js_1.mouse.pressButton(nut_js_1.Button.LEFT);
package/package.json CHANGED
@@ -1,7 +1,31 @@
1
1
  {
2
2
  "name": "polarisagi-computer-mcp",
3
- "version": "0.1.0",
4
- "description": "TypeScript MCP server for computer automation",
3
+ "version": "1.0.26",
4
+ "description": "TypeScript MCP server for computer automation: screenshot, mouse, keyboard",
5
+ "license": "MIT",
6
+ "author": {
7
+ "name": "mrlaoliai",
8
+ "email": "polarisagi.online@gmail.com",
9
+ "url": "https://polarisagi.online/"
10
+ },
11
+ "homepage": "https://polarisagi.online/",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/polarisagi/polarisagi-plugins-official.git",
15
+ "directory": "plugins/computer_use"
16
+ },
17
+ "keywords": [
18
+ "mcp",
19
+ "computer-use",
20
+ "automation",
21
+ "screenshot",
22
+ "mouse",
23
+ "keyboard",
24
+ "nut-js"
25
+ ],
26
+ "engines": {
27
+ "node": ">=18"
28
+ },
5
29
  "files": [
6
30
  "dist"
7
31
  ],
@@ -14,7 +38,6 @@
14
38
  "start": "node dist/index.js"
15
39
  },
16
40
  "dependencies": {
17
- "@modelcontextprotocol/sdk": "^1.0.0",
18
41
  "@nut-tree-fork/nut-js": "^4.2.6"
19
42
  },
20
43
  "devDependencies": {