Skip to content

The solution for encountering the Error "Error creating local task: Error: Timeout" when using "startup_timeout_ms" under windows #3385

Closed

Description

@sfz009900

What version of the VS Code extension are you using?

v0.5.6

Which IDE are you using?

VS Code

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

This is the situation where an error was reported before:
#3348

Now I have tried it myself and obtained a solution that can currently run MCP successfully:

[mcp_servers.context7]
command = "F:\\software\\nodejsold\\npx.cmd"
args = ["-y", "@upstash/context7-mcp", "--api-key", "xxxxxxxxxxxxxxxxxx"]
startup_timeout_ms = 20_000
env = { APPDATA="C:\\Users\\testuser000\\AppData\\Roaming", LOCALAPPDATA="C:\\Users\\testuser000\\AppData\\Local", HOME="C:\\Users\\testuser000", SystemRoot="C:\\Windows", ComSpec="C:\\Windows\\System32\\cmd.exe", NPM_CONFIG_REGISTRY="https://registry.npmmirror.com" }

it's ok :)

Image

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

Activity

  1. added
    extension
    on Sep 9, 2025
  2. changed the title [-]Regarding the correct configuration scheme for encountering "Error creating local task: Error: Timeout" after setting startup_timeout_ms[/-] [+]The solution for encountering the Error "Error creating local task: Error: Timeout" when using "startup_timeout_ms" under windows[/+] on Sep 9, 2025
  3. mizuikki commented on Sep 11, 2025

    @mizuikki

    Also working with

    command = "cmd"
    args = [
        "/c",
        "npx",
        "-y",
        "@upstash/context7-mcp",
        "--api-key",
        "xxx",
    ]
    env = { APPDATA="C:\\Users\\testuser000\\AppData\\Roaming", LOCALAPPDATA="C:\\Users\\testuser000\\AppData\\Local", HOME="C:\\Users\\testuser000", SystemRoot="C:\\Windows", ComSpec="C:\\Windows\\System32\\cmd.exe", NPM_CONFIG_REGISTRY="https://registry.npmmirror.com" }
    
  4. micahdlamb commented on Sep 17, 2025

    @micahdlamb

    Narrowed it down to just adding this:
    env = { SystemRoot="C:\\Windows" }
    fixes it for me.

  5. deangabbai commented on Sep 17, 2025

    @deangabbai

    Great work man, thanks alot.

  6. wbdb commented on Sep 17, 2025

    @wbdb

    For those looking for a complete example of config.toml working with Windows 11 Pro 24H2:

    [mcp_servers.context7]
    command = "cmd"
    args = [
        "/c",
        "npx",
        "-y",
        "@upstash/context7-mcp",
        "--api-key",
        "your-key",
    ]
    env = { SystemRoot="C:\\Windows" }
    startup_timeout_ms = 20_000
    

    Thanks @micahdlamb @mizuikk

  7. kimhee0129 commented on Oct 4, 2025

    @kimhee0129

    Narrowed it down to just adding this: env = { SystemRoot="C:\\Windows" } fixes it for me.

    Thanks a lot.... I struggled for 3 Hours, and you helped me!

  8. SiNaPsEr0x commented on Oct 5, 2025

    @SiNaPsEr0x

    my solution on windows with codex on vscode is:

    model = "gpt-5-codex"
    model_reasoning_effort = "high"
    
    [mcp_servers.brave-search]
    command = "C:\\Program Files\\nodejs\\node.exe"
    args = ["C:\\Users\\Rocco\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-brave-search\\dist\\index.js"]
    timeoutMs = 90000
    
    [mcp_servers.brave-search.env]
    BRAVE_API_KEY = "APIKEY"
    APPDATA = "C:\\Users\\Rocco\\AppData\\Roaming"
    LOCALAPPDATA = "C:\\Users\\Rocco\\AppData\\Local"
    HOME = "C:\\Users\\Rocco"
    SystemRoot = "C:\\Windows"
    ComSpec = "C:\\Windows\\System32\\cmd.exe"
    NPM_CONFIG_REGISTRY = "https://registry.npmmirror.com"
    
    [mcp_servers.sequential-thinking]
    command = "C:\\Program Files\\nodejs\\node.exe"
    args = ["C:\\Users\\Rocco\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-sequential-thinking\\dist\\index.js"]
    timeoutMs = 90000
    
    [mcp_servers.sequential-thinking.env]
    APPDATA = "C:\\Users\\Rocco\\AppData\\Roaming"
    LOCALAPPDATA = "C:\\Users\\Rocco\\AppData\\Local"
    HOME = "C:\\Users\\Rocco"
    SystemRoot = "C:\\Windows"
    ComSpec = "C:\\Windows\\System32\\cmd.exe"
    NPM_CONFIG_REGISTRY = "https://registry.npmmirror.com"
    
    [mcp_servers.context7]
    command = "C:\\Program Files\\nodejs\\node.exe"
    args = ["C:\\Users\\Rocco\\AppData\\Roaming\\npm\\node_modules\\@upstash\\context7-mcp\\dist\\index.js"]
    timeoutMs = 90000
    
    [mcp_servers.context7.env]
    APPDATA = "C:\\Users\\Rocco\\AppData\\Roaming"
    LOCALAPPDATA = "C:\\Users\\Rocco\\AppData\\Local"
    HOME = "C:\\Users\\Rocco"
    SystemRoot = "C:\\Windows"
    ComSpec = "C:\\Windows\\System32\\cmd.exe"
    NPM_CONFIG_REGISTRY = "https://registry.npmmirror.com"
    
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions