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

@isac322/kwin-mcp-opencode

v0.7.0

Published

OpenCode plugin for kwin-mcp — auto-registers the kwin-mcp MCP server (uvx kwin-mcp) and ships the kwin-desktop-automation skill on backend startup.

Readme

@isac322/kwin-mcp-opencode

OpenCode plugin for kwin-mcp — the MCP server for Linux desktop GUI automation on KDE Plasma 6 Wayland.

On every OpenCode backend startup the plugin's config hook:

  1. Registers the kwin-mcp MCP server by injecting mcp.kwin-mcp = { type: "local", command: ["uvx", "kwin-mcp"], enabled: true } into the runtime config — equivalent to a static block in opencode.json, but added programmatically so users do not have to edit config.
  2. Adds the bundled skill directory to skills.paths so OpenCode discovers the kwin-desktop-automation SKILL.md shipped inside the npm package. The skill teaches which kwin-mcp tool to call when, plus the platform pitfalls of Wayland / AT-SPI2 / EIS.

Both steps are idempotent — re-running OpenCode is a no-op. The plugin never copies files outside the npm package, so npm uninstall @isac322/kwin-mcp-opencode cleanly removes both the MCP server registration and the skill on next startup.

Installation

In your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@isac322/kwin-mcp-opencode"]
}

OpenCode resolves the npm package and runs the plugin on every startup.

The plugin assumes uvx is on your PATH and uses uvx kwin-mcp to launch the MCP server. Install uv first:

# Arch / Manjaro
sudo pacman -S uv

# Fedora
sudo dnf install uv

# Ubuntu / Debian
# see https://docs.astral.sh/uv/getting-started/installation/

You also need the kwin-mcp system dependencies (kwin_wayland, at-spi2-core, spectacle, python-gobject, dbus-python, optionally wl-clipboard and wtype). See the kwin-mcp README for distro-specific commands.

Manual fallback

If the plugin's config hook ever fails to inject the MCP server (e.g. OpenCode's plugin contract changed), add a static block to opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "kwin-mcp": {
      "type": "local",
      "command": ["uvx", "kwin-mcp"],
      "enabled": true
    }
  }
}

A copy of this snippet ships at opencode.json.example.

What the skill teaches

kwin-desktop-automation is a host-agnostic SKILL.md shipped inside this npm package. It uses bare tool names (session_start, screenshot, etc.) — OpenCode adds its own kwin-mcp_ prefix when exposing the tools to the model, so the agent learns the actual tool symbols from OpenCode's tool list rather than from the skill body. (The same SKILL.md content is shared with the Claude Code plugin; npm run build copies the source from ../../claude-code/skills/... into this package's skill/ directory before packaging.) The skill covers:

  1. Session mode selection — when to call session_start (virtual / isolated) vs session_connect (live / real desktop / container / kiosk).
  2. The observe → act → verify loop — observation tools ordered by cost (list_windows < accessibility_tree < find_ui_elements < wait_for_element < screenshot).
  3. Pitfallskeyboard_type is US-QWERTY only (use keyboard_type_unicode for CJK), clipboard is opt-in on virtual sessions, AT-SPI2 coordinates are surface-local, QMenu can be invisible to AT-SPI2, screen-edge triggers ignore EIS pointer events, container live sessions need Wayland/D-Bus mounts.
  4. Cleanup — always session_stop; keep_screenshots=true and keep_home=true leak /tmp directories.

Customising the skill

The shipped skill lives inside the npm package (read-only). To override or extend it without touching the package, drop your own SKILL.md into a directory OpenCode already scans:

  • Personal scope: ~/.claude/skills/<name>/SKILL.md or ~/.config/opencode/skills/<name>/SKILL.md
  • Project scope: <project>/.claude/skills/<name>/SKILL.md or <project>/.opencode/skills/<name>/SKILL.md

OpenCode keys skills by their frontmatter name, so reuse kwin-desktop-automation to override the shipped one, or pick a unique name (e.g. kwin-desktop-automation-custom) to keep both alongside each other.

Uninstall

npm uninstall @isac322/kwin-mcp-opencode, then restart OpenCode. Because the plugin never copies files outside the npm package, no manual cleanup is needed — both the MCP server registration and the skill drop out of the next runtime config automatically.

Building from source

cd integrations/opencode/plugin
npm install
npm run build  # copies SKILL.md from ../../claude-code/skills/, then swc compiles src/ → dist/index.js (no declaration emit)

The published npm tarball ships only dist/, skill/, README.md, and LICENSEsrc/ and tsconfig.json are dev-only.

Compatibility

  • OpenCode (anomalyco/opencode) v1.14+ — uses the canonical Plugin function contract from @opencode-ai/plugin and the config hook.
  • Bun runtime (OpenCode runs plugins on Bun).
  • Build toolchain: swc for transpile (src/dist/index.js) and tsgo (TypeScript v7 native preview, package @typescript/native-preview) for typecheck-only.
  • Linux with KDE Plasma 6 Wayland to actually run the MCP server.

License

MIT — see LICENSE.