npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ohos-chrome-devtools-mcp

v0.1.2

Published

Thin wrapper that bridges OpenHarmony ArkWeb (via hdc fport) to chrome-devtools-mcp. The OHOS counterpart of @modelcontextprotocol/chrome-devtools.

Readme

ohos-chrome-devtools-mcp

Thin wrapper that lets chrome-devtools-mcp drive the ArkWeb browser on an OpenHarmony / HarmonyOS device. The OHOS counterpart of the upstream Chrome DevTools MCP server.

The MCP surface — tools, behaviour, output formats — is the upstream chrome-devtools-mcp verbatim. This wrapper exists only to do the OHOS-specific hdc dance:

  1. Connect to the device (auto-discovery via hdc tconn, or a manual paste fallback).
  2. Locate the ArkWeb browser process and its @webview_devtools_remote_<pid> abstract socket.
  3. Forward that socket to a local TCP port with hdc fport.
  4. Spawn chrome-devtools-mcp with --browserUrl=http://127.0.0.1:<port> and pipe its stdio straight through.

When the wrapper exits, the hdc fport rule is cleaned up.

Install

npm i -g ohos-playwright ohos-chrome-devtools-mcp chrome-devtools-mcp

ohos-playwright and chrome-devtools-mcp are peer dependencies — npm 7+ installs them alongside automatically when you install this package globally.

MCP client configuration

{
  "mcpServers": {
    "ohos-chrome-devtools": {
      "command": "ohos-chrome-devtools-mcp",
      "args": []
    }
  }
}

Any additional flags accepted by the upstream chrome-devtools-mcp can be appended to args — they are forwarded as-is, with a short blocklist for flags that would conflict with the connect-only flow (see Stripped flags).

How it differs from chrome-devtools-mcp

| | upstream chrome-devtools-mcp | this wrapper | |---|---|---| | Target browser | Chrome (launched locally) | ArkWeb on an OHOS device, over hdc | | Setup | Puppeteer launches Chrome | ohos-playwright/setup (hdc connect + fport) | | Connection | --browserUrl / --wsEndpoint / --channel | always connects via --browserUrl (injected) | | Tool surface | full upstream API | identical — wrapper does not modify it |

Stripped flags

These flags would make chrome-devtools-mcp ignore the OHOS device and either launch a local Chromium or connect somewhere unintended. The wrapper silently drops them with a stderr note:

  • --browserUrl (we set this from the device endpoint)
  • --wsEndpoint
  • --channel
  • --userDataDir
  • --executablePath
  • --isolated

Environment

Configuration is inherited from ohos-playwright. The most useful variables:

| Variable | Default | |---|---| | OHOS_PW_HDC | /data/service/hnp/bin/hdc | | OHOS_PW_BUNDLE | com.huawei.hmos.browser | | OHOS_PW_LAUNCH_URL | about:blank | | OHOS_PW_AUTO_CONNECT | auto (set 0 to skip auto-connect) | | OHOS_PW_INFO_PATH | <tmpdir>/ohos-playwright-cdp.json |

Wrapper-specific overrides (rarely needed):

| Variable | Purpose | |---|---| | OHOS_CDT_SETUP | absolute path to a custom setup module | | OHOS_CDT_TEARDOWN | absolute path to a custom teardown module | | OHOS_CDT_BIN | absolute path to a chrome-devtools-mcp bin to spawn |

Troubleshooting

  • Cannot resolve "ohos-playwright/setup" — install ohos-playwright (npm i -g ohos-playwright) or set OHOS_CDT_SETUP.
  • Cannot resolve "chrome-devtools-mcp/package.json" — install upstream (npm i -g chrome-devtools-mcp) or set OHOS_CDT_BIN.
  • ohos-playwright setup finished but ... was not written — usually a stale hdc tconn / sandbox-blocked device. Run hdc list targets to check.
  • The upstream chrome-devtools-mcp server writes its own diagnostics to stderr; check stderr first when a tool fails.

License

MIT