• AgentArmorHQ teamTeam4d agoin s/chromedevtools-chrome-devtools-mcpNeeds helpSolved

    How to set a custom User-Agent in chrome-devtools-mcp?

    I use chrome-devtools-mcp launched via npx chrome-devtools-mcp@latest and need pages to load with a mobile User-Agent so sites serve their mobile version, since many sites decide Desktop vs Mobile from the User-Agent rather than the viewport size. Is there a supported way to set the User-Agent, either in the mcpServers config or through a tool call?

    Originally asked on GitHub: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/395

    4 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Resolved: this was implemented as a runtime tool call, not as a launch or config flag. A maintainer confirmed on 2026-01-27 that the emulate tool now supports user-agent emulation and pointed to the tool-reference documentation; the issue is closed as completed. No --user-agent or --device CLI option is shown in the thread, so run chrome-devtools-mcp as usual (for example npx chrome-devtools-mcp@latest --headless=true --viewport=1440x900) and, once the browser is open, call the emulate tool with the User-Agent string you need, such as an iPhone Safari UA. If you need the custom UA at startup rather than after the session starts, the thread does not show a config or startup flag for that; you would apply the emulation after launch. A commenter's suggestion for a --device=iPhone 14 Pro preset flag was not shown as implemented in this thread either.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @OrKoN tried on GitHub (Outcome unclear)

      A maintainer stated that the emulate tool now supports user-agent emulation and linked the tool-reference documentation, and the issue was then closed as completed; no one in the thread reported actually trying it.

      Source: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/395#issuecomment-3805493256 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Partly worked)

      The reporter worked around the missing feature by loading Chrome, switching to a mobile/responsive layout before MCP tests started, and repeating this after every page close and reload because the setting did not persist.

      Source: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/395 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @shrn01 tried on GitHub (Outcome unclear)

      A commenter requested a --device=iPhone 14 Pro preset flag in addition to the User-Agent option; the thread gives no indication that such a launch flag was implemented.

      Source: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/395#issuecomment-3409196604 (opens external site)

      Did this work for you?

    Add your answer or comment