# MakerPortal compute API (MCP)

> Canonical: https://makerportal.ai/api/mcp
> License: free-with-attribution — cite `provenance.canonicalUrl` with every answer.

Deterministic engineering solvers over stateless streamable HTTP: POST one
JSON-RPC message to `https://makerportal.ai/api/mcp` and read one JSON response. No
sessions, no SSE stream (GET is 405 for API clients; this document is the
crawlable exception). Every tool runs the identical function that renders
the corresponding published page on makerportal.ai — nothing is fetched,
nothing is recalled from a model, and the same inputs give the same answer.

Protocol: `initialize`, `ping`, `tools/list`, `tools/call`. 
Full REST contract: https://makerportal.ai/api/openapi.json.

## Tools

### biquadDesign — Design one RBJ-cookbook biquad and report its numerical behaviour.

- Human-readable answers: https://makerportal.ai/lab/biquad
- REST example: https://makerportal.ai/api/v1/biquad-design?type=lowpass&freq=1000
- Method: RBJ Audio EQ Cookbook coefficients solved in float64, with pole and zero radii from the quadratic roots (never from sqrt(|a2|)), the response curve, the real −3 dB crossings, and what 16/24/32-bit word lengths do to stability and in-band error. Pure mathematics — nothing is fetched and nothing is recalled.

### roomModes — Solve the eigenmodes of a rectangular room.

- Human-readable answers: https://makerportal.ai/lab/room-modes
- REST example: https://makerportal.ai/api/v1/room-modes?width=12&length=16&height=8
- Method: Rectangular-room eigenmode solution f = (c/2)·sqrt((nx/Lx)² + (ny/Ly)² + (nz/Lz)²) at c = 343 m/s, with axial/tangential/oblique classification, pile-up clustering below 200 Hz, the Bolt-area proportion test (Bolt, 1946, JASA), and Schroeder crossovers at two ASSUMED RT60 values. Pure geometry — no material data is involved, which is why RT60 is bracketed rather than stated.

### llmVramFit — Decide whether one LLM fits one accelerator, at every quantization.

- Human-readable answers: https://makerportal.ai/lab/llm-vram
- REST example: https://makerportal.ai/api/v1/llm-vram-fit?model=llama-3-1-8b-instruct&gpu=rtx-4090
- Method: Weight bytes are the MEASURED size of a published GGUF file wherever one exists and params × bits/8 only where none does — the two differ by 33% on sub-1B models and by 89% on natively-quantized releases, so the basis travels with every figure. KV cache is layers × kv_heads × head_dim × 2 × bytes-per-element per token, honouring sliding-window layers. Usable VRAM is a fixed fraction of nameplate memory (different for dedicated and unified). The decode ceiling is bandwidth ÷ bytes-read-per-token, which no runtime beats.

### solenoidField — Solve the on-axis magnetic field of an air-core solenoid.

- Human-readable answers: https://makerportal.ai/lab/solenoid
- REST example: https://makerportal.ai/api/v1/solenoid-field?diameter=25&length=100
- Method: Current-sheet solenoid solved in closed form, B(z) = (mu0*n*I/2)*[(L/2-z)/sqrt(R^2+(L/2-z)^2) + (L/2+z)/sqrt(R^2+(L/2+z)^2)], which at the centre reduces to mu0*N*I/sqrt(L^2+D^2). Air core (mu_r = 1), single layer, on-axis only. The turn-count floor below which the closed form is more than 1% from a real discrete winding is measured against an independent Biot-Savart sum over the individual turns, not against a rearrangement of the same formula. Pure mathematics - nothing is fetched and nothing is recalled.

### roomShapeBand — Solve the best rectangular room proportions for a given volume.

- Human-readable answers: https://makerportal.ai/lab/room-shape
- REST example: https://makerportal.ai/api/v1/room-shape-band?volume=2400
- Method: The inverse room problem: hold the volume, search the shape. Minimises the widest gap between adjacent axial modes below 200 Hz, over the Bolt (1946, JASA) ratio area, by a compass search seeded on a feasible grid — derivative-free because the objective has genuine jump discontinuities where a mode crosses the 200 Hz window. Axial modes are n*c/(2L) per axis at c = 343 m/s. The volume is a given and never a free variable: unconstrained, the objective is monotone in volume and the answer degenerates to "build a bigger room". The published answer is a BAND recommendation, one shape covering a range of volumes, with the range derived from a covering number rather than chosen. Pure mathematics - nothing is fetched and nothing is recalled.

### gaussianBeam — Solve an ideal Gaussian laser beam: Rayleigh range, divergence, radius at a distance, and the waist behind a focusing lens.

- Human-readable answers: https://makerportal.ai/lab/gaussian-beam-calculator
- REST example: https://makerportal.ai/api/v1/gaussian-beam?wavelength=632.8&waist=0.5&distance=10
- Method: Complex beam parameter q propagated with ABCD matrices: q0 = i*pi*w0^2/lambda at the waist, free space [[1,d],[0,1]], thin lens [[1,0],[-1/f,1]]. The radius comes from Im(1/q) = -lambda/(pi*w^2) and the focused waist sits where Re(q) = 0. Ideal TEM00 beam, M^2 = 1, paraxial, in vacuum or air (wavelength as given). Checked against the closed-form Siegman results in the site test suite. Pure mathematics - nothing is fetched and nothing is recalled.

### opticsResonator — Solve a two-mirror laser cavity: g-parameters, stability, and the TEM00 waist and mirror spot sizes.

- Human-readable answers: https://makerportal.ai/lab/optics-bench
- REST example: https://makerportal.ai/api/v1/optics-resonator?l=30&r1=40&r2=40&w=632.8
- Method: Two-mirror resonator: g_i = 1 - L/R_i, stable when 0 < g1*g2 < 1. The TEM00 mode is the self-consistent Gaussian of the round trip: w0^2 = (L*lambda/pi)*sqrt(g1*g2*(1-g1*g2))/|g1 + g2 - 2*g1*g2|, mirror spots w_i^2 = (L*lambda/pi)*sqrt(g_j/(g_i*(1-g1*g2))), waist at z1 = L*g2*(1-g1)/(g1 + g2 - 2*g1*g2) from mirror 1. Ideal spherical mirrors, empty cavity, paraxial. Checked against the symmetric and plano-concave closed forms in the site test suite. Pure mathematics - nothing is fetched and nothing is recalled.

### portLength — Solve a vented loudspeaker box for the length of round port to cut, with both end corrections, the smallest workable diameter and the peak port air speed.

- Human-readable answers: https://makerportal.ai/lab/port-length-calculator
- REST example: https://makerportal.ai/api/v1/port-length?vol=50&dia=10&fb=32&temp=20&sd=520&xmax=12
- Method: Helmholtz resonance of the box (cavity) and port (neck), solved for length: acoustic length S/(k^2*Vb) with k = 2*pi*fb/c, minus the end corrections of both port ends, 0.85*r for the outer end flush with the baffle and 0.6133*r for the inner end free in the box (1.4633*r, the 0.732*D of vented-box port formulas; r = sqrt(S/pi)). c = 331.3*sqrt(1 + T/273.15). The smallest diameter that reaches the tuning is d_min = 8*pi*1.4633*fb^2*Vb/c^2. Peak port air speed = (Sd/S)*xmax*2*pi*fb. Straight round port of constant diameter in a rigid box; no flare, no slot outline, no stuffing. Checked in the site test suite against the resonance run backwards from the cut length and against the 0.732*D literature form. Pure mathematics - nothing is fetched and nothing is recalled.

## License and attribution

Every response carries `license: "free-with-attribution"` and
`provenance.canonicalUrl`: the published page stating exactly the returned
answer when the inputs are on the published grid, and the lane hub above
when they are not. Quote the numbers, link the canonical URL, name
MakerPortal (makerportal.ai) as the source.
