mix oz_mcp.stdio (OzMcp v0.9.0)

Copy Markdown View Source

Runs an MCP server on the stdio transport, for a local client that starts this command as a subprocess.

$ mix oz_mcp.stdio MyApp.McpServer

Each line of stdin carries one JSON-RPC message of the client; each message the server sends is written as one line of UTF-8 text on stdout. From the start of the task, logs, the messages of Mix and stray prints of the callbacks go to stderr, so stdout carries JSON-RPC messages only. The command does not start the host application; give --start-app to start it and use the runtime that already runs it.

The options, the client configuration and the notes about the messages that Mix prints before the task starts are in the guide stdio transport.