Skip to content

Lan mcp server - #127

Open
adampog wants to merge 2 commits into
m5stack:mainfrom
adampog:lan-mcp-server
Open

adampog wants to merge 2 commits into
m5stack:mainfrom
adampog:lan-mcp-server

Conversation

@adampog

@adampog adampog commented Nov 2, 2026

Copy link
Copy Markdown

No description provided.

adampog and others added 2 commits September 30, 2026 23:55
Adds a small LAN HTTP server (POST /frame, GET /live) that accepts JPEG
frames from the reefwatch detector, decodes them with the existing
esp_new_jpeg helper and shows them full screen on LVGL's top layer, so
it works over any app and in AI agent mode.

- Detections show for 8 s with labels; LEDs go amber and the head can
  turn toward the camera (CONFIG_STACKCHAN_REEFWATCH_CAMERA_YAW).
- Tap a detection to watch that camera live, tap again to stop; the
  live view can also be started by voice via new self.cameras.* MCP
  tools, and switches itself off after 5 minutes.
- Optional shared token, port, timings in a new Kconfig menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reefwatch HTTP server becomes a shared LAN server (hal_lan_server)
that also hosts a JSON-RPC MCP endpoint (POST /mcp_server: initialize,
ping, tools/list with cursor paging, tools/call) and advertises it via
mDNS as _mcp._tcp, the way ESP-Claw's mcp_client discovers devices.
The robot also answers as stackchan.local.

StackChan's tools are now McpTool objects shared between xiaozhi and
the LAN registry, so the voice agent and LAN agents see the same set.
Adds self.robot.set_expression and self.robot.show_message for agents
that can't send xiaozhi's emotion messages.

dependencies.lock only gains espressif/mdns 1.13.1; every other
component stays at its previously locked version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant