Simple MCP server running Mellea
Like we mentioned, Mellea are at the end python programs. We can wrap a simplemcp server around a program and use the server as-is. Here is an example using Pydantic AI’s inbuild MCP server.
Running Mellea programs as an openai compatible server (Experimental)
We also provide an expiermentalm serve utility for serving up an OpenAI-compatible chat endpoint. This allows you to write m programs that masquerade as a “model”. To learn more about this functionality, run:
Example m serve application
While deploying programs using m serve, it is important for the programs to follow a specific structure. The programs needs a have function called serve with the following signature:
m serve command then subsequently takes this function and runs a server that is openai compatible. For more information, please have a look at this file for how to write an m serve compatible program. To run the example: