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

pywebview-devtools-mcp

v0.1.1

Published

MCP server for debugging pywebview WebView2 apps

Readme

pywebview DevTools MCP

简体中文 | English

pywebview-devtools-mcp 让 MCP 客户端可以检查和自动化调试使用 edgechromium/WebView2 渲染器的 Windows pywebview 桌面应用。

这个包提供 Node.js MCP server。若要使用 pywebview 原生操作,请把 Python helper package pywebview-devtools 安装到应用所在的同一个 Python 环境中。

环境要求

  • Windows,并且系统中可用 WebView2。
  • 使用 edgechromium 渲染器的 pywebview 应用。
  • Node.js 20.19 或更新版本。
  • 可选的原生 helper 需要 Python 3.10 或更新版本。

MCP 配置

{
  "mcpServers": {
    "pywebview-devtools": {
      "command": "npx",
      "args": ["-y", "pywebview-devtools-mcp@latest"]
    }
  }
}

大多数 pywebview 应用还需要配置启动模式或附加模式,这样 MCP server 才能连接到 WebView2 DevTools endpoint。

启动模式

如果希望 MCP server 负责启动应用进程,请使用 --app-command。这是同时调试页面和原生能力最方便的模式。

{
  "mcpServers": {
    "pywebview-devtools": {
      "command": "npx",
      "args": [
        "-y",
        "pywebview-devtools-mcp@latest",
        "--app-command",
        "python examples/demo_app/main.py"
      ]
    }
  }
}

也可以传入工作目录和应用环境变量:

{
  "mcpServers": {
    "pywebview-devtools": {
      "command": "npx",
      "args": [
        "-y",
        "pywebview-devtools-mcp@latest",
        "--app-command",
        "python main.py",
        "--app-cwd",
        "E:\\Projects\\my-pywebview-app",
        "--app-env",
        "APP_ENV=development"
      ]
    }
  }
}

附加模式

如果应用已经暴露了 WebView2 remote debugging endpoint,可以使用 --browser-url

{
  "mcpServers": {
    "pywebview-devtools": {
      "command": "npx",
      "args": [
        "-y",
        "pywebview-devtools-mcp@latest",
        "--browser-url",
        "http://127.0.0.1:9222"
      ]
    }
  }
}

也可以通过 --ws-endpoint 直接附加到 CDP websocket。

如果附加模式下也要使用原生工具,正在运行的应用必须已经启用 Python helper,并且 MCP server 需要拿到 --helper-url--helper-token

Python Helper

把 helper 安装到 pywebview 应用所在的同一个 Python 环境中:

pip install pywebview-devtools

在创建 pywebview 窗口之前启用:

import pywebview_devtools
import webview

pywebview_devtools.enable()

remote_port = pywebview_devtools.remote_debugging_port()
if remote_port:
    webview.settings["REMOTE_DEBUGGING_PORT"] = remote_port

window = webview.create_window("Demo", "https://example.com")
webview.start(debug=True)

安全说明

这个 server 会把页面内容、console 消息、network 元数据、截图和 pywebview helper 原生操作暴露给 MCP 客户端。只应和可信的客户端、可信的应用一起使用。

Python helper 监听本地 HTTP endpoint,并要求 Bearer token。请把 helper token 当成敏感信息处理。