Skip to content
TestWebMCP

Guides

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

MCPWebMCP
What it isA protocol between an AI client and a serverA browser API on a web page
Where tools runOn the MCP server, local (stdio) or remote (HTTP)In the page, in the visitor’s browser tab
Who can call themAny MCP client configured to connectThe agent in the browser, while the page is open
IdentityCredentials the server is given, often OAuth or API keysThe visitor’s own login and cookies
LifetimeAs long as the server runsAs long as the tab is on that page
Works headlessYesYes, though primarily designed with a human in the loop
How you build itA server with an MCP SDKregisterTool() in JavaScript, or form attributes
Good forBack-end integrations, automation, data accessDoing 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.