MCP server

Eraser MCP Server: Render Eraser Diagrams from an AI Agent

The Eraser Diagram Renderer is a Python MCP server and CLI that sends diagram code to the Eraser API and returns an image URL or the image itself.

Run
pip install -e .
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is the Eraser MCP server?

Eraser Diagram Renderer is a small Python MCP server and command line tool. Your AI client writes diagram code in Eraser syntax, calls the render_diagram tool, and gets back an image URL plus a link to edit the diagram in Eraser. It needs your own Eraser API token.

Eraser Diagram Renderer is a Python MCP server that wraps the Eraser diagram API. An AI client writes diagram-as-code in Eraser syntax, and the server renders it into an image you can open or embed.

The same code also ships as a command line tool, so you can test a diagram in a terminal before an agent ever calls it. It needs Python 3.10 or higher and an Eraser API token.

Each render returns an image URL and a link to create an Eraser file, so you can keep editing the result inside Eraser. A warning appears when a diagram uses icons outside the standard Eraser list.

What it changes in your workflow

  • Diagrams from prompts. Ask for a sequence, flowchart, entity relationship or cloud architecture diagram and receive an image.
  • Editable output. The response includes a link to open the diagram in Eraser.
  • Theme control. Choose light or dark, toggle the background and scale the image by 1, 2 or 3.
  • Base64 option. Return the image data itself instead of a URL.
  • Icon checks. Undefined icons are flagged before you ship the diagram.

Who it is for

  • Developers who document systems and want diagrams drafted inside their editor.
  • Teams that already use Eraser and want agents to produce files in the same syntax.
  • Anyone who can host a Python process or a Docker container.

Who it is not for

  • Users without an Eraser API token, since every render calls the Eraser API.
  • People who need pixel-exact brand artwork. These are diagrams, not illustrations.
  • Anyone who changes only the theme or background and expects a fresh image. The README documents a caching bug.

If your diagrams come from infrastructure code, TerraVision MCP reads Terraform instead. For vendor icons on a canvas, try Excalidraw Icons MCP, and codex-tldraw MCP scans a repo for workflow diagrams.

Diagrams belong in docs and posts. To publish the page around them on WordPress, the builder comparison shows which route fits.