Enhanced GeoGebra MCP
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., "@Enhanced GeoGebra MCP Construct a circle through points (0,0), (1,0), and (0,1) and report its center and radius."
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.
Enhanced GeoGebra MCP
Local stdio MCP server for a self-hosted GeoGebra Web bundle.
enhanced-geogebra-mcp wraps a modified GeoGebra 5.0 Web bundle under geogebra/. At runtime it starts a localhost-only static asset server, launches headless Chromium with Playwright, loads public/harness.html, obtains the GeoGebra JavaScript API through GGBApplet.appletOnLoad, and exposes a stdio MCP server.
What Is Enhanced
The bundled applet is expected to expose evalCommandResult(command), a modified API added to the GeoGebra runtime. ggb_eval_command uses that method directly.
Plain evalCommand only reports whether a command was accepted. evalCommandResult returns structured command feedback:
ok: whether the command succeeded.result: command result text returned by the applet.labels: labels created by the command.error: command error text when execution fails.objectCount: construction object count after execution.apiMethod: the runtime method used by the server.
There is no fallback to evalCommand. If evalCommandResult is not present in the loaded bundle, command evaluation fails.
Related MCP server: geogebra-mcp
Command Feedback Flow
flowchart LR
A["Choose construction command"] --> B["ggb_query_commands<br/>GeoGebra 5.0 reference"]
B --> C["ggb_eval_command<br/>call evalCommandResult"]
C --> D{"Command feedback"}
D -->|"ok"| E["Use labels/result"]
D -->|"error"| F["Revise command"]
F --> B
E --> G["ggb_get_objects / ggb_export_image<br/>verify construction"]ReAct Comparison
The main difference is where command observation is produced. A conventional GeoGebra MCP wrapper built around evalCommand usually needs a follow-up inspection step to infer what changed. This package returns command-level observation from ggb_eval_command itself.
For LLM-driven construction loops, the practical advantages are:
Command execution results add useful context immediately after each action.
Failed commands return error text, giving the model a concrete correction signal and reducing unsupported guesses.
flowchart TD
subgraph T["Conventional GeoGebra MCP"]
direction LR
T1["Thought<br/>choose command"] --> T2["Action<br/>evalCommand"]
T2 --> T3["Limited feedback<br/>accepted / rejected"]
T3 --> T4["Extra inspection<br/>objects / XML / image"]
T4 --> T5["Infer result, labels, or error"]
end
T5 --> V["VS"]
subgraph E["enhanced-geogebra-mcp"]
direction LR
E1["Thought<br/>choose command"] --> E2["Action<br/>ggb_eval_command"]
E2 --> E3["Execution feedback<br/>ok + result + labels"]
E3 --> E4["Error feedback<br/>concrete message on failure"]
E4 --> E5["Revise command with more context"]
end
V --> E1GeoGebra 5.0 Scope
The bundled runtime is GeoGebra 5.0. Commands passed to ggb_eval_command should use GeoGebra 5.0 command names, syntax, and signatures. Use ggb_query_commands when command syntax is uncertain.
Requirements
Node.js 20 or newer.
npm or npx.
An MCP client that supports stdio servers.
Chromium, either installed by Playwright or provided through an existing Chrome/Chromium executable.
The modified GeoGebra 5.0 runtime that exposes
evalCommandResult. The npm package includes this runtime undergeogebra/.
Distribution
This package is released under the MIT license and is intended for npm distribution as enhanced-geogebra-mcp.
This project is not affiliated with GeoGebra. The bundled runtime targets GeoGebra 5.0; command syntax, command reference data, and runtime behavior should stay aligned with that version.
Security And Network
The MCP server communicates over stdio.
GeoGebra assets are served from a localhost-only static asset server.
Browser execution is handled by Playwright and Chromium.
Browser requests to non-local URLs are blocked by default.
--allow-external-networkexplicitly allows non-local browser requests.Large state payloads can be returned as MCP resources when they exceed
--max-inline-chars.
Known Limitations
Command syntax is scoped to GeoGebra 5.0.
Commands should use English GeoGebra input-bar names.
The server needs a working Chromium runtime.
Versioning And Compatibility
The npm package version tracks the MCP wrapper.
The bundled GeoGebra runtime is currently GeoGebra 5.0.
The bundled command reference is expected to match GeoGebra 5.0 syntax.
Runtime or API changes that affect
evalCommandResultshould be documented inCHANGELOG.md.
Install From npm
After the package is published to npm, it can be used directly with npx:
npx -y enhanced-geogebra-mcp --helpMCP client config example:
{
"mcpServers": {
"enhanced-geogebra": {
"command": "npx",
"args": ["-y", "enhanced-geogebra-mcp"]
}
}
}It can also be installed globally:
npm install -g enhanced-geogebra-mcp
enhanced-geogebra-mcp --helpGlobal install config example:
{
"mcpServers": {
"enhanced-geogebra": {
"command": "enhanced-geogebra-mcp",
"args": []
}
}
}The server uses Playwright to launch Chromium. If no compatible Chromium is available, install one:
npx playwright install chromiumOr point the server at an existing Chrome/Chromium executable with GEOGEBRA_MCP_BROWSER_EXECUTABLE or --browser-executable-path.
Install From Source
npm install
npx playwright install chromium
npm run buildRun As MCP Stdio Server
npm run build
node dist/index.jsClient config example:
{
"mcpServers": {
"enhanced-geogebra": {
"command": "node",
"args": ["/absolute/path/to/enhanced-geogebra-mcp/dist/index.js"]
}
}
}After packaging:
npm run pack:localThe package exposes an enhanced-geogebra-mcp binary.
Tools
ggb_create_session: create a headless GeoGebra applet session.ggb_eval_command: evaluate English GeoGebra input-bar commands through the bundled applet'sevalCommandResultAPI. The payload includesok,result,labels,error,objectCount, andapiMethod. This package expects that modified API to exist.ggb_query_commands: search the bundled GeoGebra command reference by name, syntax, examples, tags, or scope.ggb_eval_cas: evaluate a CAS expression.ggb_get_objects: list construction objects and compact metadata.ggb_get_state: return XML, base64.ggb, or fileJSON state.ggb_set_state: load XML, base64.ggb, or fileJSON state.ggb_export_image: export PNG, SVG, or screenshot.ggb_set_view: set common view options.ggb_reset: clear or reset the construction.ggb_close_session: close a browser-backed session.ggb_list_sessions: list active sessions.
Options
enhanced-geogebra-mcp --helpNotable options:
--geogebra-root <path>: use a different GeoGebra bundle root.--asset-port <port>: pin the internal localhost asset server port.--browser-executable-path <path>: use an existing Chrome/Chromium executable.--allow-external-network: allow the browser to load non-local URLs. Default is blocked.--max-inline-chars <count>: return larger payloads as MCP resources.
You can also set GEOGEBRA_MCP_BROWSER_EXECUTABLE=/path/to/chrome-or-chromium when Playwright's bundled Chromium is not installed.
Smoke Checks
npm run smoke:harness
npm run smoke:mcpsmoke:harness tests the local asset server plus browser runtime directly. smoke:mcp builds the package, starts the stdio MCP server as a child process, and calls the core tools through an MCP client.
Available Tools
12 toolsggb_close_sessionClose GeoGebra SessionB
Close a GeoGebra browser page and release its session resources.
Inputs: sessionId (required).
ggb_create_sessionCreate GeoGebra SessionC
Create a headless GeoGebra applet session backed by the local bundled GeoGebra Web assets.
Inputs: xml, width, base64, height, +4 more.
ggb_eval_casEvaluate CAS ExpressionC
Evaluate a GeoGebra CAS expression in a session.
Inputs: sessionId (required), expression (required).
ggb_eval_commandEvaluate GeoGebra CommandB
Evaluate one or more English GeoGebra input-bar commands in a session through the bundled applet's evalCommandResult API, returning ok/result/labels/error metadata.
Inputs: command (required), sessionId (required).
ggb_export_imageExport GeoGebra ImageC
Export the active view as PNG, SVG, or full-applet screenshot.
Inputs: sessionId (required), dpi, scale, format, +2 more.
ggb_get_objectsGet GeoGebra ObjectsB
List construction objects with compact type, value, definition, command, visibility, and defined-state metadata.
Inputs: sessionId (required), type.
ggb_get_stateGet GeoGebra StateA
Get the current construction state as XML, base64 .ggb data, or fileJSON. Large results are returned as MCP resources.
Inputs: sessionId (required), format, inlineLimit.
ggb_list_sessionsList GeoGebra SessionsA
List active GeoGebra sessions managed by this MCP server.
Inputs: no named parameters.
ggb_query_commandsQuery GeoGebra CommandsA
Search the bundled GeoGebra command reference by command name, localized name, syntax, examples, tags, and scopes. Use this before ggb_eval_command when command syntax is uncertain.
Inputs: query (required), topN, scope, locale.
ggb_resetReset GeoGebra SessionC
Clear the construction or reset the applet to its initial construction.
Inputs: sessionId (required), mode.
ggb_set_stateSet GeoGebra StateB
Replace or load construction state from XML, base64 .ggb data, or fileJSON.
Inputs: content (required), sessionId (required), format.
ggb_set_viewSet GeoGebra ViewC
Set common view options such as coordinate system, grid visibility, axes visibility, or perspective.
Inputs: sessionId (required), axesVisible, coordSystem, gridVisible, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose: session lifecycle (create/list/close), evaluation (command vs CAS), state inspection/modification (objects/state), view configuration, export, and reset. There is no functional overlap between any pair of tools.
All tools consistently use the snake_case convention with the common 'ggb_' prefix followed by a verb_noun pattern (e.g., create_session, get_state, set_view). The naming is uniform and predictable.
With 12 tools, the server is well-scoped for a GeoGebra integration. Each tool covers a distinct aspect of the domain, and the count is within the ideal 3-15 range.
The tool surface provides comprehensive coverage of GeoGebra interactions: session management, command and CAS evaluation, command reference, object/state retrieval, state loading, view options, image export, and reset. No critical workflow appears missing.
Maintenance
Related MCP Connectors
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
A remote MCP server to convert HTML documents (URL or raw source) to PDF or screenshots
MCP server to assist with JxBrowser development.
QuLab MCP remote server (Streamable HTTP) for computational science and lab tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceBrowser-based geometry processing server that enables AI agents to create geometry, run analysis and operators, inspect results, and take screenshots via MCP.23 npm6MIT
- AlicenseAqualityBmaintenanceAn MCP server that lets an AI (Claude Desktop, Claude Code, Cursor, …) draw and edit plane-geometry figures directly on GeoGebra Calculator (https://www.geogebra.org/calculator).1187 npmMIT
- AlicenseNot gradedqualityAmaintenanceThis server enables MCP clients and AI agents to perform browser automation with Playwright-compatible tools, persistent profiles, extensions, proxy support, and humanized interactions. It can be run via npm or Docker over stdio or Streamable HTTP for web research, automation, testing, and regional QA.431 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to drive a browser-hosted GeoGebra applet over stdio, creating canvases and running commands, CAS evaluations, object queries, view control, screenshots, and PNG/SVG/PDF exports. It serves a local viewer page that connects back via SSE, so geometry, algebra, and 3D constructions can be built and inspected from any stdio-capable client.GPL 3.0