Skip to content

MCP server — expose bambu-ai over the Model Context Protocol #39

Description

@abe238

Wrap every bambu subcommand as an MCP tool so Claude Desktop, Cursor, ChatGPT GPTs, and other MCP-capable agents can drive the printer with the same parity as Claude Code.

Implementation sketch:

  • src/bambu_ai/mcp.py (new module + optional dependency mcp>=1.0 under a new [project.optional-dependencies].mcp extra).
  • Use Anthropic's Python MCP SDK to register tools: bambu_status, bambu_pause, bambu_resume, bambu_cancel, bambu_light, bambu_print, bambu_queue_add, bambu_vision_classify, bambu_snap, bambu_doctor, etc.
  • Each tool's handler reuses the same underlying functions the CLI calls — no logic duplication.
  • New entry point in pyproject.toml: bambu-mcp = bambu_ai.mcp:main.
  • Run locally over stdio for Claude Desktop; document Tailscale exposure for the M5 / phone use case.

DoD:

  • Claude Desktop with the MCP configured can ask for status, pause, classify a frame, etc.
  • The same MCP tools work from any other MCP-capable agent.
  • Tests use the MCP SDK's in-process harness with mocked printer — no real-printer dependency in CI.

References: ~/.claude/CLAUDE.md notes the cross-client momentum brain pattern — this MCP is the printer-control analog of that play. Same value prop: one source of truth, many agents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions