Skip to content

fix(computer-server): MCP handler consistency and uiautomator fix - #881

Merged
f-trycua merged 2 commits into
mainfrom
fix/mcp-handler-consistency
Jan 21, 2026
Merged

fix(computer-server): MCP handler consistency and uiautomator fix#881
f-trycua merged 2 commits into
mainfrom
fix/mcp-handler-consistency

Conversation

@f-trycua

Copy link
Copy Markdown
Collaborator

Summary

Two fixes that were pushed after PR #880 was merged:

  1. MCP server handler consistency - Use automation_handler.get_screen_size() and get_cursor_position() instead of hardcoded PIL.ImageGrab and pynput. This ensures MCP and HTTP API follow the same code path.

  2. uiautomator XML parsing fix - Strip the status message ("UI hierchary dumped to: ...") before parsing the XML output from uiautomator dump.

Test plan

  • Test MCP get_screen_size returns correct Android resolution (not VNC resolution)
  • Test MCP computer_click uses correct coordinates
  • Test get_accessibility_tree works on Android

- Use automation_handler.get_screen_size() instead of PIL.ImageGrab
- Use automation_handler.get_cursor_position() instead of pynput
- Ensures MCP and HTTP API follow the same code path
@vercel

vercel Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs Ready Ready Preview, Comment Jan 21, 2026 8:22am

Request Review

@sentry

sentry Bot commented Jan 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@f-trycua
f-trycua merged commit 09e18ec into main Jan 21, 2026
19 of 20 checks passed
rowingchenn pushed a commit to cua-verse/cua that referenced this pull request Jan 23, 2026
…ycua#881)

* fix(computer-server): strip uiautomator status message before parsing XML

* fix(mcp-server): use handlers instead of hardcoded desktop libraries

- Use automation_handler.get_screen_size() instead of PIL.ImageGrab
- Use automation_handler.get_cursor_position() instead of pynput
- Ensures MCP and HTTP API follow the same code path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant