WebMCP vs MCP: what’s the difference?
MCP (the Model Context Protocol) connects an AI client to a server that offers tools. WebMCP lets a web page offer tools to the agent in the visitor's browser. In both, a tool has a name, a description and an input schema. MCP tools run on your server and are available whenever a client connects. WebMCP tools run in the page, logged in as the visitor, and exist only while the page is open.
Updated
Side by side
| MCP | WebMCP | |
|---|---|---|
| What it is | A protocol between an AI client and a server | A browser API on a web page |
| Where tools run | On the MCP server, local (stdio) or remote (HTTP) | In the page, in the visitor’s browser tab |
| Who can call them | Any MCP client configured to connect | The agent in the browser, while the page is open |
| Identity | Credentials the server is given, often OAuth or API keys | The visitor’s own login and cookies |
| Lifetime | As long as the server runs | As long as the tab is on that page |
| Works headless | Yes | Yes, though primarily designed with a human in the loop |
| How you build it | A server with an MCP SDK | registerTool() in JavaScript, or form attributes |
| Good for | Back-end integrations, automation, data access | Doing things on your site with the person present |
What they share
WebMCP takes its terms from MCP. A tool in either one has a name, a description the model reads to decide when to use it, and a JSON Schema for its input, and it returns content the model reads. The advice for writing good tools is the same for both: one job per tool, clear descriptions, and a description for every input.
Where they differ
Where the code runs
An MCP tool runs on a server you run, on the same machine as the client or remote. A WebMCP tool is a function on your web page. It runs in the visitor's browser and can use anything the page can, including its state, its API client and the visitor's login. You don't deploy a separate server or build a separate way to sign in.
Who is present
MCP suits agents working on their own, like background jobs, coding assistants and data pipelines. WebMCP is for an agent helping a person who is on your site. The person sees the page, and the page can update as tools run.
Lifetime
An MCP server's tools are available whenever it runs. WebMCP tools appear when the page registers them and disappear when the person leaves the page. A page can change its tools as it changes, for example offering checkout only once the basket has items.
Which one do you need?
- If agents should use your service without a browser, from a desktop assistant or an automation, build an MCP server.
- If agents should help people on your website, with their own login, add WebMCP to your pages. See How to add WebMCP to your site.
- If you want both, the two can share tool names, descriptions and schemas, and each can call your existing API.
Common questions
- Is WebMCP the same as MCP?
- No. They use the same terms (tools, input schemas, results), but WebMCP is a browser API. A web page registers tools, and the agent in the browser calls them. MCP is a protocol between an AI client and a server.
- Does WebMCP replace an MCP server?
- No. An MCP server is for agents that work without a browser. WebMCP is for an agent helping a person on your site. A site can have both.
- Can I reuse my MCP tool definitions for WebMCP?
- Mostly. The name, description and input schema carry over as they are. The code that runs the tool has to be rewritten for the page, usually as a call to the API your front end already uses.