We made Electroscope, a desktop app (Windows 11 x64 and Apple Silicon Macs, MIT) for cheap USB electronics microscopes. You get a normal live view (zoom, pan, rotate, freeze, grid, crosshair, marks), and an agent like Claude Code or Codex gets the same view over a built-in MCP server.
Repo: https://github.com/UnlikeOtherAI/electroscope
The thing I want to talk about is a small design choice that made the agent side much more useful. A model will happily read a chip marking off a blurry, glare-blown frame and sound confident about it. So every capture comes back with numbers measured from the raw sensor frame, not just an image:
focus_score: variance of the Laplacian on a normalised copy of the frame. Only meaningful compared within one scene, so the agent uses it to compare frames while you turn the focus ring, not as an absolute.brightness (0-255) plus overexposed_fraction / underexposed_fraction.hints in plain words. Right now: more than 12% of pixels blown out, very dark (over 40% underexposed or brightness under 25), or focus score under 15 ("probably out of focus or the field is featureless").
The metrics are taken before Electroscope's own brightness/contrast/saturation adjustments, so turning the picture up in the app doesn't fool the agent about what the sensor actually sent.
Two other tools lean on this:
capture_snapshot with a region (normalised 0..1) crops from the full-resolution frame, so a small region is a real close-up instead of an upscale of a downscaled image. follow_user_view captures exactly what you've zoomed and panned to.capture_sequence grabs 2-6 frames at 100-5000 ms intervals, each with its own metrics and timestamp, for things that change: an LED blinking, flux smoking, a part heating up.
In practice the loop is: agent captures, sees a hint or a low score, asks you to refocus or dim the light, captures again, and only then circles the pin or joint it means on your live view.
Getting it: signed installers are on the releases page (latest is 0.1.2). Plug in the microscope, pick the camera, click "Copy prompt for agent" and paste it into your agent. With Claude Code that's claude mcp add --transport http electroscope http://<ip>:7821/mcp. Heads-up: by default other computers on your network can connect and there's no password; switch that off in Settings if the agent runs on the same machine.
What I'd like feedback on:
- Are these the right hints? I've thought about a motion-blur check for sequences, and about warning when the focus score drops a lot against the previous capture.
- If you've given an agent a camera before, what did it get wrong that numbers like these would have caught?
Images: the first one is AI-generated to illustrate the idea, not a screenshot. The other two are real screenshots from the README.