AI agents

Mantissa runs a local MCP server, so the AI agent you already use — Copilot agent mode, Claude Code, Cursor — can drive Mantissa as an instrument: read buffers from a paused debug session, compare fixed-point against float, and measure WAV differences, then reason over the numbers together with your code.

How it works

You talk to your agent in its own chat, exactly as before. When the agent needs signal data, it calls one of Mantissa's tools over a loopback HTTP endpoint; Mantissa answers with numbers. Mantissa has no chat UI and never talks to any cloud — the only AI in the loop is the agent you brought.

You chat AI agent Copilot · Claude · Cursor tool calls Mantissa MCP server :8765 reads debug session + WAV files

Connecting is a one-time registration: the agent's own config gets Mantissa's URL. From then on it works whenever Mantissa is running — no re-connecting per session.

Connect your agent

  1. Click the ✨ sparkles button at the right edge of the top bar (Debugger or Wave Compare mode — same button).
  2. Pick your agent. Installed agents show Connect …; the entry flips to Disconnect … (with a colored icon) once registered, and the sparkles turn colorful while any agent is connected.
  3. That's it. Ask your agent something from the examples below — it discovers Mantissa's tools on its own.

Tip. Copilot only calls tools in agent mode (not plain chat). In VS Code, reload windows after connecting so it picks up the new server.

Prefer to register manually, or use another MCP client?

The endpoint is http://127.0.0.1:8765/mcp (streamable HTTP; port configurable in Settings → AI agents (MCP), which also has copy-paste snippets). Manual equivalents of what the button does:

What the agent can do

Nine read-only tools. The agent picks them itself — you never call these directly, but knowing what exists helps you phrase asks.

ToolWhat it does
list_debug_sessions Find attached debuggers (Visual Studio, VS Code bridge, gdb, MATLAB) and whether they're paused.
list_variables Browse locals / struct members of the paused frame.
read_buffer Read a numeric array (auto-detects length; optional Q scaling; min/max/RMS stats).
read_scalar Read a single value — e.g. a live Q-format variable.
compare_fixed_float The core question: max/RMS error, SNR, estimated & suggested Q, headroom, first divergence points.
fixed_point_convert Float ↔ fixed conversion with saturation counts (Word8…Word64, unsigned too).
wav_info Sample rate, channels, bit depth, duration, peak/RMS.
wav_mld Maximum Loudness Difference (3GPP ear model) between two WAVs — "is it audible?"
wav_ssnr Minimum segmental SNR — "where is it worst?"

Example prompts — Debugger mode

Stop at a breakpoint first (the agent can only read a paused session), then ask things like:

Example prompts — Wave Compare mode

These work on WAV files directly — no debugger needed. Give the agent full paths (it passes them to Mantissa verbatim):

Scope & trust