# haison8x/geogebra-mcp [Health: Active]

**Category:** 🎓 Education  
**Repository:** https://github.com/haison8x/geogebra-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 248  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/haison8x-geogebra-mcp

## Description
Draw and edit plane-geometry figures live in GeoGebra Calculator: run constructions, inspect objects, verify properties (angles, collinearity, midpoints) and take screenshots so the AI can fix its own figure.

## Tools
Capabilities this server exposes over MCP:

- **ggb_run_commands** — Run GeoGebra commands on the live figure, in order (English command names, e.g. "A = (-1, 6)", "M = Midpoint(B, C)", "ShowLabel(a, false)", "SetVisibleInView(h, 1, false)", "Delete(P)"). Assigning to an existing name REDEFINES that object and its dependents update. Returns, per command: ok, created/removed objects, warnings (undefined objects, names not created) and, for failures, hints about the likely cause.
- **ggb_get_state** — List the objects currently in the figure: name, type, definition, value, point coordinates, visibility, dependsOn (parents) and usedBy (objects that would change or be deleted with it). Always call this before fixing a figure: the user may have edited it by hand.
- **ggb_screenshot** — Return a PNG image of the drawing area so you can check the figure visually (overlapping labels, figure off-screen, wrong shape). Set full_window to capture the whole GeoGebra window including the algebra panel.
- **ggb_evaluate** — Evaluate GeoGebra expressions against the current figure WITHOUT adding objects, to verify the construction. Examples: "Angle(B, A, C)", "Distance(B, M) == Distance(M, C)", "AreCollinear(A, H, O)", "AreParallel(Line(A, D), Line(B, C))", "Radius(omega)", "Area(poly1)".
- **ggb_set_style** — Change how objects look: color, visibility, label, caption (text shown instead of the name), thickness, line style, point size, fill, fixed.
- **ggb_delete** — Delete objects. WARNING: everything that depends on them is deleted too (see usedBy in ggb_get_state). To change an object, redefine it with ggb_run_commands instead.
- **ggb_clear** — Remove every object to start a new figure (can be reverted with ggb_undo).
- **ggb_undo** — Revert the last change(s) made through this server (run_commands, set_style, delete, clear, snapshot restore).
- **ggb_snapshot** — Save the current figure under a name, restore a saved one, or list saved names. Snapshots live while the server runs.
- **ggb_fit_view** — Zoom/pan so every visible point and circle fits in the drawing area (1:1 axis ratio). Optionally show/hide axes and grid.
- **ggb_export** — Save the figure to a local file: "ggb" (GeoGebra file, can be opened again in GeoGebra) or "png" (image).

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "geogebra-mcp": {
    "command": "npx",
    "args": ["-y","geogebra-mcp"]
  }
}
```

## Documentation

## What haison8x/geogebra-mcp does

haison8x/geogebra-mcp lets an MCP-compatible AI client create and edit plane-geometry figures in GeoGebra Calculator. It is intended for workflows where an agent needs more than one-way command submission: the agent can construct a figure, read the resulting objects, check geometric conditions, inspect an image, and make corrections.

The project drives GeoGebra at https://www.geogebra.org/calculator rather than embedding GeoGebra software. It is an independent project and is not affiliated with or endorsed by GeoGebra GmbH. GeoGebra’s own licensing terms apply to use of the service and to figures created with it.

## How it works

The first tool call opens a Chrome or Edge window containing GeoGebra Calculator. The user can watch the construction and interact with the figure manually. Playwright evaluates calls to GeoGebra’s `ggbApplet` JavaScript API inside the page, avoiding simulated mouse clicks.

Commands are sent through GeoGebra’s asynchronous command interface. The server adds diagnostics around GeoGebra’s results, including hints for unknown names or commands, unbalanced brackets, undefined results, reserved names, and ambiguous two-point intersections. If the page is closed or reloaded, a later tool call reopens it and restores the last known figure. Server-managed XML history provides undo for API changes.

The server also exposes the `geogebra://rules` and `geogebra://commands` resources, along with a `draw_geometry_problem` prompt.

## Setup and configuration

Use Node.js 20 or newer and Google Chrome or Microsoft Edge. If neither browser is available, install Playwright’s Chromium build with `npx playwright install chromium`.

A package-based MCP configuration can launch the server with:

```json
{
  "mcpServers": {
    "geogebra": {
      "command": "npx",
      "args": ["-y", "geogebra-mcp"]
    }
  }
}
```

Claude Code can install the project as a plugin or register it with `claude mcp add geogebra -- npx -y geogebra-mcp`. From source, clone the repository, run `npm install` and `npm run build`, then point the MCP client at `dist/index.js`.

Configuration variables include `GGB_BROWSER`, which selects Chrome, Edge, or Playwright Chromium; `GGB_HEADLESS`, which enables headless mode with `1`; `GGB_PROFILE_DIR`, which controls the persistent browser profile; and `GGB_URL`, which sets the page opened by the server. The default profile preserves the GeoGebra login, and each profile supports one server instance.

## Tools and capabilities

- `ggb_run_commands` executes ordered GeoGebra commands and reports results, created or removed objects, warnings, and failure hints. Assigning an existing name redefines that object.
- `ggb_get_state` returns object types, definitions, values, coordinates, visibility, and dependency relationships.
- `ggb_evaluate` checks expressions without creating objects, including angle and collinearity tests.
- `ggb_screenshot` captures the drawing area or the complete window as a PNG.
- `ggb_set_style` changes appearance properties such as color, labels, captions, visibility, line style, thickness, point size, fill, and fixed status.
- `ggb_delete`, `ggb_clear`, and `ggb_undo` remove objects, start a new figure, or revert server-managed changes.
- `ggb_snapshot` saves, restores, and lists named in-memory versions.
- `ggb_fit_view` frames visible points and circles, maintains a 1:1 ratio, and controls axes and grid display.
- `ggb_export` saves figures as `.ggb` or `.png` files.

## Limitations and notes

Snapshots and undo history exist only in memory while the server is running. The code is MIT-licensed, but that license does not cover GeoGebra. GeoGebra is free for non-commercial use; commercial uses such as paid materials, training, or services require a GeoGebra license. Shared figures, images, and `.ggb` files should retain the attribution “Made with GeoGebra®” and a link to https://www.geogebra.org.

_Full upstream README: https://allmcps.com/mcp/haison8x-geogebra-mcp/readme_

