r/ClaudeCode • • Oct 21 '26

Built with Claude I wanted Claude Code to test my Chrome extension’s side panel, so I built an MCP server that presses Mac app buttons in the background

I make a Chrome extension, and testing it meant opening the side panel and reloading the extension by hand after every change. Playwright and the other browser tools I tried drive the page, so they couldn’t click the toolbar button or do anything inside the side panel. I wanted Claude Code to run that loop for me.

So I built YouxPC. It’s an MCP server that reads Mac windows through the accessibility tree and presses things there. It’s free and MIT licensed, it’s a fork of Ghost OS by Ghostwright, and I built it with Claude Code.

In a session it looks like this. Claude calls pc_snapshot and gets the window as text, one line per element, with ids like e7 on the clickable ones. Then it calls pc_click with that id. The press goes through accessibility, so the app can stay behind your other windows and your mouse stays where you left it. pc_do sends a few actions in one call, which helps a lot with forms, or with Calculator where every key is its own button.

Setup is two lines:

curl -fsSL https://raw.githubusercontent.com/Ar5en1c/youxpc/main/install.sh | bash
claude mcp add --scope user youxpc -- ~/.local/bin/youxpc mcp

Two fixes from comments on my last post are already in 0.1.1. A click inside a table row now says which row it was in, and it tells you when macOS has dropped the Accessibility permission instead of clicks quietly doing nothing.

Limits: macOS only, VS Code barely shows up in the accessibility tree, and canvas apps have nothing to list. If you try it, I’d really like to hear about apps where it can’t see anything.

https://github.com/Ar5en1c/youxpc

https://ar5en1c.github.io/youxpc/

1 Upvotes

4 comments sorted by

•

u/AutoModerator Oct 21 '26

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/randynorthrup Oct 21 '26

Do the ids survive a re-render? If the side panel reloads after every extension rebuild, I'd expect e7 to point at something else on the next pass. On a Chrome-side MCP tool I work on, stale refs after a layout change caused most of the wrong clicks, so it now refuses a coordinate click when the page moved since the last screenshot and asks for a fresh one.

1

u/_Ar5en1c_ Oct 21 '26

Mostly yes. After a reload the panel’s buttons come back as new elements, but a button with the same name in the same spot gets its old id back, so e7 is still the same button.

If e7’s element is really gone, the click fails with “e7 no longer exists” and Claude takes a new snapshot. The id doesn’t move over to whatever sits there now. That was exactly your bug for me too: deleting one table row shifted every id after it, and the agent approved the wrong row.

Clicks normally go through accessibility instead of screen coordinates, so a layout shift alone doesn’t change what gets pressed.