r/MCPservers • u/jfrankie • 6h ago
I built an MCP interface that lets AI agents observe facial expressions through a Raspberry Pi — without sending every camera frame to the LLM
I've been working on an open-source Raspberry Pi robot, and one of the more interesting parts has been figuring out how to give external AI agents access to physical vision through MCP.
I wanted an agent to be able to check whether someone is in front of the camera and what facial expression is currently observable, without sending every camera frame to a remote LLM.
Here's how I approached it:
- Local vision: Raspberry Pi handles face detection and expression inference using OpenCV and a local ONNX model.
- Semantic MCP tools:
phos_get_presenceandphos_get_observed_expressionexpose observations without requiring the agent to process raw camera frames. - Optional image access: If an agent really needs the image, it can request a JPEG snapshot through a separately permission-controlled MCP capability.
- One camera pipeline: MCP reuses the robot's existing vision pipeline rather than opening another camera instance.
The idea is to keep continuous perception local and let external LLM agents focus on higher-level reasoning.
A few important limitations: facial expression classification is uncertain and doesn't tell us how a person actually feels. This is face detection, not identity recognition. The local model still needs careful calibration and real-world accuracy evaluation.
I implemented this in PHOS, my open-source Raspberry Pi robot project.
GitHub: https://github.com/phosairobot/phos
I'm particularly interested in how others are handling camera access and visual perception in MCP servers.
Are you exposing raw images to agents, or processing them locally and exposing semantic observations instead?