WebMCP
Early WebMCP proposal / implementation - since evolved and worked on by much more capable folks that develop the web: https://github.com/webmachinelearning/webmcp
claude mcp add --transport stdio jasonjmcghee-webmcp npx -y @jason.today/webmcp@latest
How to use
WebMCP is an early WebMCP implementation that lets websites act as MCP servers to serve tools, prompts, and resources to client-side LLMs. It provides a compact workflow where a model or service can generate an MCP token, websites register to receive a per-domain session, and tools are exposed through a unified channel. The built-in tooling includes a Token Generator for connecting to WebMCP websites and an MCP Tool Definer to help structure the schema of tools you want to expose to web-enabled LLMs. To use it, start the MCP server via npx and connect your MCP client (for example claude, cursor, cline, windsurf) by providing a config name or a path to a JSON config. The client can request the list of tools, and then issue tool requests that flow through the MCP server to the corresponding web pages via a local WebSocket bridge.
When you run the server, you typically specify a client via --config (e.g., claude) or enable manual mode with --mcp. If your environment uses Docker, you can dockerize the main MCP server so that your client can connect to the container. End users can obtain a registration token from the MCP client, paste it into the website input to register, and the site will receive its own session token for subsequent requests. If you ever want to run in a mode where the token isn’t exposed to the model/service, you can execute the CLI with --new to generate a token locally.
How to install
Prerequisites:
- Node.js (recommended: current LTS) and npm or corepack available on your system.
- Optional: Docker if you plan to run the server in a container.
Install and run (recommended default approach):
-
Ensure Node.js and npm are installed. Check with: node -v npm -v
-
Run the MCP server using npx (this downloads and runs the latest WebMCP server): npx -y @jason.today/webmcp@latest --config claude
Replace 'claude' with your desired MCP client name or configuration path
-
If you prefer manual mode (no auto-config), you can start in mcp mode: npx -y @jason.today/webmcp@latest --mcp
-
To stop the server, terminate the process (Ctrl+C).
Optional Docker workflow: 5) Build and run a Docker image (assuming a Dockerfile is provided in the repo): docker build -t webmcp:latest . docker run -i -p 3000:3000 webmcp:latest
- If you used Docker, ensure your MCP client is configured to connect to the container's WebSocket endpoint as described by the container's docs.
Additional notes
Tips and caveats:
- All configuration files are stored in the ~/.webmcp directory on your host.
- The WebMCP flow relies on a local WebSocket bridge running on localhost; the website interacts with the bridge at /mcp and /register paths as described in the docs.
- This is an early implementation not fully aligned with the W3C WebMCP spec; use it to prototype concepts and understand flow, not for production-grade security.
- If you need to refresh tools or regenerate tokens, you can use the built-in mcp tooling via the CLI (e.g., --new).
- For common issues, check that your token exchange is functioning and that the local browser is allowed to connect to the localhost bridge (some environments may block local connections).
- The MCP Tool Definer helps structure the schema of tools you expose; leverage it to organize prompts, tools, and resources per domain.
Related MCP Servers
sdk-typescript
A model-driven approach to building AI agents in just a few lines of code.
lihil
2X faster ASGI web framework for python, offering high-level development, low-level performance.
time
⏰ Time MCP Server: Giving LLMs Time Awareness Capabilities
chucknorris
⚡ C̷h̷u̷c̷k̷N̷o̷r̷r̷i̷s̷ MCP server: Helping LLMs break limits. Provides enhancement prompts inspired by elder-plinius' L1B3RT4S
example
A ready-to-use MCP (Model Context Protocol) server template for extending Cursor IDE with custom tools. Deploy your own server to Heroku with one click, create custom commands, and enhance your Cursor IDE experience. Perfect for developers who want to add their own tools and commands to Cursor IDE without complex setup.
rod
Model Context Protocol Server of Rod