@@ -58,44 +58,33 @@ jobs:
5858 - name : Run tests
5959 run : uv run just test
6060
61- # Reproduce the Claude Desktop extension install flow.
62- # Claude Desktop clones extensions into a fresh directory and runs
63- # `uv pip install -e .` without an existing lockfile or venv.
64- # The previous `uv sync` test passes because it copies the lockfile
65- # and venv metadata. This step mimics the real user experience.
61+ - name : Build package
62+ run : uv build
63+
64+ # Simulate the Claude Desktop extension install flow.
65+ # manifest.json defines: "command": "uv", "args": ["run", "--directory", "${__dirname}", "mcp_massive"]
66+ # Claude Desktop clones extensions into a path with spaces
67+ # (AppData/Roaming/Claude/Claude Extensions/<id>) and runs that command.
68+ # This test clones into a fresh directory (no .venv or uv.lock) with
69+ # spaces in the path and runs the exact same command.
6670 - name : Simulate Claude Desktop extension install
6771 shell : pwsh
6872 run : |
6973 $extPath = "$env:RUNNER_TEMP\Claude Extensions\mcp-massive"
70- New-Item -ItemType Directory -Path $extPath -Force
71- # Copy only source files — no .venv, uv.lock, or cached state
7274 git clone . $extPath
73- cd $extPath
74- # Fresh editable install like Claude Desktop does — no lockfile
75- uv venv
76- uv pip install -e .
77-
78- # Test `uv run --directory` invocation — how MCP clients typically
79- # launch servers configured in claude_desktop_config.json
80- - name : Test MCP client-style invocation
81- shell : pwsh
82- run : |
83- $extPath = "$env:RUNNER_TEMP\Claude Extensions\mcp-massive"
84- $proc = Start-Process -NoNewWindow -PassThru -FilePath uv `
85- -ArgumentList "run", "--directory", $extPath, "mcp_massive", "--transport", "stdio"
86- Start-Sleep -Seconds 5
87- if ($proc.HasExited -and $proc.ExitCode -ne 0) {
88- Write-Error "Server exited with code $($proc.ExitCode)"
75+ # Run the exact command from manifest.json's mcp_config
76+ # uv run --directory <path> mcp_massive
77+ # This triggers a fresh build + install via the build backend,
78+ # then starts the server on stdio. We let it run briefly to
79+ # confirm it boots without errors.
80+ $proc = Start-Process -NoNewWindow -PassThru -RedirectStandardError "$env:RUNNER_TEMP\stderr.txt" `
81+ -FilePath uv -ArgumentList @("run", "--directory", "$extPath", "mcp_massive", "--transport", "stdio")
82+ Start-Sleep -Seconds 10
83+ $stderr = Get-Content "$env:RUNNER_TEMP\stderr.txt" -Raw -ErrorAction SilentlyContinue
84+ if ($stderr) { Write-Host "Server stderr:`n$stderr" }
85+ if ($proc.HasExited) {
86+ Write-Error "Server exited early with code $($proc.ExitCode)"
8987 exit 1
9088 }
91- if (!$proc.HasExited) { Stop-Process -Id $proc.Id -Force }
92- Write-Host "Server started successfully"
93-
94- - name : Build package
95- run : uv build
96-
97- - name : Test install from built wheel
98- shell : pwsh
99- run : |
100- $wheel = Get-ChildItem dist\*.whl | Select-Object -First 1
101- uv run --no-project --with $wheel.FullName python -c "import mcp_massive; print('import ok')"
89+ Stop-Process -Id $proc.Id -Force
90+ Write-Host "Server started successfully via uv run --directory"
0 commit comments