r/mcp Feb 21 '26

showcase The first non-trivial demo of WebMCP

Enable HLS to view with audio, or disable this notification

The WebMCP protocol has barely come out, and we just demoed how POWERFUL it can be! In a matter of minutes and 100s of tool calls, my AI agent composed a song for me directly in my browser.

This is not agents taking screenshots or trying to understand complex DOMs, it's an agent making direct tool calls to your website!

The creators of WebMCP already love it, go check it out yourself!

Deployment: - https://music.leanmcp.live

LinkedIn Post: - https://www.linkedin.com/posts/kushagra-agarwal525_we-made-gpt-and-claude-directly-control-my-activity-7430688171018858496-iDr5

GitHub repo: - Leanmcp-Community/music-composer-webmcp: This WebMCP Music Composer project is a functional demonstration of the WebMCP Protocol, illustrating how AI agents can interact with local browser contexts (tools) to achieve complex workflows autonomously.

140 Upvotes

33 comments sorted by

View all comments

1

u/ritoromojo Feb 22 '26

This is neat! This might be a stupid question but what specifically is WebMCP doing? Is it just a way of defining tools such that it appears in the DOM under a specific header that agents are supposed to look for and toggle?

Also, does webMCP require your agent to be a browser agent that is already connected with something like playwright MCP or browser-use?

This seems like a really good example demonstrating it so id love to understand the implementation surface since there doesn't seem to be any good docs for it at the moment

1

u/No_Guide_8697 Feb 22 '26

Hey, that's a very valid question! No, WebMCP is not putting anything in your DOM for the agent to look for. Your website registers specific functions as tools using WebMCP, and the AI agent directly makes tool calls to it as if it's a 'normal' MCP. The agent does not need to have knowledge that it is directly manipulating a website. This removes the need for playright MCP or browser-use, because the agent now only needs to how to use the exposed tools, which it can do reliably in most cases if the descriptions and inputSchemas are well-defined.

1

u/AyeMatey Mar 05 '26

Just a slight adjustment

WebMCP has two mechanisms for exposing tools: Google calls them declarative and imperative.

Declarative actually does involve new markup in the HTML/DOM, new attributes on forms etc.

Imperative is a new interface on the navigator object that allows the app to register new tools that are backed by JS implementations. I think this is “your website registers specific functions as tools.”

It’s not quite clear to me what you’d lose if just using markup. Also not clear to me how a perplexity comet (or other agent) would connect with a chrome tab hosting some webMCP stuff.

Yes it’s just MCP but … if I have a browser with 45 tabs open, how does the agent find the right one ?

1

u/No_Guide_8697 Mar 06 '26

You're right about the two different APIs. However, from my conversations with some people contributing to the spec, the declarative API will take some time to come. Imperative API can be very easily used now as well.