Opt tools in by adding them to the experimental_webMcp object:
Then load the script from your MCP endpoint with the ?webmcp-script parameter:
(server)=>{
},
import{ createMcpHandler }from"mcp-handler";
const handler =createMcpHandler(
experimental_webMcp:{
1 min read
Upgrade to mcp-handler@2.2.0 and read the documentation to get started.
export{ handler asGET, handler asPOST};