Skip to content

fix: make MCP server start on native Windows#4

Open
trostmarvin wants to merge 1 commit into
willibrandon:mainfrom
trostmarvin:fix/windows-support
Open

fix: make MCP server start on native Windows#4
trostmarvin wants to merge 1 commit into
willibrandon:mainfrom
trostmarvin:fix/windows-support

Conversation

@trostmarvin

Copy link
Copy Markdown

Fixes #3 (the MCP-tools-not-exposed part; see notes on skills below).

Root cause

Two independent breakers on native Windows:

  1. .mcp.json env expansion fails. PIXEL_MCP_CONFIG was set to ${HOME}/...HOME doesn't exist on native Windows outside Git Bash, and Claude Code refuses to start the server (/doctor: "Missing environment variables: HOME"). The variable is dead weight anyway: pixel-mcp only reads ~/.config/pixel-mcp/config.json and never consults PIXEL_MCP_CONFIG. This PR removes the env block.
  2. The command isn't spawnable. bin/pixel-mcp is a bash shebang script; native Windows can't execute it. This PR ships the new launcher from Add a Go launcher for cross-platform plugin use pixel-mcp#18 as bin/pixel-mcp.exe: Windows appends .exe when spawning the extensionless command path and runs the launcher, which starts pixel-mcp-windows-amd64.exe beside it. macOS/Linux keep executing the bash wrapper at the unchanged .mcp.json path.

Notably, the server binary itself was never broken: v0.5.0 pixel-mcp-windows-amd64.exe answers MCP stdio correctly when driven with clean pipes (matches the reporter's own finding in #3, "responds with 49 tools when queried manually").

Verification (Windows 11, real Claude Code via --plugin-dir)

Variant mcp__aseprite__ tools exposed
This branch 50
Same, but without bin/pixel-mcp.exe 0

Both changes are required. Also verified from WSL2 (Linux binary via the bash wrapper): handshake succeeds.

Also included

  • Skill frontmatter name fields normalized to kebab-case directory names (Pixel Art Creatorpixel-art-creator), per your findings in Skills not recognized on Windows - 'Unknown skill' error #3.
  • .gitattributes forcing LF for bin/pixel-mcp and *.sh, and marking binaries as binary — core.autocrlf=true checkouts on Windows were rewriting the wrapper to CRLF, which breaks its shebang under Git Bash.
  • allowed-tools left comma-separated: current docs accept comma-separated, space-separated, and YAML list forms.

Note on the bundled exe

bin/pixel-mcp.exe here is built from the launcher PR branch (willibrandon/pixel-mcp#25). Once that merges and releases, you'll likely want to replace it with the released pixel-mcp-launcher-windows-amd64.exe artifact.

🤖 Generated with Claude Code

The aseprite MCP server never started on native Windows, so no
mcp__aseprite__ tools were exposed (willibrandon#3). Two independent causes:

1. .mcp.json set PIXEL_MCP_CONFIG to "${HOME}/...". HOME is not set on
   native Windows outside Git Bash, and Claude Code refuses to start a
   server whose env expansion fails ("Missing environment variables:
   HOME" in /doctor). The variable is dead weight anyway: pixel-mcp only
   reads ~/.config/pixel-mcp/config.json and never consults
   PIXEL_MCP_CONFIG. Remove the env block.

2. The server command points at bin/pixel-mcp, a bash wrapper script
   that native Windows cannot execute. Ship the new pixel-mcp launcher
   (willibrandon/pixel-mcp#18) as bin/pixel-mcp.exe: Windows appends
   .exe when spawning the extensionless command path and runs the
   launcher, which execs pixel-mcp-windows-amd64.exe beside it. Unix
   platforms keep executing the bash wrapper unchanged.

Verified on Windows 11 with claude --plugin-dir: all 50 aseprite tools
are exposed with both changes; removing only the env block still yields
0 tools, confirming both fixes are required.

Also normalize skill frontmatter names to kebab-case directory names,
and add .gitattributes so core.autocrlf on Windows checkouts cannot
rewrite the bash wrapper to CRLF (which breaks its shebang under Git
Bash).

Fixes willibrandon#3

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

Skills not recognized on Windows - 'Unknown skill' error

1 participant