I've made a small MCP server for this: https://github.com/swimmingbrain/brainbridge
It connects TeXbrain with braiNOTES over a local websocket. You give your agent tools such as "render page 3 of this notebook" or "insert this LaTeX at the end of this .tex file" and it reads the handwriting and compiles it.
The instructions for VS Code, Cursor, Codex, Claude Code or whatever you use are in the repository. Basically, everything runs on your machine, except of the model.
If you have any questions feel free to ask (or feedback/bugs!)