From efdb0c58143b4bef02a8c763f81e5df8a3d7e59b Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 23 Mar 2026 12:43:48 +0000 Subject: [PATCH] storkit: create 370_bug_scaffold_does_not_create_mcp_json_in_project_root --- ...ld_does_not_create_mcp_json_in_project_root.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.storkit/work/1_backlog/370_bug_scaffold_does_not_create_mcp_json_in_project_root.md b/.storkit/work/1_backlog/370_bug_scaffold_does_not_create_mcp_json_in_project_root.md index 8f4e085..279e5df 100644 --- a/.storkit/work/1_backlog/370_bug_scaffold_does_not_create_mcp_json_in_project_root.md +++ b/.storkit/work/1_backlog/370_bug_scaffold_does_not_create_mcp_json_in_project_root.md @@ -6,23 +6,28 @@ name: "Scaffold does not create .mcp.json in project root" ## Description -When storkit scaffolds a new project, it does not write `.mcp.json` to the project root. Without this file, agents spawned in worktrees cannot find the MCP server, causing `--permission-prompt-tool mcp__storkit__prompt_permission not found` errors and agent failures. +Two related problems with project setup: + +1. When the user clicks the "project setup" button in the web UI to open a new project, the scaffold does not reliably run — the `.storkit/` directory and associated files may not be created. +2. Even when the scaffold does run, it does not write `.mcp.json` to the project root. Without this file, agents spawned in worktrees cannot find the MCP server, causing `--permission-prompt-tool mcp__storkit__prompt_permission not found` errors and agent failures. ## How to Reproduce -1. Create a new empty directory and run `storkit /path/to/new-project` -2. Check the project root for `.mcp.json` +1. Open the storkit web UI and use the project setup button to open a new project directory +2. Check whether the full scaffold was created (`.storkit/`, `CLAUDE.md`, `script/test`, etc.) +3. Check the project root for `.mcp.json` ## Actual Result -`.mcp.json` is not created in the project root. Only worktrees get `.mcp.json` written (via `write_mcp_json` in `worktree.rs`). Agents fail because MCP tools are unavailable. +The scaffold may not run when using the UI project setup flow. When it does run, `.mcp.json` is not created in the project root. Agents fail because MCP tools are unavailable. ## Expected Result -The scaffold writes `.mcp.json` to the project root pointing to the server's port, so agents and the CLI can discover the MCP endpoint. +Clicking the project setup button reliably runs the full scaffold, including `.mcp.json` pointing to the server's port. ## Acceptance Criteria +- [ ] The web UI project setup button triggers the full scaffold for new projects - [ ] scaffold_story_kit writes .mcp.json to the project root with the server's port - [ ] Existing .mcp.json is not overwritten if already present - [ ] .mcp.json is included in .gitignore since the port is environment-specific