MCP Glasses Control (memomind_glasses)¶
Anvil Agent exposes a Streamable HTTP MCP server at POST /mcp providing a single tool, memomind_glasses, so your agents can send cards, teleprompter scripts, live captions, or quick questions to your MemoMind One glasses.
Security & Consent Model¶
- Authentication required:
POST /mcprequires the same Bearer token (Authorization: Bearer <AGENT_CLIENT_TOKEN>) or loopback Tailscale identity header as the rest of the service. - No browser access: Any request to
/mcpcarrying anOriginheader is rejected with403, and/mcpnever emits CORS headers. - Wearer consent for microphones: Audio ops (
LS,RC,MR,ASK) never open the microphone automatically. They display an approval prompt on the phone and glasses; recording starts only when the wearer presses the glasses button (or taps Start forLS/RC/MRor Answer by voice forASK). - Control expiry: Control commands (
TP,LS,RC,MR,ASK) expire after 60 seconds so stale commands never fire unexpectedly when the phone wakes up later.NOTIFYcards persist in an in-memory ring of the last 50 items.
Connecting an MCP Client¶
Configure a Streamable HTTP MCP server pointing to your Anvil Agent endpoint:
{
"mcpServers": {
"memomind-glasses": {
"url": "http://127.0.0.1:8792/mcp",
"headers": {
"Authorization": "Bearer ${AGENT_CLIENT_TOKEN}"
}
}
}
}
Tool Reference (memomind_glasses)¶
op |
Parameters | Behavior |
|---|---|---|
STATUS |
(none) | Returns {"glassesAppOpen": true|false} indicating whether the glasses plugin has polled recently. |
NOTIFY |
content (1–2000 chars), optional title (<= 120), optional style (notify | task) |
Displays a notification or task card on the glasses HUD and phone history. |
TP |
v (1 show, 0 close), content (required when v=1), optional title |
Shows multi-page teleprompter text on the glasses HUD (wearer steps with press / double-press). |
LS |
v (1 request start, 0 stop) |
Requests live captions on the glasses HUD (wearer must press to start). |
RC |
v (1 request start, 0 stop), optional mode (Scribe profile ID) |
Requests a voice memo recording (requires a Scribe server URL in Settings). |
MR |
v (1 request start, 0 stop) |
Shorthand for RC with mode = "minutes". |
ASK |
content (1–300 chars), optional title, optional timeoutMs (5000–120000, default 60000) |
Displays a short question and blocks until the wearer speaks/types an answer, declines, or times out. |
Example curl Smoke Test¶
curl -sS http://127.0.0.1:8792/mcp \
-H "Authorization: Bearer $AGENT_CLIENT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "memomind_glasses",
"arguments": {
"op": "NOTIFY",
"title": "Build Complete",
"content": "All tests passed on main.",
"style": "notify"
}
}
}'