Skip to content

Commit cca5719

Browse files
committed
refactor(shared): remove zod dependency and clean up README files across packages
1 parent 4613d05 commit cca5719

File tree

15 files changed

+19
-206
lines changed

15 files changed

+19
-206
lines changed

packages/android-mcp/README.md

Lines changed: 2 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,3 @@
1-
# @midscene/android-mcp
1+
# Midscene MCP
22

3-
Midscene MCP Server for Android automation.
4-
5-
## Installation
6-
7-
```bash
8-
npm install @midscene/android-mcp
9-
```
10-
11-
## Prerequisites
12-
13-
- Android Debug Bridge (ADB) installed and available in PATH
14-
- At least one Android device connected via USB or emulator running
15-
16-
## Usage
17-
18-
### CLI Mode
19-
20-
```bash
21-
npx @midscene/android-mcp
22-
```
23-
24-
### Programmatic API
25-
26-
```typescript
27-
import { AndroidMCPServer } from '@midscene/android-mcp';
28-
29-
const server = new AndroidMCPServer();
30-
await server.launch();
31-
```
32-
33-
## Available Tools
34-
35-
### Action Space Tools
36-
37-
Dynamically generated from AndroidAgent's action space:
38-
39-
- `launch` - Launch an Android app or URL
40-
- `tap` - Tap on UI elements
41-
- `input` - Input text into fields
42-
- `swipe` - Swipe gestures
43-
- `back` - Android back button
44-
- `home` - Android home button
45-
- `recentApps` - Recent apps button
46-
- `runAdbShell` - Execute ADB shell commands
47-
48-
### Common Tools
49-
50-
- `take_screenshot` - Capture screenshot of current screen
51-
- `wait_for` - Wait until condition becomes true
52-
- `assert` - Assert condition is true
53-
54-
### Platform-Specific Tools
55-
56-
- `android_connect` - Connect to a specific Android device by device ID
57-
- `android_list_devices` - List all connected Android devices
58-
59-
## Configuration
60-
61-
Set environment variables in `.env`:
62-
63-
```bash
64-
OPENAI_API_KEY=your_api_key
65-
MIDSCENE_MODEL_NAME=qwen3-vl-plus
66-
```
67-
68-
## License
69-
70-
MIT
3+
docs: https://midscenejs.com/mcp.html

packages/android-mcp/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
"@types/node": "^18.0.0",
3535
"dotenv": "^16.4.5",
3636
"typescript": "^5.8.3",
37-
"vitest": "3.0.5",
38-
"zod": "3.24.3"
37+
"vitest": "3.0.5"
3938
},
4039
"dependencies": {
4140
"@silvia-odwyer/photon": "0.3.3",

packages/android-mcp/rslib.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import path from 'node:path';
21
import { defineConfig } from '@rslib/core';
32
import { version } from './package.json';
43

packages/android-mcp/src/android-tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { type AndroidAgent, agentFromAdbDevice } from '@midscene/android';
2+
import { z } from '@midscene/core';
23
import { parseBase64 } from '@midscene/shared/img';
34
import { getDebug } from '@midscene/shared/logger';
45
import { BaseMidsceneTools, type ToolDefinition } from '@midscene/shared/mcp';
5-
import { z } from 'zod';
66

77
const debug = getDebug('mcp:android-tools');
88

packages/core/src/ai-model/inspect.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,7 @@ export async function AiLocateElement(options: {
140140
const targetElementDescriptionText = extraTextFromUserPrompt(
141141
targetElementDescription,
142142
);
143-
const userInstructionPrompt = findElementPrompt(
144-
targetElementDescriptionText,
145-
);
143+
const userInstructionPrompt = findElementPrompt(targetElementDescriptionText);
146144
const systemPrompt = systemPromptToLocateElement(vlMode);
147145

148146
let imagePayload = screenshotBase64;

packages/ios-mcp/README.md

Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,3 @@
11
# @midscene/ios-mcp
22

3-
Midscene MCP Server for iOS automation.
4-
5-
## Installation
6-
7-
```bash
8-
npm install @midscene/ios-mcp
9-
```
10-
11-
## Prerequisites
12-
13-
- macOS with Xcode installed
14-
- iOS Simulator or physical iOS device
15-
- WebDriverAgent set up (automatically detected)
16-
17-
## Usage
18-
19-
### CLI Mode
20-
21-
```bash
22-
npx @midscene/ios-mcp
23-
```
24-
25-
### Programmatic API
26-
27-
```typescript
28-
import { IOSMCPServer } from '@midscene/ios-mcp';
29-
30-
const server = new IOSMCPServer();
31-
await server.launch();
32-
```
33-
34-
## Available Tools
35-
36-
### Action Space Tools
37-
38-
Dynamically generated from IOSAgent's action space:
39-
40-
- `launch` - Launch an iOS app or URL
41-
- `tap` - Tap on UI elements
42-
- `input` - Input text into fields
43-
- `swipe` - Swipe gestures
44-
- `home` - iOS home button
45-
- `appSwitcher` - iOS app switcher
46-
- `runWdaRequest` - Execute WebDriverAgent API requests
47-
48-
### Common Tools
49-
50-
- `take_screenshot` - Capture screenshot of current screen
51-
- `wait_for` - Wait until condition becomes true
52-
- `assert` - Assert condition is true
53-
54-
### Platform-Specific Tools
55-
56-
- `ios_check_environment` - Check iOS environment availability (Xcode, simulators, WebDriverAgent)
57-
58-
## Configuration
59-
60-
Set environment variables in `.env`:
61-
62-
```bash
63-
OPENAI_API_KEY=your_api_key
64-
MIDSCENE_MODEL_NAME=qwen3-vl-plus
65-
```
66-
67-
## License
68-
69-
MIT
3+
docs: https://midscenejs.com/mcp.html

packages/ios-mcp/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
"@types/node": "^18.0.0",
3535
"dotenv": "^16.4.5",
3636
"typescript": "^5.8.3",
37-
"vitest": "3.0.5",
38-
"zod": "3.24.3"
37+
"vitest": "3.0.5"
3938
},
4039
"dependencies": {
4140
"@silvia-odwyer/photon": "0.3.3",

packages/ios-mcp/src/ios-tools.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { type IOSAgent, agentFromWebDriverAgent } from '@midscene/ios';
22
import { parseBase64 } from '@midscene/shared/img';
33
import { getDebug } from '@midscene/shared/logger';
44
import { BaseMidsceneTools, type ToolDefinition } from '@midscene/shared/mcp';
5-
import { z } from 'zod';
65

76
const debug = getDebug('mcp:ios-tools');
87

packages/mcp/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
"dotenv": "^16.4.5",
3737
"puppeteer-core": "24.2.0",
3838
"typescript": "^5.8.3",
39-
"vitest": "3.0.5",
40-
"zod": "3.24.3"
39+
"vitest": "3.0.5"
4140
},
4241
"dependencies": {
4342
"@silvia-odwyer/photon": "0.3.3",

packages/mcp/src/web-tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import { z } from '@midscene/core';
12
import {
23
MIDSCENE_MCP_USE_PUPPETEER_MODE,
34
globalConfigManager,
45
} from '@midscene/shared/env';
56
import { BaseMidsceneTools, type ToolDefinition } from '@midscene/shared/mcp';
67
import { AgentOverChromeBridge } from '@midscene/web/bridge-mode';
7-
import { z } from 'zod';
88
import { type PuppeteerBrowserAgent, ensureBrowser } from './puppeteer';
99

1010
export class WebMidsceneTools extends BaseMidsceneTools {

0 commit comments

Comments
 (0)