WebMCP is a system that allows websites to share tools, resources, and prompts with client-side Large Language Models (LLMs) without requiring API keys. It creates a bridge between websites and your local LLM, letting you use any model you want while interacting with WebMCP-enabled sites.
The easiest way to install WebMCP is by specifying your MCP client:
npx -y @jason.today/webmcp@latest --config claude
Supported clients include claude
, cursor
, cline
, windsurf
, or you can provide a path to a custom JSON configuration.
If you prefer manual setup:
npx -y @jason.today/webmcp@latest --mcp
To connect to a WebMCP-enabled website:
If you prefer not to expose the token to your model, you can manually generate one:
npx @jason.today/webmcp --new
Note: Some MCP clients, including Claude Desktop, require a restart to access new tools.
You can disconnect from a website by:
npx @jason.today/webmcp -q
All configuration files are stored in the ~/.webmcp
directory.
To add WebMCP to your website, include the WebMCP script:
<script src="webmcp.js"></script>
The WebMCP widget will automatically initialize and appear in the bottom right corner of your page. When clicked, it will prompt the user for a WebMCP token.
WebMCP operates through a localhost-only websocket server, which acts as a bridge between the MCP client and websites. The process flow is:
For those who prefer containerization, WebMCP supports Docker:
docker-compose.yml
to run the websocket server--docker
flag:
npx -y @jason.today/webmcp@latest --config claude --docker
This allows you to dockerize the main process (websocket server) while your MCP client connects to the container via websocket.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "webmcp" '{"command":"npx","args":["-y","@jason.today/webmcp@latest"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"webmcp": {
"command": "npx",
"args": [
"-y",
"@jason.today/webmcp@latest"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"webmcp": {
"command": "npx",
"args": [
"-y",
"@jason.today/webmcp@latest"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect