MCP.so
登录

MCP Web Worker Demo

@weolopez

基本信息

分类

云与基础设施

传输方式

stdio

作者

weolopez

关于 MCP Web Worker Demo

mcp demo, client and server as web workers from a web UI

#mcp#web-worker#demo

MCP Web Worker Demo 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp-worker": {
      "command": "npx",
      "args": [
        "http-server",
        "-p",
        "3000"
      ]
    }
  }
}

MCP Web Worker Demo 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

点击上方按钮,在临时沙箱中运行此服务器并实时获取工具列表。

概览

What is MCP Web Worker Demo?

MCP Web Worker Demo is a browser-based demonstration of a Model Context Protocol (MCP) client implemented using a Shared Web Worker architecture. It shows how to run MCP in a browser with a decoupled, pure JavaScript design requiring no build step.

How to use MCP Web Worker Demo?

Install the TypeScript SDK, build it with npm run build, then start a web server from the webworker-demo directory using ./start.sh or npx http-server -p 3000. Open http://localhost:3000/webworker-demo/ in Chrome or Edge, click “Connect to MCP”, and explore the Tools, Resources, and Prompts tabs.

Key features of MCP Web Worker Demo

  • Client runs in a Shared Web Worker background thread.
  • No external dependencies or build step required.
  • Single worker instance serves multiple tabs or windows.
  • Mock server with tools, resources, and prompts for testing.
  • Interactive demo UI showing connection state and server info.
  • Built-in diagnostics and detailed logging for troubleshooting.

Use cases of MCP Web Worker Demo

  • Demonstrating how to integrate MCP into a browser environment.
  • Testing MCP features like tool calling and resource reading.
  • Evaluating the performance benefits of offloading MCP to a worker.
  • Prototyping multi-tab applications that share a single MCP connection.

常见问题

1

What browsers are required to run MCP Web Worker Demo?

Shared Web Worker support is strictly required. Chrome, Edge (Chromium-based), Opera, and Android Chrome work. Firefox has limited support (disabled by default), and Safari/iOS Safari are not supported. No fallback is provided.

2

Does MCP Web Worker Demo need any external libraries or build tools?

No. The entire implementation uses pure JavaScript with ES modules and async/await. There are no external dependencies, and no build step is needed—just a local HTTP server.

3

Where does MCP Web Worker Demo store data?

All MCP client processing and mock server state run inside the Shared Web Worker context in the browser. No server‑side storage or external databases are used.

4

Why does MCP Web Worker Demo require a web server instead of opening the files directly?

Shared Workers cannot be loaded from the `file://` protocol. The demo must be served over HTTP (e.g., `http://localhost:3000`) to function correctly.

5

Does MCP Web Worker Demo support authentication or secure transport?

The demo implements a self‑contained mock server with no authentication or transport security. It is intended only for local testing and demonstration.

评论

云与基础设施 分类下的更多 MCP 服务器