mirror of
https://github.com/RunLit/Bambu-Run.git
synced 2026-10-21 15:37:38 +01:00
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
This commit is contained in:
@@ -7,7 +7,7 @@ Type=exec
|
||||
WorkingDirectory={{REPO_DIR}}
|
||||
EnvironmentFile={{REPO_DIR}}/.env
|
||||
Environment=DJANGO_SETTINGS_MODULE=standalone.settings
|
||||
ExecStart={{VENV_DIR}}/bin/python standalone/manage.py bambu_mcp_server --transport sse --host 0.0.0.0 --port 8808
|
||||
ExecStart={{VENV_DIR}}/bin/python standalone/manage.py bambu_mcp_server --transport http --host 0.0.0.0 --port 8808
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
|
||||
Reference in New Issue
Block a user