The client
The client is the layer that wraps the model. It is responsible for three things: detecting when the model wants to execute code, submitting that code to MCI, and returning the result.Processes
A process is a single unit of execution in MCI. When a client submits code, MCI creates a process, queues it, and runs it. Every process has a state and a status. State is where the process is in its life-cycle:queued: waiting for the sandbox to become availablerunning: actively executingidle: execution has ended
idle:
null: not yet completesuccess: completed without errorfailed: completed with an errorcanceled: terminated early via a kill signal
Process life-cycle
A process moves linearly fromqueued to running to idle. From idle, a process can be re-queued via the run signal — allowing canceled or completed processes to be executed again.
| State | Status | Meaning |
|---|---|---|
queued | null | Waiting for sandbox |
running | null | Actively executing |
idle | success | Completed successfully |
idle | failed | Completed with an error |
idle | canceled | Prematurely terminated via the kill signal |
Intent extraction
The client monitors model output and detects when the model is expressing an intent to execute code. How detection works is implementation-defined. The MCI project recommends wrapping intent in a code block with anexec attribute:
exec=true, it treats the block body as the code to submit. Any other attributes on the block can be used as metadata by your implementation.
Detection is implementation-definedYou are not required to use code blocks. XML tags, structured JSON, a system prompt convention — any mechanism that reliably extracts the code is valid. What matters is that the right code reaches the MCI server.
Response pipe
Once the process has been executed, the client would have to send the output back to the model as context. How that is done depends on client implementation.Example
An example AI chat client implementation