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

gua-webmcp

v1.0.10

Published

Browser-native WebMCP adapter for Gua game UI automation.

Readme

gua-webmcp

Browser-native WebMCP adapter for a Gua-enabled Godot Web Export or Unity WebGL page. It registers tools on the experimental document.modelContext API and calls an engine bridge in the same page. It does not start an MCP server or WebSocket. Alongside Semantic UI Tree actions, the Godot and Unity bridge helpers register the read-only get_world_object_tree, find_world_objects, and wait_for_world_object tools when the engine-owned world adapter is available. The helpers also register the fixed find_game_input_actions discovery tool and Semantic Game Action / Raw Input tools only for capabilities reported by an initialized engine input pump. One page-local input owner is used for all such calls; timeout, cancellation, unregister, port replacement, and engine shutdown release its held input. World types and selector definitions come from the public gua-world-tools package; observation remains host-filtered and browser callers cannot request a debug profile. The existing find and wait tools accept relativeToObjectId, maxDistance, and an optional positive limit. Nearby results carry the projected snapshot's epoch/frame/revision and one distance for every returned match. The engine ports always use the runtime's Player projection for UI and World observations and Player authorization for actions. This is independent of the profile used by a local Inspector, and no WebMCP tool exposes a profile argument.

import { createGodotWebBridge, registerGuaWebMcp } from "gua-webmcp";

const registration = await registerGuaWebMcp(createGodotWebBridge());
if (!registration.supported) console.info(registration.error);

Only objects explicitly opted into the engine adapter are observable. World v1 does not expose actions, arbitrary scene traversal, or host method invocation.

For Unity WebGL, use createUnityWebGlBridge() instead. The engine export must run in the same document so that its __guaGodotWebPort or __guaUnityWebPort is available before constructing the bridge.

The engine bridge is the source of truth. Its performAction() promise must not resolve on enqueue; it resolves with the request-correlated completion emitted after the engine adapter applies the action. performAction(request, { signal }) must cancel an accepted request that is still queued when the signal aborts; registerGuaWebMcp uses this to propagate caller cancellation and its configured action timeout into Godot or Unity. If the host already consumed the action, the caller remains cancelled while the engine bridge drains its eventual correlated completion. Successful tool executions return the structured Gua result directly; they do not wrap serialized JSON in an MCP-style text content block. getScreenshot is an optional read of the latest published image, and the tool is not registered when the engine has no drawable-frame readback path.

Feature detection is non-fatal. Each browser tab creates its own bridge and tool registrations, so no Gua session router or cross-tab session ID is introduced. Actions with requiresConfirmation are checked against the current action map immediately before dispatch and require confirmed: true.

The Godot Web addon ships separate Debug and Release GDExtensions. Enable Extension Support in the Web export preset so Godot selects the matching web.wasm32.single.debug or web.wasm32.single.release library before this package connects to window.__guaGodotWebPort.