One developer's pre-W3C attempt to make websites MCP-native
An early experiment to let websites expose tools and prompts directly to local LLMs without sharing API keys.

What it does
WebMCP is a JavaScript widget and local websocket relay that lets website owners expose tools, resources, and prompts to a user’s local LLM client. The site behaves as an ad-hoc MCP server, scoped by domain, while a localhost-only websocket server shuttles requests between the browser and the MCP client. The author explicitly notes this is an early, non-compliant proposal that predates the official W3C effort.
The interesting bit
The clever part is the token-exchange dance: the LLM generates a one-time registration token, the website consumes it to claim a session channel, and then all tool calls flow through a localhost websocket scoped to that domain. It is essentially glue code wrapping the Model Context Protocol for a browser environment, with the heavy lifting happening in a local relay rather than inside the browser itself.
Key highlights
- Websites expose
tools,resources, andpromptsto any connected local LLM via a drop-in widget - No API keys change hands; authentication uses ephemeral registration tokens minted by the MCP client
- Supports multiple simultaneous website connections, with tool names prefixed by domain to avoid collisions
- Ships with built-in helpers: a token generator and an MCP Tool Definer for scaffolding schemas
- Keeps the relay entirely on localhost, so traffic flows between your browser and local MCP client without a third-party broker
Caveats
- The author states this implementation is not compliant with the current W3C WebMCP spec and points to the official repository instead
- Security is explicitly flagged as unfinished; the README warns of prompt-injection risks and malicious extension threats
- Some MCP clients require restarts to pick up newly registered tools
Verdict
Worth a look if you want to see what client-side LLM tooling looked like before standards bodies took over, or if you are building a personal MCP bridge. Skip it if you need a production-ready, spec-compliant implementation.
Frequently asked
- What is jasonjmcghee/WebMCP?
- An early experiment to let websites expose tools and prompts directly to local LLMs without sharing API keys.
- Is WebMCP open source?
- Yes — jasonjmcghee/WebMCP is open source, released under the MIT license.
- What language is WebMCP written in?
- jasonjmcghee/WebMCP is primarily written in JavaScript.
- How popular is WebMCP?
- jasonjmcghee/WebMCP has 913 stars on GitHub.
- Where can I find WebMCP?
- jasonjmcghee/WebMCP is on GitHub at https://github.com/jasonjmcghee/WebMCP.