EmbedCalc MCP — embedded-engineering tools for AI agents
New project (started 2026-07-09). Handoff brief so a fresh session can cold-start. Goal: expose EmbedCalc's calculators/codegen as an MCP server so AI agents (Claude Desktop, Cursor, agent frameworks) call precise, deterministic embedded tools instead of hallucinating the math.
Why this scope is the realistic MCP (read first)
We researched the ambitious version ("MCP that returns cheapest cross-distributor part
price to any AI") and it is blocked by Terms of Service — DigiKey, Mouser, and even
Nexar (Octopart's licensed API) all forbid re-serving their price/stock data to third
parties without a paid commercial agreement + written consent. See
F:\embed-calc-v3\docs\06-ai-sourcing-direction.md.
The unlock: the ToS wall is only around distributor data. Our calculators and code generators are our own IP — exposing them as MCP tools is fully compliant and genuinely valuable, because LLMs are unreliable at exactly this kind of tricky, exact embedded math/codegen.
So this project = calculators-as-tools MCP, optionally plus a compliant part hint (matched MPN + affiliate buy-link, no re-served price/stock).
What EmbedCalc already is (the asset)
- Live site: www.embedcalc.com — 64 embedded/electronics calculators + parametric part matching.
- Repo:
F:\embed-calc(deploy via WSL homedeploy-local.sh). - Calc logic already exists as:
src/js/*.js— one IIFE per tool (UI-coupled).tests/formulas/*.test.js— pure-formula copies (no DOM) → the cleanest source to reuse in an MCP.
- Part matching:
api/digikey-param.js(parametric → in-stock MPN; DigiKey/Mouser price is display-only on our site, NOT for the MCP).
MVP scope (build order)
- Scaffold an MCP server (Node/TypeScript,
@modelcontextprotocol/sdk), publishable vianpx. - Expose the high-value, error-prone tools first (where deterministic beats LLM guessing):
- CRC → C code generator, Register Map → C, CAN/UART/SPI/I2C bit timing (with sample point), bit-field pack/unpack, struct alignment, Q-format, IEEE-754, number-base/endian.
- Each as one MCP tool with a typed schema (inputs → exact result / generated code).
- Reuse the pure formulas from
../embed-calc/tests/formulas/*(copy or import) — do NOT depend on the DOM/src/jsUI code.
- (Optional, compliant)
find_componenttool — spec → matching MPN(s) + a buy-link (affiliate/redirect). Return no distributor price/stock numbers (ToS). - Publish + docs page ("Use EmbedCalc from your AI") — also good marketing/SEO back to the site.
Guardrails
- ✅ Calculators/codegen = our IP → safe to expose.
- ❌ Do NOT re-serve DigiKey/Mouser/Nexar price or stock via the MCP (ToS).
- Part tool = MPN + buy-link only; price stays on the distributor (earns affiliate).
Reference docs
- Competitive strategy:
F:\embed-calc-v3\docs\05-competitive-strategy-2026-07.md - Sourcing/MCP ToS analysis + decision:
F:\embed-calc-v3\docs\06-ai-sourcing-direction.md - Tool inventory / gaps:
F:\embed-calc-v3\docs\04-calculator-gap-analysis.md
Status (2026-07-11) — 29 tools, v0.3.0
npm: https://www.npmjs.com/package/embedcalc-mcp — npx -y embedcalc-mcp
Batch 2 (v0.3.0) added electronics: eseries_nearest (snap to E6/E12/E24/E96), resistor_code (color bands + SMD/EIA-96), crystal_load_caps, lm317, attenuator_pad (T/Pi), junction_temp, microstrip_impedance (IPC-2141), pcb_trace_width (IPC-2221), awg_wire, ne555, dcdc_converter (buck/boost/inverting).
v0.2.0 history (first session) — 18 tools, publish-ready
- ✅ TypeScript +
@modelcontextprotocol/sdkscaffold (src/, stdio transport, strict tsc). - ✅ 18 MCP tools (Zod schemas, structuredContent + outputSchema), sources ported from
embed-calcpure formulas / src/js:- codegen:
crc_to_c(7 presets/custom → compilable C + check value),regmap_to_c(shift/mask defines + bit-field struct),bitfield_macro - timing:
can_bit_timing(bxCAN BTR / FDCAN NBTP / MCP2515 CNF — oracle-verified vs live site),uart_baud(BRR),i2c_timing(Rp + STM32 TIMINGR),spi_timing,i2s_clocks,lin_timing,rs485_bus,modbus_rtu_timing,ring_buffer_size - data:
qformat_convert,ieee754_convert,number_base_convert,endian_swap,struct_layout(full C parser + 32-bit MCU layout engine) - parts:
find_component— calls embedcalc.com parametric endpoint, returns MPN + buy link only (price/stock stripped per ToS guardrail; live-tested)
- codegen:
- ✅ Tests:
npm test= 83 pass (jest formula vectors, CAN oracle fixtures, IEEE-754 standard constants, hand-derived struct/i2c vectors, stdio e2e listing/calling all tools). - ✅ npx packaging prepped: package name
embedcalc-mcp(npm 404 = available),bin,files,prepublishOnly. Publish pending user actions:npm adduser+ license choice.
Build/run: npm install && npm run build && npm test. Entry: dist/index.js.
Register in Claude Code (local): claude mcp add embedcalc -- node F:/embedcalc-mcp/dist/index.js
Next
npm publish(user: npm login + license 결정) → then docs page on embedcalc.com ("Use EmbedCalc from your AI") for SEO.- Optional: more calculators (ADC/battery/thermal/RF…) if agent demand shows.