Skip to content
Back to search

WebMCP

Early WebMCP proposal / implementation - since evolved and worked on by much more capable folks that develop the web: https://github.com/webmachinelearning/webmcp

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/jasonjmcghee--webmcp/badge.svg)](/listings/jasonjmcghee--webmcp)

HTML

<a href="/listings/jasonjmcghee--webmcp"><img src="/api/listings/jasonjmcghee--webmcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Installation

Just specify your MCP client (`claude`, `cursor`, `cline`, `windsurf`, or a path to json)

npx -y @jason.today/webmcp@latest --config claude

_If you're interested in setting it up manually, use the command `npx -y @jason.today/webmcp@latest --mcp`._

_Auto-install was inspired by Smithery, but their code is AGPL so I wrote this myself. If it doesn't work for you or you don't see your mcp client, please file an issue._

Using WebMCP

When you're ready to connect to a website, you can ask your model to generate you an mcp token.

Copy the token and paste it to the website's input. As soon as the website registers with it, it's thrown away and cannot be used for subsequent registrations or anything else. The website will receive its own session token for making requests.

If you'd rather your model / service never see the token, you can manually execute `npx @jason.today/webmcp --new` instead.

Some MCP clients, including Claude Desktop, need to be restarted to get access to new tools. (at least at time of writing)

To disconnect, you can close the browser tab, click "disconnect", or shut down the server with `npx @jason.today/webmcp -q`.

All configuration files are stored in `~/.webmcp` directory.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 157 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. _Added For Clarification: February 12th, 2026_
  2. ---
  3. You likely want the official W3C repo + spec: https://github.com/webmachinelearning/webmcp
  4. This was an early WebMCP proposal / implementation. I was just a guy with a dream.
  5. The idea of WebMCP has since evolved and is being worked on by much more capable folks that develop the web.
  6. This implementation is **not** compliant with the W3C spec.
  7. All this being said, please do feel free to try it out, as it demonstrates the value of WebMCP.
  8. ---
  9. # WebMCP
  10. A proposal and code for websites to support client side LLMs
  11. [![NPM Version](https://img.shields.io/npm/v/%40jason.today%2Fwebmcp)](https://www.npmjs.com/package/@jason.today/webmcp) [![MIT licensed](https://img.shields.io/npm/l/%40jason.today%2Fwebmcp)](./LICENSE)
  12. WebMCP allows websites to share tools, resources, prompts, etc. to LLMs. In other words, WebMCP allows a website to be an MCP server. No sharing API Keys. Use any model you want.
  13. [Here's a simple website I built that is WebMCP-enabled](https://webmcp.dev)
  14. It comes in the form of a widget that a website owner can put on their site and expose tools to give client-side LLMs what they need to provide a great UX for the user or agent.
  15. _The look, feel, how it's used, and security are all absolutely open for contribution / constructive criticism. MCP Clients directly building WebMCP functionality seems like an ideal outcome._
  16. An end-user can connect to any number of websites at a time - and tools are "scoped" (by name) based on the domain to simplify organization.
  17. ### Super Quick Demo (20 seconds, Sound on 🔊)
  18. https://github.com/user-attachments/assets/61229470-1242-401e-a7d9-c0d762d7b519
  19. ## Getting started (using your LLM with websites using WebMCP)
  20. #### Installation
  21. Just specify your MCP client (`claude`, `cursor`, `cline`, `windsurf`, or a path to json)
  22. ```bash
  23. npx -y @jason.today/webmcp@latest --config claude
  24. ```
  25. _If you're interested in setting it up manually, use the command `npx -y @jason.today/webmcp@latest --mcp`._
  26. _Auto-install was inspired by Smithery, but their code is AGPL so I wrote this myself. If it doesn't work for you or you don't see your mcp client, please file an issue._
  27. #### Using WebMCP
  28. When you're ready to connect to a website, you can ask your model to generate you an mcp token.
  29. Copy the token and paste it to the website's input. As soon as the website registers with it, it's thrown away and cannot be used for subsequent registrations or anything else. The website will receive its own session token for making requests.
  30. If you'd rather your model / service never see the token, you can manually execute `npx @jason.today/webmcp --new` instead.
  31. Some MCP clients, including Claude Desktop, need to be restarted to get access to new tools. (at least at time of writing)
  32. To disconnect, you can close the browser tab, click "disconnect", or shut down the server with `npx @jason.today/webmcp -q`.
  33. All configuration files are stored in `~/.webmcp` directory.
  34. ## Getting started (adding WebMCP to your website)
  35. To use WebMCP, simply include [`webmcp.js`](https://github.com/jasonjmcghee/WebMCP/releases) on your page (via src or directly):
  36. ```
  37. <script src="webmcp.js"></script>
  38. ```
  39. The WebMCP widget will automatically initialize and appear in the bottom right corner of your page. Clicking on it will ask for a webmcp token which the end-user will generate.
  40. ### Full Demo (3 minutes)
  41. https://github.com/user-attachments/assets/43ad160a-846d-48ad-9af9-f6d537e78473
  42. ## More Info About How It Works
  43. The bridge between the MCP client and the website is a localhost-only (not accessible to requests outside your computer) websocket server. Because it is configured to allow requests from your local web browser, authentication / token exchange is required, in case you visit a website attempting to abuse this.
  44. _Ideally the web browser itself would have an explicit permission for this, like webcam or microphone use._
  45. 1. The MCP client connects to the `/mcp` path using the server token from `.env` (auto-generated)
  46. 2. The server generates a registration token (instigated via the built-in mcp tool by a model or the `--new` command)
  47. 3. Web clients connect to the `/register` endpoint with this token and its domain.
  48. 4. Web pages connect to their assigned channel based on their domain.
  49. 5. When an LLM wants to use a tool / resource / prompt, the request flows from:
  50. - MCP Client → MCP Server → WebSocket Server → Web Page with the tool / resource / prompt
  51. - (similar for requesting a list of tools / resources / prompts)
  52. 6. The web page performs the request (e.g. call tool) and sends the result back through the same path
  53. 7. Multiple web pages can be connected simultaneously, each with their own set of tools and tokens
  54. 8. The MCP client sees all tools as a unified list, with channel prefixes to avoid name collisions
  55. ```mermaid
  56. sequenceDiagram
  57. participant User
  58. participant MCP as MCP Client
  59. participant Server as MCP Server
  60. participant WS as WebSocket Server
  61. participant Web as Website
  62. %% Initial connection
  63. MCP->>Server: Connect to /mcp with internal server token
  64. %% Website registration token
  65. User->>MCP: Request registration token
  66. MCP->>Server: Request registration token
  67. Server-->>MCP: Return registration token
  68. MCP-->>User: Display registration token
  69. %% Website registration
  70. User->>Web: Paste registration token
  71. Web->>WS: Connect to /register with token & domain (registration token deleted)
  72. WS-->>Web: Assign channel & session token
  73. Web->>WS: Connect to assigned channel
  74. %% Tool interaction
  75. MCP->>Server: Request tools list
  76. Server->>WS: Forward request
  77. WS->>Web: Request tools
  78. Web-->>WS: Return tools list
  79. WS-->>Server: Forward tools list
  80. Server-->>MCP: Return tools list
  81. %% Tool execution
  82. MCP->>Server: Tool request
  83. Server->>WS: Forward request
  84. WS->>Web: Execute tool
  85. Web-->>WS: Return result
  86. WS-->>Server: Forward result
  87. Server-->>MCP: Return result
  88. %% Disconnection
  89. User->>Web: Disconnect
  90. Web->>WS: Close connection
  91. ```
  92. ## Security
  93. This is a super early project. I'm very interested in hardening security to prevent malicious extensions etc. from being
  94. able to perform prompt injection attacks and similar. If you have constructive ideas, please reach out or open an issue.
  95. ## Built in tools
  96. - Token generator (for connecting to WebMCP websites)
  97. - MCP Tool Definer (to simplify building the schema of a tool for use with MCP)
  98. - You can ask for the javascript (if relevant) in a follow-up message for use with WebMCP
  99. ## Docker
  100. There is a `Dockerfile` specifically for Smithery deployment.
  101. If you'd like to use docker to run the websocket server, I've added a `docker-compose.yml` for demonstration purposes.
  102. If `--docker` is provided to the mcp client config alongside `--mcp`, it will assume the server is running. This will allow you to dockerize the main process (websocket server), and your mcp client will connect to your docker container via websocket. Similarly, websites will communicate with your docker container.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.