Create interactive 2D and 3D graphs with validated equations, shareable links, and PNG previews.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
equation.io β a graphing calculator with a built-in CAS. Type equations; they compile to GPU shaders and render as 2D curves, 3D surfaces, vector fields, ODE phase portraits, probability densities, and more. Every graph lives entirely in its URL, so the address bar is the share button.
This is the successor to graph.tk, which started in this repository in
May 2010 as an HTML5-canvas grapher and picked up 400+ stars over the years.
The site ran on a free .tk domain β which turned out to be the fatal flaw:
the registrar (Freenom) eventually seized the domain to serve ads on it, and
after Meta sued Freenom the whole .tk registry collapsed and the domain
stopped resolving entirely.
The lesson was learned and the grapher was rebuilt from scratch β new parser,
new CAS, WebGL rendering instead of canvas β on a domain that's actually owned:
equation.io. The original code is preserved on the
legacy branch (tag graph.tk-final) under its original
LGPL-3.0 terms; everything on main is a clean-room rewrite, MIT licensed.
The old UI remains usable at graph.equation.io.
Deployed as a Cloudflare Worker.
lib/ β tokenizer, shunting-yard parser, symbolic expression core (expr.ts),
and a GLSL compiler (glsl.ts) used for plotting.web/ β the grapher. Every equation is compiled to a GLSL scalar field F whose
zero set is the graph:
y=tan(x)).z appears): raymarched implicit surface β
sign-change detection along each ray, bisection refinement,
finite-difference normals, gl_FragDepth so multiple surfaces intersect
correctly. Equations without z extrude to their true locus in RΒ³.The whole graph state lives in the URL (/g/eq1;eq2;β¦, each equation
percent-encoded via lib/link.ts, which also escapes parens so chat-app
linkifiers don't truncate the URL; legacy /#β¦ links still load), so any set
of equations is linkable and the address bar is the share mechanism.
Agent-facing surface:
/llms.txt β link format + expression syntax reference
(web/public/llms.txt)/g/<eqs> β share form of a graph link; the worker injects og:/twitter:
meta tags and /api/og/<eqs> renders the preview PNG on the CPU
(expressions compile to a stack machine β no WebGL in Workers)/mcp β stateless MCP server (Streamable HTTP) with encode_graph_url
(validates rows, returns links), decode_graph_url (decodes links for editing),
and show_graph (renders the interactive grapher inside MCP Apps hosts).
See MCP Apps integration and testing.A mic button talks to an OpenAI Realtime model
(web/voice.ts) over WebRTC, and the model edits the graph
with get_graph / set_graph tools, which report each row's readouts (values,
intercepts, extrema in view). look_at_graph puts a screenshot of the canvas
into the conversation as an image.
The page never holds an OpenAI credential. It opens a control WebSocket to the
Worker (worker/voice-call.ts) and sends its WebRTC
offer with a credit key. The Worker checks the key's balance in D1, creates
the call with a fixed session, and attaches a sideband WebSocket to it before
answering. The sideband charges every response's token usage to the key
(worker/voice-credit.ts); the call is hung up when
the balance runs out, after 30 minutes, if the page changes the session, or
when the page's control socket closes. Audio flows between the browser and OpenAI directly.
Each scripts/voice-key.ts command takes --remote for the deployed database.
Visit any page once with #voice=<key> to show the mic in that browser
(#voice= forgets it). ?voice=<key> works too, but a query string reaches
the server, which may log it; the fragment never does.
Basics
y = x^2 Β· x^2+y^2=4 Β· y = tan(x) β 2D curvesy = sin(2Οx) Β· ΞΈ = 1; r = ΞΈ x Β· y = xΒ³ β unicode input: Ο and Ο,
Greek-letter names, superscript exponents, subscripts (Tβ β‘ T_0, so
aβ is a sequence term), and Β·/Γ/Γ·/β€/β₯/β ;
in the editor, typing \pi, \theta, \nabla, β¦ inserts the symbol, and
\ before any function name just drops (\trail β trail)z = sin(x)cos(y) Β· x^2+y^2+z^2=9 β 3D surfaces (automatic when z appears)y < x/2 + 1 β inequalities shade their region; strict </> have no
border, <=/>= draw the boundary line, and chains like
4 <= x^2 + y^2 <= 9 intersect with an edge per non-strict boundy = {x < 0: -x, x >= 0: x^2} β piecewise: cond: value cases tried in
order, an optional last bare value is the default; conditions chain like
{0 < x < 1: 1, 0}, and a bare condition counts 1 ({x > 0, 5})y = {0 < x < 2: x^2} β a domain restriction: with no default, the value
is undefined outside the conditions, so nothing is drawn theresin(x)cos(y) β a bare expression in x, y is a 2D scalar field, shaded
in the row color where positive and its complement where negative. sin(x)
is a field too (constant along y): the curve is y = sin(x)2+2, sqrt(a), |A - B| β a bare number draws nothing and reads out
= 4 under the row, live with sliders and t; write y = 4 for the lineSliders and animation
a = 2 β a named constant with a slider; other equations can use a, and
it compiles to a uniform so dragging never rebuilds a shader. b = a^2 + t
defines a computed/animated constant(2, 3) / (3, 12, 0) β points. In 2D, coordinates that are plain numbers
or slider names can be dragged on the canvas, and the drag rewrites them:
a = 1; b = 2; (a, b) moves both sliders, (2sin(t), 3) only its literal
height(2cos(t), 2sin(t)) β t is seconds since load, so this point orbitsCalculus
f(x) = x^3 - a x β user-defined functions, inlined symbolicallyf(z) = {re(z) >= 1: 1, f(4 - 3(z^6)^(1/6))} then f(x i - |y|) >= 0 β
a tail-recursive function (every self-call a whole case of its {β¦})
runs as a bounded loop per pixel; this one shades the Koch snowflakey = d/dx f(x) / d^2/dx^2 (x^4) β symbolic Leibniz derivatives; works for
any single-letter variable, nests, and flows through function definitions:
g(x) = d/dx f(x) then y = f(a) + g(a)(x - a) is a live tangent lineProbability
X ~ Normal(0, a) β a random variable; the row plots its density, and
parameters may use sliders. Then P(X < b), P(X > b), or P(-1 < X < 2)
shades that area under the density and shows the numeric probabilityUniform(lo, hi), Exponential(rate), Gamma(shape, rate), Beta(a, b),
ChiSquared(df), StudentT(df) (or T(5)), LogNormal(mu, sigma),
Cauchy(location, scale), Weibull(shape, scale) β exact densities, exact
P(β¦), and median/IQR readouts where heavy tails leave no Ο to reporterf, normalpdf(x, mean, sd), and normalcdf(x, mean, sd) are also plain
functions, so y = normalcdf(x, 0, 1) graphs the CDFVector fields and ODEs
(-y, x) β a tuple depending on x, y is a vector field, rendered as
animated streamlines via GPU line-integral convolution; t works too:
(cos(t)-y, x)grad(x^2 + y^2) (or β(β¦)) β the symbolic gradient as a tuple, so it
plots as a vector field and works in dot(grad(f), (1, 0))dy/dx = x y / y' = sin(x) - y β ODEs plot the slope/direction field
(1, f); click the canvas to drop an RK4 integral curve through that point,
double-click to clear(x', y') = (y, -sin(x)) β a system plots its phase portrait, with the same
click-to-trace trajectoriesSimulation (states)
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/equation-io)<a href="https://allmcps.com/mcp/equation-io"><img src="https://allmcps.com/api/badge/equation-io?style=directory" alt="Equation.io on AllMCPs" /></a>