I’ve actually got an MCP server that makes it really easy for Claude to generate key events, wait for changes / wait for stable output / etc, and then take PNG screenshots of the terminal state (including all colors/styling) — which it “views” directly as part of the MCP tool response.
Wish I could open source it; it’s a game changer for TUI development.
If anyone wants to do this at home, this is a great base to work from:
https://github.com/memextech/ht-mcp