Skip to content

Allow switching execution context to Shared Workers #317

Closed as duplicate

Description

@tobiu

Hi again,

This is a follow-up to our feature request for dedicated workers (#316).

Our AI development agent, Gemini 2.5 Pro, which helped draft the previous request, also identified the need for similar support for Shared Workers.

In the Neo.mjs framework, our entire architecture is based on the "Off the Main Thread" (OMT) concept, which you can read more about here. As part of this, we use a Shared Worker to manage state and communication across multiple browser windows for true multi-window application support. While our cornerstone is the app worker, our architecture allows for multiple shared workers (e.g., for data, vdom, canvas, tasks), each with a distinct responsibility.

The Problem:
Currently, we have no debugging visibility into our shared workers whatsoever. Unlike dedicated workers where some errors might bubble up, the shared worker is a complete black box when using mcp-server. We cannot see console output, and more importantly, we cannot interact with its global scope.

Proposed Feature:
Could the context-switching mechanism proposed in issue #316 be extended to also support Shared Workers?

We understand this may be significantly more complex, as shared workers have a different lifecycle and connection model (e.g., connecting via a MessagePort). However, having this capability would be invaluable for debugging multi-window applications and would make mcp-server a comprehensive tool for modern, multi-threaded web development.

This would be a critical feature for us and, we believe, for anyone building complex applications that share logic across multiple tabs or windows.

As before, we are happy to provide any details about our use case or assist in testing. Thank you!

Activity

  1. natorion commented on Oct 9, 2025

    @natorion
    Contributor

    Let's merge it in the other issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions