From a9ef13afa8d5367046c4449b56ff8d2e6aa3beea Mon Sep 17 00:00:00 2001 From: caoimhinr Date: Wed, 27 May 2026 09:20:30 +0200 Subject: [PATCH] refactor: simplify startup_script to bare claude command (drop bash header and cd) Co-Authored-By: Claude Sonnet 4.6 --- mcp_server.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/mcp_server.py b/mcp_server.py index c2232ad..f2918f8 100644 --- a/mcp_server.py +++ b/mcp_server.py @@ -27,10 +27,6 @@ mcp = FastMCP("homelab-tickets") _HEADERS = {"X-Api-Key": API_KEY, "Content-Type": "application/json"} -# Repo root used in generated startup scripts (cd here before running claude) -_REPO_PATH = os.environ.get("CORVID_REPO_PATH", - os.path.expanduser("~/Projects/corvid")) - # MCP tool names always included so the agent can read and update its own ticket _BASE_TOOLS = [ "Read", @@ -72,13 +68,7 @@ def _generate_startup_script(ticket_id: int, human_id: str, title: str, f"Start by calling mcp__homelab-tickets__get_ticket({ticket_id}) to read the full " f"ticket details, then complete the work and mark the ticket as completed." ) - return ( - f"#!/usr/bin/env bash\n" - f"# Startup script for {human_id}: {title}\n" - f"cd {_REPO_PATH}\n" - f'claude "{prompt}" \\\n' - f' --allowedTools "{tools_str}"\n' - ) + return f'claude "{prompt}" --allowedTools "{tools_str}"' def _client() -> httpx.Client: