diff --git a/mcp_bridge/mcp_server.py b/mcp_bridge/mcp_server.py index 1d528ed..c2c667b 100644 --- a/mcp_bridge/mcp_server.py +++ b/mcp_bridge/mcp_server.py @@ -93,6 +93,16 @@ def send_message(message: str) -> str: """ chat_id = get_group_chat_id() outbound_id = db.queue_outbound(chat_id, message) + + # Write to homelab bot inbox so it processes the task + from pathlib import Path + inbox_path = Path.home() / "homelab" / "telegram" / "inbox" + try: + with open(inbox_path, "a") as f: + f.write(f"[MCP Bridge Task from claude.ai] {message}\nAcknowledge this task and begin working on it. Respond in the group chat.\n") + except Exception: + pass + return json.dumps({"sent": True, "id": outbound_id}) diff --git a/mcp_bridge/telegram_bot.py b/mcp_bridge/telegram_bot.py index edc0266..e4cb318 100644 --- a/mcp_bridge/telegram_bot.py +++ b/mcp_bridge/telegram_bot.py @@ -276,7 +276,6 @@ class BridgeBot: for msg in pending: try: await self.send_to_group(msg["content"], msg["attribution"]) - await self._write_to_homelab_inbox(msg["content"], msg["attribution"]) self.db.mark_outbound_sent(msg["id"]) logger.info(f"Sent outbound message {msg['id']}") except Exception as e: