Otii MCP Server
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Otii MCP Server Power my board at 3.3 V for 20 seconds and measure its energy use"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Otii MCP server
An MCP server that lets AI assistants measure the energy consumption of your device with a Qoitech Otii Arc or Otii Ace.
You can ask your assistant things like:
Power my board at 3.3 V for 20 seconds and tell me how much energy one cycle uses.
I changed the firmware to sleep between transmissions, measure again and compare with the previous recording.
The server powers your device under test from the Otii, records current and (optionally) the device's UART log, and computes energy, charge and current statistics. These can cover a whole recording, a time range, or the interval between two log messages.
Early preview. Tool names and parameters may change. Feedback is welcome through GitHub issues.
Requirements
The Otii 3 desktop application or the otii_server running.
An Otii account with an Automation Toolbox license available. The server reserves one license for each tool call and returns it afterwards.
uv, used to run the server without a manual install.
Related MCP server: PPK2 MCP Server
Configuration
The server is configured through environment variables, set in your MCP client's configuration:
Variable | Default | Description |
| Path to a JSON file with your Otii login (see | |
| Otii login, used when | |
|
| Host running the Otii application. |
|
| Otii TCP server port. |
| Name of the Otii device to use. Only needed when more than one is connected. |
If the Otii application is already logged in, no credentials are needed.
A credentials file keeps your password out of the MCP client's configuration:
{
"username": "your-otii-username",
"password": "your-otii-password"
}Adding the server to your MCP client
Claude Code
claude mcp add otii --env OTII_CREDENTIALS=$HOME/.config/otii/credentials.json \
-- uvx --from git+https://github.com/qoitech/otii-mcp otii-mcpAdd --scope project to write it to the repository's .mcp.json, so that everyone working on the firmware gets it.
Codex CLI
Register the server with Codex CLI:
codex mcp add otii --env "OTII_CREDENTIALS=$HOME/.config/otii/credentials.json" \
-- uvx --from git+https://github.com/qoitech/otii-mcp otii-mcpCreate the credentials file using the format above, or omit --env if the Otii application is already logged in. Codex saves the server configuration in ~/.codex/config.toml.
Run codex mcp list to verify registration, then start a new Codex session and use /mcp to check that the server is connected. See the Codex MCP documentation for more configuration options.
Claude Desktop, Cursor, VS Code and other clients
Most clients use the same JSON format: claude_desktop_config.json for Claude Desktop, .cursor/mcp.json for Cursor, and .vscode/mcp.json (under "servers") for VS Code.
{
"mcpServers": {
"otii": {
"command": "uvx",
"args": ["--from", "git+https://github.com/qoitech/otii-mcp", "otii-mcp"],
"env": {
"OTII_CREDENTIALS": "/path/to/credentials.json"
}
}
}
}From a local clone
git clone https://github.com/qoitech/otii-mcpThen use "command": "uv" with "args": ["run", "--directory", "/path/to/otii-mcp", "otii-mcp"].
Tools
Tool | Description |
| List connected Otii devices. |
| Power the device under test at a given voltage for a set time and record it. Returns a recording id and whole-recording statistics. Optionally records UART output and extra channels. |
| List recordings in the active Otii project. |
| Read the recorded UART log, with timestamps, optionally filtered. |
| Energy, charge and min/max/average current between two timestamps. |
| Energy between two UART log lines, e.g. one firmware cycle. |
| Energy while digital input GPI 1 or 2 is high (or low), from one edge to the next, e.g. one active period. |
| Switch Otii digital output GPO 1 or 2. |
| Set the voltage of the Ace 0–15 V pin. |
Recordings are stored in the project that is open in the Otii application, so you can have them there for a closer look.
Measuring per-cycle energy with UART log markers
The most useful measurements come from combining the current with your firmware's log output:
Connect the device's UART TX to the Otii RX, and set
exp_voltageto the device's IO voltage.Make your firmware print a fixed line once per cycle, e.g.
Connecting....Ask the assistant to measure with
uart_baudrateset. It then callsenergy_between_messageswith that line to get the energy of one cycle.occurrence: 1skips the first cycle, which includes boot.
Measuring per-phase energy with GPI markers
For more precise timing than log lines, drive a spare GPIO high during the phase you want to measure (e.g. while active, or during a sleep) and wire it to Otii GPI1 or GPI2. Ask the assistant to measure with channels: ["i1"] (or "i2") and exp_voltage set to the device's IO voltage. It then calls energy_between_gpi_edges to get the energy from the rising to the falling edge. Only complete intervals count, so a pin that is already high when the recording starts does not give an interval.
USB Flashing
Tip: if your device is also connected over USB for flashing or debugging, it may be partly powered from USB, which makes the measurements wrong. Use set_gpo to switch a USB power switch off while measuring.
AI-assisted power measurements with Otii MCP
Safety
measure turns on the Otii main output at the voltage you, or the assistant, choose. Tell the assistant your device's supply voltage, and set max_current_A to a sensible limit. Consider allowing measure, set_gpo and set_ace_0_15_voltage only after confirmation in your MCP client.
License
MIT
Available Tools
9 toolsenergy_between_gpi_edgesA
Energy during the n:th (0-based occurrence) interval where Otii digital input GPI
pin (1 or 2) is high (or low if high=false), from the edge into that level to the edge
out of it. For firmware that sets a GPIO wired to the Otii GPI while in a phase, e.g. active
or sleeping; this is more precise than UART log markers. The level at recording start is not
an edge, so only complete intervals count. The GPI channel must have been recorded (measure
with channels=["i1"] or ["i2"], and exp_voltage set to the device's IO voltage). Use
occurrence >= 1 to skip a first interval that includes start-up. Defaults to the latest
recording.
Inputs: pin (required), high, device, occurrence, +1 more.
energy_between_messagesA
Energy from the n:th (0-based occurrence) UART log line exactly equal to start_message
to the next line exactly equal to end_message. end_message defaults to start_message, which
gives one full cycle for firmware that prints a marker once per cycle. Use occurrence >= 1
to skip a first cycle that includes start-up. Defaults to the latest recording.
Inputs: start_message (required), device, occurrence, end_message, +1 more.
get_logB
UART log lines recorded from the device under test, with timestamps in seconds from
recording start. Defaults to the latest recording. Optionally keep only lines containing
contains.
Inputs: limit, device, contains, recording_id. Returns: result
get_statisticsC
Statistics between two times (seconds from recording start). For the main current channel 'mc' this includes energy and charge. Defaults to the latest recording.
Inputs: to_s (required), from_s (required), device, channel, +1 more.
list_devicesA
List the Otii devices (Arc/Ace) available to the Otii application.
Inputs: no named parameters. Returns: result
list_recordingsB
List recordings in the active Otii project with id, name and length in seconds.
Inputs: device. Returns: result
measureA
Power the device under test from the Otii main output at main_voltage for duration_s seconds and record it, then turn power off. Returns the recording id and statistics for the whole recording.
main_voltage: supply voltage in V. Check it is safe for the device under test. max_current_A: the main output cuts off above this current. channels: channels to record in addition to main current 'mc', e.g. 'mv' (main voltage), 'mp' (main power), 'i1'/'i2' (digital inputs GPI1/GPI2, for energy_between_gpi_edges). uart_baudrate: set to record the device's UART output (rx channel) as a timestamped log, which enables get_log and energy_between_messages. exp_voltage: expansion port voltage (1.2-5 V), i.e. the UART/GPIO logic level. Must match the device's IO voltage when recording UART or GPI. Left unchanged if not given. device: Otii device name; defaults to OTII_DEVICE or the only connected device.
Inputs: main_voltage (required), device, channels, duration_s, +3 more.
set_ace_0_15_voltageB
Set the voltage of the Ace 0-15 V pin (0 turns it off). Ace only.
Inputs: voltage (required), device. Returns: result
set_gpoB
Set Otii digital output GPO pin 1 or 2. Useful for switching hardware around the device under test, e.g. a USB/debugger connection that should be off while measuring.
Inputs: pin (required), enabled (required), device. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct action: device listing, recording control, pin control, log retrieval, and two clearly separated energy analyses (UART-message-based vs GPI-edge-based). The only mild overlap is between `measure` (which returns statistics for the whole recording) and `get_statistics` (which computes statistics for a time window), which an agent could occasionally confuse, but descriptions make the distinction workable.
Most tools follow a predictable verb_noun or verb_object pattern: list_devices, list_recordings, get_log, get_statistics, set_gpo, set_ace_0_15_voltage. Deviations are `measure` (bare verb) and the two `energy_between_*` noun-phrase tools, which are readable but break the dominant convention.
Nine tools is well-scoped for a power-measurement instrument: one per device/recording listing, one measurement driver, two pin/voltage setters, and three analysis tools. Every tool earns its place and none appears redundant.
The surface covers the core lifecycle: discover devices, run a measurement, list recordings, inspect logs/statistics, and compute energy over UART or GPI markers, plus output pin control. Minor gaps exist around recording management (rename/delete/export) and stopping an in-flight recording or streaming live current, but agents can work around these.
Maintenance
Related MCP Connectors
Home energy for AI assistants: live Power flow, Energy history, solar forecast, and device control.
Connects AI assistants to TrackingTime for querying time entries, projects, tasks, customers, and team data using natural language.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Gives your AI assistant persistent memory and intelligence about your work patterns.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with physical serial port devices across platforms (Windows COM/Linux tty) with support for asynchronous communication, URC pattern recognition, and structured logging.1-
- FlicenseAqualityNot gradedmaintenanceEnables LLMs to control a Nordic Power Profiler Kit II over USB serial for current capture (500 nA–2000 mA at 100 kSa/s plus 8 logic channels) and DUT power sourcing (0.8–5 V), with samples written to npz files. Also supports offline analysis such as statistics, activity/duty-cycle segmentation, and battery-life estimation.19-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to capture, measure, and decode USB logic-analyzer signals, including 16-channel streaming and sigrok protocol decoding for UART, I2C, SPI, CAN, and other protocols.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to automatically discover and control supported laboratory instruments over USB, LAN, and serial connections, including power-supply output, setpoint, and protection management plus multimeter measurements.4MIT