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.
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
- Click the ✨ sparkles button at the right edge of the top bar (Debugger or Wave Compare mode — same button).
- 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.
- 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:
- Claude Code —
claude mcp add --scope user --transport http mantissa http://127.0.0.1:8765/mcp - VS Code — user-profile
mcp.json:{ "servers": { "mantissa": { "type": "http", "url": "http://127.0.0.1:8765/mcp" } } } - Cursor —
~/.cursor/mcp.json:{ "mcpServers": { "mantissa": { "url": "http://127.0.0.1:8765/mcp" } } }
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.
| Tool | What 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:
- "List my debug sessions, read
syn_buffrom the paused one, and tell me if it looks clipped." - "Compare
st->exc_fxagainstexc_fltin the same session. Where do they first diverge, and is Q12 actually the right format?" - "Read
accand its float referenceacc_ref, estimate the Q format from the data, and tell me how much headroom I have before overflow." - "
energyoverflows somewhere in this loop — read it at this breakpoint and suggest a safer Q for a 32-bit word." - "Step me through this: the SNR between my fixed output and the float reference drops after sample 3000 — read both buffers, find the divergence, and relate it to the code in this file."
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):
- "Run an MLD comparison between
C:\out\ref.wavandC:\out\fixed.wav— is the difference audible?" - "Which 20 ms segment of
fixed.wavmatchesref.wavworst? Give me the timestamp so I can jump there in Wave Compare." - "What are the sample rate, bit depth and peak level of
render.wav? Anything suspicious?" - "Convert the gains
[0.5, -0.25, 1.2]to Q15 Word16 and tell me which ones saturate." - "Compare the two takes with both MLD and segmental SNR and summarize: did my latest quantization change make things better or worse, and where?"
Scope & trust
- Loopback only. The server binds
127.0.0.1— nothing leaves your machine, and Mantissa itself makes no network calls. - Read-only. The agent can inspect buffers and run analyses; it cannot write to the debuggee or your files.
- Your model, your account. Mantissa ships no AI — reasoning quality and billing belong to whichever agent you connect.
- Reversible. "Disconnect" in the sparkles menu removes the registration; the toggle in Settings → AI agents (MCP) turns the server off entirely.