Skip to content

mcp servers error,The same mcp servers configuration works fine in gemini-cli, qwen-code and codebuddy. #192

@yuwenlong

Description

@yuwenlong

Describe the bug

The same mcp servers configuration works fine in gemini-cli, qwen-code and codebuddy.

Failed to start MCP Servers: Failed to read configuration from C:\Users\yuwen\.copilot\mcp-config.json: [
     {
       "code": "invalid_union",
       "unionErrors": [
         {
           "issues": [
             {
               "code": "invalid_type",
               "expected": "array",
               "received": "undefined",
               "path": [
                 "mcpServers",
                 "mcp-server-chart",
                 "tools"
               ],
               "message": "Required"
             }
           ],
           "name": "ZodError"
         },
         {
           "issues": [
             {
               "code": "invalid_type",
               "expected": "array",
               "received": "undefined",
               "path": [
                 "mcpServers",
                 "mcp-server-chart",
                 "tools"
               ],
               "message": "Required"
             },
             {
               "code": "invalid_union",
               "unionErrors": [
                 {
                   "issues": [
                     {
                       "code": "invalid_literal",
                       "expected": "http",
                       "path": [
                         "mcpServers",
                         "mcp-server-chart",
                         "type"
                       ],
                       "message": "Invalid literal value, expected \"http\""
                     }
                   ],
                   "name": "ZodError"
                 },
                 {
                   "issues": [
                     {
                       "code": "invalid_literal",
                       "expected": "sse",
                       "path": [
                         "mcpServers",
                         "mcp-server-chart",
                         "type"
                       ],
                       "message": "Invalid literal value, expected \"sse\""
                     }
                   ],
                   "name": "ZodError"
                 }
               ],
               "path": [
                 "mcpServers",
                 "mcp-server-chart",
                 "type"
               ],
               "message": "Invalid input"
             },
             {
               "code": "invalid_type",
               "expected": "string",
               "received": "undefined",
               "path": [
                 "mcpServers",
                 "mcp-server-chart",
                 "url"
               ],
               "message": "Required"
             }
           ],
           "name": "ZodError"
         }
       ],
       "path": [
         "mcpServers",
         "mcp-server-chart"
       ],
       "message": "Invalid input"
     },
     {
       "code": "invalid_union",
       "unionErrors": [
         {
           "issues": [
             {
               "code": "invalid_type",
               "expected": "array",
               "received": "undefined",
               "path": [
                 "mcpServers",
                 "amap-maps",
                 "tools"
               ],
               "message": "Required"
             }
           ],
           "name": "ZodError"
         },
         {
           "issues": [
             {
               "code": "invalid_type",
               "expected": "array",
               "received": "undefined",
               "path": [
                 "mcpServers",
                 "amap-maps",
                 "tools"
               ],
               "message": "Required"
             },
             {
               "code": "invalid_union",
               "unionErrors": [
                 {
                   "issues": [
                     {
                       "code": "invalid_literal",
                       "expected": "http",
                       "path": [
                         "mcpServers",
                         "amap-maps",
                         "type"
                       ],
                       "message": "Invalid literal value, expected \"http\""
                     }
                   ],
                   "name": "ZodError"
                 },
                 {
                   "issues": [
                     {
                       "code": "invalid_literal",
                       "expected": "sse",
                       "path": [
                         "mcpServers",
                         "amap-maps",
                         "type"
                       ],
                       "message": "Invalid literal value, expected \"sse\""
                     }
                   ],
                   "name": "ZodError"
                 }
               ],
               "path": [
                 "mcpServers",
                 "amap-maps",
                 "type"
               ],
               "message": "Invalid input"
             },
             {
               "code": "invalid_type",
               "expected": "string",
               "received": "undefined",
               "path": [
                 "mcpServers",
                 "amap-maps",
                 "url"
               ],
               "message": "Required"
             }
           ],
           "name": "ZodError"
         }
       ],
       "path": [
         "mcpServers",
         "amap-maps"
       ],
       "message": "Invalid input"
     },
     {
       "code": "invalid_union",
       "unionErrors": [
         {
           "issues": [
             {
               "code": "invalid_type",
               "expected": "array",
               "received": "undefined",
               "path": [
                 "mcpServers",
                 "chrome-devtools",
                 "tools"
               ],
               "message": "Required"
             }
           ],
           "name": "ZodError"
         },
         {
           "issues": [
             {
               "code": "invalid_type",
               "expected": "array",
               "received": "undefined",
               "path": [
                 "mcpServers",
                 "chrome-devtools",
                 "tools"
               ],
               "message": "Required"
             },
             {
               "code": "invalid_union",
               "unionErrors": [
                 {
                   "issues": [
                     {
                       "code": "invalid_literal",
                       "expected": "http",
                       "path": [
                         "mcpServers",
                         "chrome-devtools",
                         "type"
                       ],
                       "message": "Invalid literal value, expected \"http\""
                     }
                   ],
                   "name": "ZodError"
                 },
                 {
                   "issues": [
                     {
                       "code": "invalid_literal",
                       "expected": "sse",
                       "path": [
                         "mcpServers",
                         "chrome-devtools",
                         "type"
                       ],
                       "message": "Invalid literal value, expected \"sse\""
                     }
                   ],
                   "name": "ZodError"
                 }
               ],
               "path": [
                 "mcpServers",
                 "chrome-devtools",
                 "type"
               ],
               "message": "Invalid input"
             },
             {
               "code": "invalid_type",
               "expected": "string",
               "received": "undefined",
               "path": [
                 "mcpServers",
                 "chrome-devtools",
                 "url"
               ],
               "message": "Required"
             }
           ],
           "name": "ZodError"
         }
       ],
       "path": [
         "mcpServers",
         "chrome-devtools"
       ],
       "message": "Invalid input"
     }
   ]

config:

{
    "mcpServers": {
        "mcp-server-chart": {
            "command": "npx",
            "args": [
                "-y",
                "@antv/mcp-server-chart"
            ],
            "env": {}
        },
        "amap-maps": {
            "command": "npx",
            "args": [
                "-y",
                "@amap/amap-maps-mcp-server"
            ],
            "env": {
                "AMAP_MAPS_API_KEY": "xxxxxxxxxxxxxxxxxxxx"
            }
        },
        "chrome-devtools": {
            "command": "npx",
            "args": [
                "-y",
                "chrome-devtools-mcp@latest",
                "--executable-path=/mnt/c/Program\\ Files/Google/Chrome/Application/chrome.exe"
            ]
        }
    }
}

Affected version

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions