[BUG] Windows: MCP image generation servers fail to load despite correct configuration

Resolved 💬 2 comments Opened Jun 25, 2026 by hanwensheng Closed Jun 28, 2026

[BUG] Windows: MCP image generation servers fail to load despite correct configuration

Environment

  • OS: Windows 11 Home China 10.0.26200
  • Claude Code Version: [请填写你的版本]
  • Shell: Git Bash
  • Node.js Version: v24.15.0

Bug Description

All MCP image generation servers fail to load on Windows despite correct configuration in settings.json. The servers can be started manually and respond correctly to MCP protocol requests, but Claude Code never loads them.

Attempted Solutions

I've tried multiple MCP servers and configurations, all with the same result:

1. @v2litop/image-mcp

{
  "mcpServers": {
    "openai-image": {
      "command": "npx",
      "args": ["-y", "@v2litop/image-mcp"],
      "env": {
        "OPENAI_API_KEY": "xxx",
        "OPENAI_BASE_URL": "https://xxx/v1",
        "OPENAI_MODEL": "gpt-image-2"
      }
    }
  }
}

Result: Server never appears in loaded MCP servers list

2. Using full Windows path

{
  "command": "C:\\Program Files\\nodejs\\npx.cmd",
  "args": ["-y", "@v2litop/image-mcp"]
}

Result: Server never appears in loaded MCP servers list

3. Using wrapper script

Created openai-image-mcp.cmd wrapper to avoid path issues:

@echo off
"C:\Program Files\nodejs\npx.cmd" -y @v2litop/image-mcp

Result: Server never appears in loaded MCP servers list

4. Custom MCP server with direct node execution

{
  "command": "C:\\Program Files\\nodejs\\node.exe",
  "args": ["C:\\Users\\12130\\simple-image-mcp.mjs"]
}

Result: Server never appears in loaded MCP servers list

5. mcp-openai-image-generator (official Windows solution)

{
  "command": "cmd",
  "args": ["/c", "npx", "-y", "mcp-openai-image-generator"]
}

Result: Server never appears in loaded MCP servers list

Manual Testing

All servers work correctly when tested manually:

# Test 1: Server starts successfully
$ OPENAI_API_KEY="xxx" OPENAI_BASE_URL="https://xxx/v1" OPENAI_MODEL="gpt-image-2" npx -y @v2litop/image-mcp
[@v2litop/image-mcp] v0.1.1 已启动,model=gpt-image-2,baseURL=https://xxx/v1

# Test 2: Server responds to MCP protocol
$ echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | npx -y @v2litop/image-mcp
{"result":{"protocolVersion":"2024-11-05","capabilities":{"tools":{"listChanged":true}},"serverInfo":{"name":"@v2litop/image-mcp","version":"0.1.1"}},"jsonrpc":"2.0","id":1}

The server correctly implements MCP protocol and responds to initialization requests.

Expected Behavior

The MCP server should appear in the loaded servers list and its tools should be available in Claude Code.

Actual Behavior

  • The server never appears in ListMcpResourcesTool output
  • No error messages are shown to the user
  • Silent failure - only Figma plugin MCP resources are listed

Related Issues

This appears to be related to:

  • #62298 - "MCP integration broken on Windows: stdio MCPs connect but tools never surface"
  • #66183 - "Windows/Cowork: built-in Node.js not used for local MCP plugin servers → spawn node ENOENT"
  • #35175 - "CCD/Cowork requires system Node.js for local MCP extensions while Chat uses built-in UtilityProcess"

Impact

This makes it impossible for Windows users to use any MCP image generation servers with Claude Code, regardless of which implementation or configuration approach is used.

Suggested Investigation

Based on the related issues, this may be caused by:

  1. Windows-specific stdio transport issues (named pipes vs POSIX)
  2. Node.js binary resolution on Windows (system node vs built-in)
  3. Path handling with spaces in Windows paths
  4. Encoding issues (CP1252 vs UTF-8)

Workaround

Created a standalone script that directly calls the image generation API, bypassing MCP entirely:

// generate-image.mjs
const response = await fetch(`${OPENAI_BASE_URL}/images/generations`, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${OPENAI_API_KEY}`
  },
  body: JSON.stringify({
    model: OPENAI_MODEL,
    prompt: prompt,
    n: 1,
    size: '1024x1024'
  })
});

This works but defeats the purpose of MCP integration.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗