MCP-Desmos
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP-Desmos Plot y = sin(x) and y = cos(x) from -2π to 2π"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP-Desmos
MCP server for Desmos graphing calculator. Generate publication-quality 2D math graphs from LaTeX expressions, capture screenshots of shared Desmos graphs, and extract expression data — all through the Model Context Protocol.
Overview
MCP-Desmos launches a headless Chromium browser via Playwright, loads the Desmos API v1.11, and exposes three tools over MCP's stdio transport. An AI assistant (Claude Desktop, Claude Code, or any MCP client) can call these tools to plot functions, inequalities, parametric curves, labeled points, and more — returning PNG images or structured JSON.
Tech stack: TypeScript, Node.js, Playwright, Desmos API v1.11, Zod, MCP SDK.
Related MCP server: Draw.io MCP Server
Features
plot_graph— Render any combination of LaTeX expressions into a Desmos graph (PNG).load_desmos_url— Screenshot an existing shared Desmos calculator URL.get_expressions— Extract LaTeX expressions, colors, and graph settings from a Desmos URL.
Prerequisites
Node.js >= 18
npm
Installation
git clone https://github.com/AndresMuelas2004/MCP-Desmos.git
cd MCP-Desmos
npm install
npx playwright install chromium
npm run buildConfiguration
Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"desmos": {
"command": "node",
"args": ["/absolute/path/to/MCP-Desmos/dist/index.js"]
}
}
}Claude Code
claude mcp add desmos node /absolute/path/to/MCP-Desmos/dist/index.jsTools
plot_graph
Generate a Desmos-style 2D graph from mathematical expressions. Returns a PNG image.
Parameters
Parameter | Type | Required | Default | Description |
| array | yes | — | List of expressions to plot (see below) |
| array | no | — | Individual labeled points |
| object | no | auto-fit | Viewport bounds ( |
| string | no | — | Label for the x-axis |
| string | no | — | Label for the y-axis |
| number | no | 800 | Image width in pixels |
| number | no | 800 | Image height in pixels |
| boolean | no | true | Show grid lines |
| boolean | no | false | Use degrees instead of radians |
Expression object:
Field | Type | Required | Description |
| string | yes | LaTeX expression (e.g. |
| string | no | Hex color (e.g. |
| string | no | Label text |
| boolean | no | Whether to show the label |
|
| no | Line style |
| number | no | Line width (default ~2.5) |
|
| no | Point rendering style |
| boolean | no | Hide this expression |
Point object:
Field | Type | Required | Description |
| string | yes | Point as LaTeX (e.g. |
| string | no | Hex color |
| string | no | Label text |
| boolean | no | Whether to show the label |
load_desmos_url
Load an existing Desmos calculator graph from its URL and capture a screenshot.
Parameter | Type | Required | Default | Description |
| string | yes | — | Desmos calculator URL (e.g. |
| number | no | 800 | Screenshot width in pixels |
| number | no | 800 | Screenshot height in pixels |
get_expressions
Extract mathematical expressions, settings, and configuration from a Desmos calculator URL. Returns JSON.
Parameter | Type | Required | Description |
| string | yes | Desmos calculator URL |
Usage Examples
Plot a simple function:
"Plot y = sin(x) and y = cos(x) from -2pi to 2pi"
Visualize data points with a curve fit:
"Plot these sensor readings as points: (0, 1.2), (1, 2.8), (2, 4.1), (3, 8.3) and overlay y = 1.2 * e^(0.6x)"
Extract and re-plot a shared graph:
"Get the expressions from https://www.desmos.com/calculator/4wkcpbapnv and re-plot them with a dark color scheme"
Development
npm run build # Compile TypeScript to dist/
npm run dev # Watch mode (recompile on changes)
npm start # Run the compiled serverProject Structure
MCP-Desmos/
├── src/
│ ├── index.ts # MCP server entry point, tool registration
│ ├── browser.ts # Playwright browser singleton
│ ├── desmos-renderer.ts # Desmos API integration, rendering logic
│ └── tools/
│ ├── plot-graph.ts # plot_graph tool (Zod schema + handler)
│ ├── load-url.ts # load_desmos_url tool
│ └── get-expressions.ts # get_expressions tool
├── templates/
│ └── calculator.html # HTML template with Desmos API script
├── capture-diagrams.mjs # Standalone diagram generator utility
├── package.json
└── tsconfig.jsonLicense
MIT
Available Tools
3 toolsget_expressionsA
Extract the mathematical expressions, settings, and configuration from an existing Desmos calculator URL. Returns the list of expressions with their LaTeX, colors, and graph bounds.
Inputs: url (required).
load_desmos_urlA
Load an existing Desmos calculator graph from its URL and capture a screenshot. Useful for viewing shared graphs or graphs created on desmos.com.
Inputs: url (required), width, height.
plot_graphA
Generate a Desmos-style 2D graph from mathematical expressions. Returns a PNG image. Supports functions, parametric curves, inequalities, points with labels, custom colors, axis labels, and viewport bounds. Ideal for scientific/engineering plots.
Inputs: expressions (required), width, bounds, height, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools are mostly distinct: plot_graph creates a new graph, get_expressions extracts data from a URL, and load_desmos_url screenshots a URL. However, get_expressions and load_desmos_url both take a Desmos URL and could be confused by an agent unsure whether it needs extracted expressions or a visual screenshot.
All tools use snake_case and follow a clear verb_noun pattern: get_expressions, plot_graph, load_desmos_url. The compound noun in load_desmos_url is still consistent with the pattern.
Three tools is a reasonable, focused set for a Desmos integration covering graph creation, expression extraction, and URL loading. It is slightly thin, but each tool serves a clear purpose without bloat.
The set covers reading expressions, rendering a graph, and loading a URL, but it lacks a way to generate or share a Desmos URL from expressions and has no update/modify operation for existing expressions. These are notable gaps for a full Desmos workflow.
Maintenance
Related MCP Connectors
Create interactive 2D and 3D graphs with validated equations, shareable links, and PNG previews.
AI-callable calculators and engineering models with real formulas. No hallucinated math.
Turn AI chat answers into interactive Bento cards, checklists, diagrams, charts, and calculators.
Renders interactive Chart.js charts and dashboards inline in AI conversations.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables mathematical formula visualization and analysis through interactive plotting, formula validation, and symbolic computation. Supports both Desmos API integration and local matplotlib rendering for creating 2D mathematical graphs.510Apache 2.0
- AlicenseBqualityBmaintenanceEnables AI agents to programmatically create, modify, and analyze Draw.io diagrams through the Model Context Protocol. Supports generating architectural diagrams, flowcharts, and visualizations with bidirectional communication between AI systems and Draw.io.131,500MIT
- AlicenseCqualityDmaintenanceEnables AI models to create and manage various types of diagrams (flowcharts, UML, network diagrams, etc.) via the Model Context Protocol.266MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI to interact with GeoGebra for mathematical visualization, offering over 25 tools for geometry, functions, algebra, and more.MIT