Mathgraphs Mcp

io.github.architectds由 GitHub 账号 architectds 发布v1.0.0更新于 Oct 24, 2026

Math & statistics graphing, computation, visualization, and validation engine

已验证STDIO仅桌面数据与分析媒体与设计

概览

AI 生成的概览

让助手绘制二维和三维数学图形、计算精确的根、极值与积分,并生成可分享的交互式可视化结果。

可以做什么
提供绘制二维函数、几何图形与形状的工具,可搭建包含网格体、灯光和粒子的交互式三维场景,并把立体展开为可打印的展开图并给出体积和表面积。analyze 工具返回数值结果,例如零点、极值、交点、切线、导数、积分、弧长和最近点,由图形引擎计算而非模型推算。结果以交互式链接、嵌入链接或 SVG 返回,多张图还可打包成幻灯片。
适用场景
当用户要求绘制、作图或可视化数学内容时;当数值结果需要对照实际曲线进行验证时;当几何或三维场景需要渲染时;或者希望得到可分享的交互式链接而不是生成图片时,适合使用。
运行要求
清单显示这是通过 npm 包 mathgraphs-mcp 安装的本地 stdio 进程,而 README 记录了一个位于 mathtalking.com 的远程 Streamable HTTP 端点,无需账号或 API 密钥。未声明任何环境变量或请求头。使用远程端点需要网络访问。
安装前请注意
README 中的远程端点会把提交的表达式和场景描述发送给第三方服务,并返回托管链接;README 说明需要原始数据集的统计页面被有意排除,以便数据留在用户设备上。未描述任何凭据、付费或写入操作。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mathgraphs Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mathgraphs-mcp

MCP server for interactive math graphing, 3D scene building, and presentations.

MathTalking computes and renders interactive visualizations. Plot 2D functions, geometry, and 3D scenes. Results are graph-verified — roots, extrema, and intersections are computed from actual plotted curves, not generated by AI.

Zero install. Browser-native. Every result is a shareable interactive URL.

Quick Start

Claude Desktop

Settings → Connectors → Add custom connector → paste:

https://mathtalking.com/api/mcp

No account or API key needed.

Claude Code

bash
claude mcp add --transport http mathtalking https://mathtalking.com/api/mcp

Any MCP Client

POST https://mathtalking.com/api/mcpContent-Type: application/json

Standard JSON-RPC 2.0 over Streamable HTTP.

Tools

plot_graph — 2D Math Visualization

Plot functions, points, segments, labels, and shapes on an interactive graph. Auto-computes roots, extrema, and intersections for plotted functions.

Input: Array of elements, each with a type and type-specific fields:

TypeFieldsExample
functionexpression (required), color{"type":"function", "expression":"x^2-4", "color":"#4A90D9"}
pointspoints [{x,y}] or [[x,y]] (required), color, label{"type":"points", "points":[{"x":2,"y":0}], "label":"root"}
segmentx1,y1,x2,y2 (required), color, label, arrow, dashed{"type":"segment", "x1":0, "y1":0, "x2":3, "y2":4, "label":"hypotenuse"}
labeltext (required), x,y (required), color, fontSize{"type":"label", "text":"vertex", "x":0, "y":-4}
trianglex1,y1,x2,y2,x3,y3 (required), color, opacity, border{"type":"triangle", "x1":0, "y1":0, "x2":3, "y2":0, "x3":3, "y3":4}
boxx1,y1,x2,y2 (required), height (required), color, opacity{"type":"box", "x1":0, "y1":0, "x2":1, "y2":0, "height":5}
circlecx,cy,radius (required), color, opacity, border{"type":"circle", "cx":0, "cy":0, "radius":3}

Supports: Explicit y=f(x), implicit x²+y²=1, parametric (cos(t),sin(t)), polar, piecewise, domain restrictions.

Optional params:

  • viewport — {xmin, xmax, ymin, ymax}. Set it to your data's own magnitude; values far outside the range are invisible. Omit it and the server auto-fits the window to your elements.
  • title — graph title
  • summary — frosted glass overlay text on the graph
  • gridStyle — "polar" (concentric circles + radial lines), "axes" (axes only), "none" (clean canvas)
  • output — "url" (default, interactive page), "embed" (iframe URL), or "svg" (vector image)
  • animations — array of {tool, name, from, to, loop} for animated parameters
  • theme — "default", "terminal", "wallstreet", "science", or "finance"
  • base_render_id — build on an existing render instead of re-sending every element
  • remove_indices — drop elements from the base render by index (see get_graph)

Returns: Interactive URL with zoom, pan, and sliders. Auto-computed roots, extrema, and intersections in the response text, plus a graph check reporting anything that did not render properly — unreadable expressions, off-screen elements, duplicates, or a blank graph.

analyze — Precise Numerical Results

Compute exact values with the graph engine instead of doing the arithmetic in the model. Returns numbers, not a picture.

Input: type and f (both required), plus whichever fields that analysis needs:

typeExtra fieldsReturns
rootsa, b (range, default -10..10)x-values where f crosses zero
extremaa, blocal minima and maxima
inflectionsa, bpoints where concavity flips
intersectg (second expression), a, bwhere f and g cross
tangentx (point of interest)tangent line at x
normalxnormal line at x
derivativexf'(x)
integrala, bdefinite integral over [a, b]
area_betweeng, a, barea between the two curves
arc_lengtha, bcurve length over [a, b]
closest_pointpx, pypoint on f nearest to (px, py)

Supports: explicit, parametric, polar, and implicit curves. For parametric curves x is the t value.

Draw the result: add plot: true (and an optional title) to get an interactive graph URL and thumbnail with the answer already marked — roots and intersections as labelled points, tangent and normal as lines, closest_point joined to its target, integral and arc_length with their bounds on the curve. Saves transcribing coordinates into a second plot_graph call. The linear-algebra types ignore it.

Example: {"type":"intersect", "f":"x^2-4", "g":"2x-1", "plot":true}

get_graph — Inspect a Graph

Retrieve the elements and viewport of an existing 2D render. Element indices come back in order, so you can pass them to remove_indices.

Input: render_id (the 10-character code in a plot_graph URL).

Returns: element list, viewport, and a one-line summary of what the graph holds.

net_generator — Shape Nets, Volume & Surface Area

Unfold a solid into its printable 2D net, with the measurements worked out.

Input: shape (required) and dims:

shapedims
cylinder, coner, h (cone also accepts r + slant)
cubea
square_pyramida (base edge), h
triangular_prisma (base edge), l (length)
rectangular_prismw, h, d
tetrahedron, octahedron, icosahedron, dodecahedrona (edge)

Spelled-out keys work too (radius, height, side, width, depth, length). Give every dimension the shape needs — a partial set is rejected, so a mistyped key cannot quietly produce the wrong net. Omit dims entirely to get an example at default sizes; the reply says when it did that.

Optional: unit (cm | m | in | ft), title, output (url | embed | svg).

Returns: the net as an interactive URL and thumbnail, plus volume, surface area, and the substituted formulas.

Example: {"shape":"cylinder", "dims":{"r":3,"h":5}, "unit":"cm"} → volume 141.37 cm³, surface area 150.80 cm², printable net.

A sphere has no planar net — use plot_3d for spheres.

plot_3d — 3D Scene Builder

Create interactive 3D scenes with shapes, lights, and particle effects. Build anything — snowmen, castles, robots, geometry.

Input: Array of elements, each with a type and type-specific fields:

TypeFieldsExample
meshshape (required), color, opacity, position, rotation, metalness, roughness, wireframe{"type":"mesh", "shape":"sphere", "r":1, "metalness":0.8, "position":[0,1,0]}
compoundcompound (required), position, scale, color{"type":"compound", "compound":"house", "color":"#cc2222", "position":[0,0,0]}
surfaceexpression (required), color, xmin, xmax, ymin, ymax, resolution{"type":"surface", "expression":"sin(x)*cos(y)", "color":"#4A90D9"}
lightkind (point/spot/directional), color, intensity, position{"type":"light", "kind":"point", "color":"#ff8800", "position":[0,5,0]}
particlepreset (fire/smoke/rain/snow/sparkle/mist/splash), position, count, spread{"type":"particle", "preset":"fire", "position":[3,0,0]}
waterposition, size, waveHeight, color, opacity{"type":"water", "position":[0,0,0], "size":10}
line3dfrom [x,y,z], to [x,y,z], color{"type":"line3d", "from":[0,0,0], "to":[1,1,1]}
label3dtext, position [x,y,z]{"type":"label3d", "text":"origin", "position":[0,0,0]}
text3dtext, position [x,y,z], color, fontSize{"type":"text3d", "text":"HELLO", "position":[0,2,0], "color":"#ff0000", "fontSize":1}

11 mesh shapes: cube, box, sphere, cylinder, cone, tetrahedron, octahedron, dodecahedron, icosahedron, torus, prism

36 compound presets: tree, house, castle_tower, fence, campfire, rock, stairs, arch, table, chair, person, car, road_sign, windmill, dog, cat, flag, bed, sofa, bookshelf, lamp, desk, bush, flower, bridge, lamp_post, bench, apartment, skyscraper, shopping_center, hospital, ambulance, truck, boat, traffic_light, water_tower, fountain

Color-driven building styles: Buildings change architectural style based on color — red=Chinese, blue=modern, yellow=cozy, green=eco, brown=rustic. The actual hex color is used for materials; the hue just selects the geometry variant.

Shape params: cube→size, box→width/height/depth, sphere→r, cylinder→r/h, cone→r/h, torus→r/tube, prism→points/h

Material params: metalness (0=plastic, 1=chrome), roughness (0=mirror, 1=matte), wireframe (boolean)

Animation: animate: {type, speed, ...} — spin, bounce, orbit, waypoint, follow (tracks player)

Physics & controls: physics: {velocity, mass}, controls: {type:"wasd", speed}, collision: true

Incremental building:

  • base_render_id — build on an existing scene (appends elements, creates new URL)
  • remove_indices — remove elements by index from base (use get_3d to see indices)

Optional: title, summary, camera {position, target}, skybox (day/sunset/night/overcast), gravity (-9.8), follow (boolean)

Returns: Interactive 3D URL with orbit controls + inline PNG thumbnail for chat preview.

get_3d — Inspect 3D Scene

Retrieve the full element list of an existing 3D render by ID. Use this before base_render_id to see what a scene contains and plan modifications.

Input: render_id (the short alphanumeric ID from the URL)

Returns: All elements with their properties (shapes, positions, colors, materials).

create_show — Slideshow Presentations

Bundle multiple plot_graph results into a slideshow. Create each slide with plot_graph first, then pass the render IDs here.

Input: title (string), slide_ids (array of render IDs from plot_graph results), summary (optional per-slide text).

Returns: Interactive show URL with prev/next navigation, keyboard controls, and auto-play.

Example Prompts

  1. "Plot x³ - 3x + 1 and show me its roots and extrema" → Interactive graph with computed roots (x ≈ -1.88, 0.35, 1.53) and extrema
  2. "Build a village with a red house, trees, and a campfire" → 3D scene with Chinese-style house (red color triggers Chinese variant), PNG thumbnail in chat
  3. "Plot the surface z = sin(x) * cos(y)" → Interactive 3D surface plot with orbit controls
  4. "Create a 3-slide show: y=x², y=x²+2 shifted up, y=(x-3)² shifted right" → Slideshow URL with navigation

The Same Tools on the Web

Several MathTalking pages are the browser form of a call you can make here. If you are answering the same question an agent would, the tool call is usually faster than pointing someone at the page — and both compute with the same engine.

Web pageEquivalent call
Quadratic Roots, Root Finderanalyze {type: "roots", f}
Function Intersectionanalyze {type: "intersect", f, g}
Tangent Calculatoranalyze {type: "tangent", f, x}
Area Between Curvesanalyze {type: "area_between", f, g, a, b}
Arc Lengthanalyze {type: "arc_length", f, a, b}
Closest Pointanalyze {type: "closest_point", f, px, py}
3D Net Generator and the shape-net pagesnet_generator {shape, dims}

Add plot: true to an analyze call to get the same picture the page shows.

Statistics pages that need a dataset (histogram, regression, box plot, distribution fitting) have no tool call on purpose: sending raw rows through a model costs a token per data point. Point people at mathtalking.com/stat, where the data stays on their device.

When to Use

  • User asks to graph, plot, or visualize any math
  • You need to verify a mathematical result visually
  • Geometry needs precise rendering (triangles, circles, constructions)
  • 3D scenes — shapes, architecture, creative builds
  • Multi-step explanations — create slides, bundle into shows
  • You want a shareable URL the user can explore interactively

Why Use This (vs generating images)

  • Computed, not hallucinated — roots from actual zero-crossings, not LLM guesses
  • Interactive — zoom, pan, rotate (3D), adjust sliders
  • Shareable — permanent URL for every result
  • Token efficient — ~500 output tokens vs ~3,000-5,000 for generated code
  • 9 languages — en, zh, zh-TW, ja, ko, es, fr, de, pt-BR

Quick Test

bash
# 2D graphcurl -X POST https://mathtalking.com/api/mcp \  -H 'Content-Type: application/json' \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"plot_graph","arguments":{"elements":[{"type":"function","expression":"sin(x)","color":"#4A90D9"}]}}}'
# 3D scenecurl -X POST https://mathtalking.com/api/mcp \  -H 'Content-Type: application/json' \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"plot_3d","arguments":{"elements":[{"type":"mesh","shape":"sphere","r":1,"color":"#ff0000","position":[0,1,0]}]}}}'

Links

来源:README.md,提交 1701fec

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分