Inspiration
We wanted to give AI coding assistants a predictable way to use QNX development tools. We focused on making compiler operations inspectable, with fixed arguments, explicit operation status and verifiable artifact metadata. We also wanted our demonstration to exercise native QNX message passing, beyond printing a greeting.
What it does
We built QNX Host MCP, a host-side MCP server for compiler inspection and C compilation. We expose these operations over standard input and output, with operation IDs for status polling and cancellation. We return the compiled artifact’s path, size and SHA-256.
We demonstrated real compilation through MCP and subsequent execution through a separate SDK/QEMU workflow. Our examples include a greeting and a native QNX client/server exchange between two threads. The message-passing example uses ChannelCreate, ConnectAttach, MsgSend, MsgReceive and MsgReply to send three numbers and return their doubles.
How we built it
We implemented the server and clients using JavaScript, Node.js and the MCP SDK. We used qcc from QNX SDP 8.0, with GCC 12.2.0 and the gcc_ntox86_64 target. Our original greeting compiled into a 9208-byte x86-64 ELF executable.
For the second example, node scripts/compile-example.mjs examples/msgpass src/msgpass.c launched the MCP server, called qnx_compile_c and polled qnx_operation_status. The retained result records succeeded, exit code 0 and a 13992-byte artifact, with its size and SHA-256 independently verified by the client.
We used the SDK image tools to place the unchanged binaries into the guest image and startup snippets to execute them. We ran the image in QEMU 8.2.2 and retained compiler results, artifact hashes and the guest serial console.
Challenges we ran into
We needed to distinguish accepting an operation from completing it, and accepting cancellation from confirming termination. We also needed bounded compiler output and clear artifact verification.
For native message passing, we used a private channel and a side-channel connection between threads in the same process. We checked replies and handled pthread error codes separately from calls that set errno.
We kept our execution claims tied to the workflow we demonstrated. Our guest ran without networking, and its SSH daemon failed during startup. We placed the binaries using the SDK image tools; our MCP server did not transfer them. We keep all four MCP image tools blocked. No login was performed; execution used startup snippets.
Accomplishments that we are proud of
We completed real compiler inspection and compilation through MCP and ran the unchanged greeting artifact inside QNX 8.0.0 x86_64 in QEMU 8.2.2. The retained console records Hello from QNX MCP smoke. and QNX_MCP_RUN_EXIT=0.
We then compiled our native message-passing example through MCP. The retained result records a 13992-byte artifact with SHA-256 1e928f1699eb8ecf7b40850043347a31eaeb313c26f3fd9945bb8dc6c71901e0. The guest-image hash record matches that artifact.
Inside the QNX guest, it produced exactly:
msgpass: sent 7 got 14
msgpass: sent 11 got 22
msgpass: sent 21 got 42
msgpass: ok
The console records QNX_MSGPASS_RUN_EXIT=0. We retained these results in the msgpass evidence directory, including the MCP compilation result, hash records and guest console.
What we learned
We learned to treat compilation, artifact identity and guest execution as separate evidence milestones. We used matching hashes to connect compiler output to the binaries placed in the image. Our second example demonstrates QNX synchronous message passing between a client thread and a server thread.
We also learned that successful execution through SDK tools does not establish that our MCP image lifecycle works. The retained evidence supports these examples and their recorded runs.
What is next
We plan to validate image lifecycle operations through MCP before enabling those tools. We also want to investigate the guest networking and SSH startup failures and improve the reproduction workflow for both examples.
Try it out
Source, reproduction instructions and recorded evidence: https://github.com/martinPisacreta/qnx-host-mcp. The msgpass README explains the native message-passing example and its compilation command. REAL-QNX.md documents the separate SDK/QEMU workflow.
Built With
- c
- javascript
- model-context-protocol
- node.js
- qemu
- qnx
- ubuntu
- wsl
Log in or sign up for Devpost to join the conversation.