Skip to content

fix: Windows path validation + moveMcp for .claude.json project scope - #16

Merged
ithiria894 merged 3 commits into
mainfrom
fix/windows-and-mcp-move
Mar 29, 2026
Merged

fix: Windows path validation + moveMcp for .claude.json project scope#16
ithiria894 merged 3 commits into
mainfrom
fix/windows-and-mcp-move

Conversation

@ithiria894

Copy link
Copy Markdown
Member

Summary

Test plan

  • All modules load without errors
  • Manual: Windows test (need Windows machine)
  • Manual: move a project-scope MCP server from .claude.json between scopes

Closes #11, Closes #12

🤖 Generated with Claude Code

ithiria894 and others added 3 commits March 28, 2026 17:37
…#11, #12)

Issue #12 — Windows Path Validation Failures:
- import path.sep and path.isAbsolute
- isPathAllowed(): use sep instead of hardcoded "/"
- /api/restore, /api/file-content: use isAbsolute() instead of startsWith("/")
- /api/export: use isAbsolute() instead of startsWith("/")

Issue #11 — moveMcp fails for .claude.json project scope:
- scanner.mjs: add claudeJsonProjectKey to items from projects[repoDir].mcpServers
- mover.mjs: read/delete from correct nesting level when claudeJsonProjectKey is set
  (projects[key].mcpServers instead of top-level mcpServers)

Closes #11, Closes #12

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7 tests covering:
- /api/file-content accepts absolute paths (Issue #12)
- /api/export accepts absolute paths, rejects relative paths (Issue #12)
- Scanner discovers .claude.json servers with claudeJsonProjectKey (Issue #11)
- No duplicate MCP servers from same file
- Zero JavaScript errors

All 7 passed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Config was removed in earlier cleanup commit. Restored from git history.
All 138 existing E2E tests pass (4.4m, zero failures).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ithiria894
ithiria894 merged commit 7b749ee into main Mar 29, 2026
@ithiria894
ithiria894 deleted the fix/windows-and-mcp-move branch March 29, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows Path Validation Failures in server.mjs moveMcp fails for MCP servers stored in .claude.json project scope

1 participant