Claude integration: MCP server with render_page images, skill, JSON CLI

- nxhmi.mcp_server: dependency-free stdio MCP server, 14 tools; readable
  values in and out; render_page returns a PNG image
- .mcp.json for Claude Code, .claude/skills/nextion-hmi/SKILL.md
- CLI: info --json, schema <kind>
- fix: project.add_page(h=...) clashed with the page height keyword
- 75 tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-15 15:27:01 +01:00
1 parent b9d7410716
commit 6f8341c66c
9 files changed
+521 -6

No files matched your search

+4
View File
@@ -20,7 +20,10 @@ src/nxhmi/
render.py page renderer matching the Editor canvas
tft.py .tft research helpers (layout table, same-length trailer patch)
cli.py python -m nxhmi ...
mcp_server.py MCP server (stdio JSON-RPC, no deps) -- tools for Claude incl. render_page images
examples/make_demo.py builds demo/ (demo.HMI, decoded/, render/)
.mcp.json registers the MCP server for Claude Code in this repo
.claude/skills/nextion-hmi/SKILL.md how to use the tools on a user's project (keep in sync with mcp_server.py)
tests/ unittest suite; fixtures/demo_editor_saved.HMI = the demo re-saved by the Editor
tools/ template generator
docs/ FORMAT.md (spec), RENDER.md, COVERAGE.md, NOTES.md (open points, what was tried)
@@ -56,5 +59,6 @@ new build writes different bytes, document the difference in docs/FORMAT.md per
- Every format claim in `docs/FORMAT.md` needs evidence (byte-identical Editor output, or the
Editor accepting a file we wrote). Mark guesses as **OPEN**.
- Keep `docs/COVERAGE.md` and the README coverage table current when something is added.
- New user-facing features get an MCP tool (with a test in `tests/test_mcp.py`) and a line in the skill.
- Writers must stay byte-identical to the Editor where we have samples; add a test when a new
rule is learned (see `tests/test_render.py` for the style: one rule, one measured expectation).