After adding tools to the firmware, as in the simple C example, start the Python bridge as described in the integration guide. It exposes the board's tools at http://127.0.0.1:8765/mcp.
Add an MCP server entry to your AI harness's configuration, using Streamable HTTP and the Python bridge URL http://127.0.0.1:8765/mcp. The configuration format depends on the harness. If you change the bridge's address or port, use its corresponding /mcp URL.
Keep the bridge running so the harness can discover and call the firmware's tools. With the example firmware, the AI agent can discover setGain and call it with the numeric argument gain: 2.0.
Scripts can also call board tools through the bridge using MCP JSON-RPC messages over HTTP. With the bridge running, save this Bash and curl example as board-tool.sh:
Run bash board-tool.sh to set the gain to 2.0. This example assumes the board firmware defines a setGain tool with a numeric gain argument, as in the simple C example; the library does not register it automatically. Change the gain value in the final tools/call message to set another gain, and adjust url if needed. No tool discovery is performed.
The Python bridge forwards the tool call over serial and returns the board's result. The script prints the JSON response; check its error field or result.isError when using it in automated checks, since an MCP error can still have HTTP status 200. Only Bash, curl and awk are needed.
After initialization, reuse the same session ID and HTTP headers to call multiple tools. Send those calls before the final DELETE request, which closes the session.