Web Extension - MCP Server

0
I need to create an extension based on the Web API in order to expose an MCP Server to MAIA (11.8.0) via HTTP. I would like to use the @modelcontextprotocol/sdk library.The MCP server should be self‑hosted by the extension itself, and I need to start and stop its execution using two dedicated menu actions.My question is: how should I run the MCP server over HTTP? Can I use a built‑in HTTP server provided by the Web API, or should I use an external one such as Express? Do you have any examples or suggestions?
asked
1 answers
0

Hi Luca,

The Web API has no HTTP server primitive (that's only in the C# API, via WebServerExtension + IWebServer.AddRoute()).

Express won't help either — Web extensions run inside Studio Pro's webview, which can't bind listening ports.

I would highly recommend you to use the MCP server that is given by mendix itself. Check out this video for configuration : https://www.linkedin.com/posts/vishnuprasath011_mendix-claudecode-mcp-activity-7458417875352170496-m_C2?utm_source=share&utm_medium=member_desktop&rcm=ACoAADmzNMYBeN4cjtlEUpYl8Gt2q0FppuFduaY

answered