Use EmbedCalc from Your AI
LLMs are confidently wrong about exactly the math embedded engineers care about: CRC check values, CAN bit-timing registers, struct padding, fixed-point quantization. Ask an AI for a CRC-16/MODBUS of a buffer and it will happily invent a plausible-looking wrong answer.
EmbedCalc MCP fixes this: it exposes EmbedCalc's calculators and code generators as Model Context Protocol tools, so Claude, Cursor, and any MCP-enabled agent call the exact, deterministic implementation instead of guessing — 29 tools, one command, no account.
Install
Claude Code:
claude mcp add embedcalc -- npx -y embedcalc-mcp
Claude Desktop / Cursor / any MCP client (JSON config):
{
"mcpServers": {
"embedcalc": { "command": "npx", "args": ["-y", "embedcalc-mcp"] }
}
}
What your AI can now do exactly
| Ask your AI… | Tool it calls |
|---|---|
| "Give me MODBUS CRC-16 in C" | crc_to_c → compilable table-driven C, check value 0x4B37 |
| "CAN 500 kbit/s on a 36 MHz STM32F103" | can_bit_timing → CAN_BTR = 0x00050008, SP 87.5% |
| "How big is this struct on a Cortex-M?" | struct_layout → offsets, padding, total size |
| "0.5 in Q15?" | qformat_convert → 16384 = 0x4000, quantization error |
| "Trace width for 3 A on 1 oz copper?" | pcb_trace_width → IPC-2221 curve, mils & mm |
| "Nearest E24 to 4.67 kΩ?" | eseries_nearest → 4.7 kΩ (+0.64%) |
| "Find me a real 220 Ω 1% resistor" | find_component → in-stock MPNs + buy links |
All 29 tools
- Code generation: CRC→C (7 presets + custom), register map→C (shift/mask + bit-field struct), bit-field macro
- Timing: CAN (bxCAN/FDCAN/MCP2515), UART BRR, I2C (pull-ups + STM32 TIMINGR), SPI, I2S, LIN, RS-485, Modbus RTU, ring-buffer sizing
- Data representation: Q-format fixed point, IEEE-754, number base (32-bit two's complement), endian swap (incl. BADC/CDAB), C struct memory layout
- Electronics: E-series standard values, resistor color/SMD codes, crystal load caps, LM317, attenuator pads (T/π), junction temperature, microstrip impedance (IPC-2141), PCB trace width (IPC-2221), AWG wire & voltage drop, NE555, buck/boost converter
- Components: find_component — real, in-stock part numbers with buy links (spec-matched via parametric search)
Why trust the numbers
Every tool is ported from the same formulas that power the calculators on this site, and locked down with test vectors: standard CRC check values, oracle fixtures against the live CAN solver, IEEE-754 reference constants, ASTM/IPC published values. 99 tests run before every release. Source is on npm (embedcalc-mcp), MIT licensed.
Prefer clicking?
Every one of these tools is also a free interactive calculator on the EmbedCalc home page — same math, no AI required.