Files
Bambu-Run/setup.sh
RNL 7e4108fb32 fix(mcp): repair sse->http transport mismatch, auto-provision API key
bambu_mcp_server was refactored from FastMCP/sse to mcp-gate's http|stdio
transport, but native/bambu-run-mcp.service, setup.sh, and bambu-run.sh
enable-mcp were never updated — the systemd unit crash-looped on an
invalid --transport sse flag on any Pi deployed after that change.

Also closes the follow-on gap: MCP over http requires
BAMBU_RUN_MCP_API_KEY, which nothing ever generated, so a fixed service
would just crash-loop on a different error instead. Both setup.sh and
enable-mcp now auto-generate and persist a key (same pattern as
DJANGO_SECRET_KEY), print it in the ready-to-use Claude Desktop config,
and respect a real environment variable over .env if one is already set.
setup.sh's MCP step also gained an idempotency guard so re-running it
doesn't re-prompt/reinstall MCP that's already enabled.

Claude-Session: https://claude.ai/code/session_017Yxt4rdkuSowToxEKGMG9x
2026-09-05 00:12:23 +10:00

13 KiB
Executable File