Back to MCP Servers

Eraser MCP Server

Official Eraser MCP server for generating, editing, and managing technical diagrams and docs in an Eraser workspace from AI agents.

Design by Eraser Labs OAuth2 active
Overview

The Eraser MCP server connects AI coding agents to Eraser, the diagram-as-code and docs platform for engineering teams. It lets agents generate diagrams from natural language, iterate on them, and read, create, update, search, or export files, diagrams, folders, and presets in an Eraser workspace, all through the Model Context Protocol.

The server supports the diagram types Eraser is known for: cloud architecture diagrams, sequence diagrams, flowcharts, entity relationship diagrams, and BPMN swimlane diagrams. Each generation returns a structured response that includes a direct image URL, an editor URL for human edits, and the underlying Eraser DSL syntax, so agents can hand off polished diagrams while keeping the source code in sync with the project.

It is offered as a provider-hosted remote server at https://app.eraser.io/api/mcp with OAuth authentication, and as a local npm package (@eraserlabs/eraser-mcp) that authenticates with an API key. The remote OAuth flow is recommended for most users; the local server is useful for CI or environments where stdio transport is preferred.

Tools

Tool Description
selectTeam Set the active team for multi-team Eraser accounts so subsequent calls target the right workspace.
generate Create a new diagram from a natural language prompt. Returns image URL, editor URL, and Eraser DSL code.
generateEdit Iteratively refine an existing diagram using a follow-up prompt.
get Retrieve metadata for a specific file, diagram, folder, or preset.
list Paginate through resources in the workspace with optional filtering.
search Full-text search across files, diagrams, and documents in the Eraser workspace.
create Create new files, diagrams, folders, or AI presets in the workspace.
update Modify an existing resource's name, content, or metadata.
delete Archive or remove a resource from the workspace.
export Render a diagram to PNG or JPEG at a specified scale.
Setup Guide

Remote server (recommended)

The hosted server authenticates via OAuth against your Eraser account, no install needed.

Claude.ai: Settings, Integrations, Add MCP server, paste https://app.eraser.io/api/mcp.

Claude Code:

claude mcp add --transport http eraser https://app.eraser.io/api/mcp

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "eraser": {
      "url": "https://app.eraser.io/api/mcp"
    }
  }
}

VS Code / GitHub Copilot (.vscode/mcp.json):

{
  "servers": {
    "eraser": {
      "type": "http",
      "url": "https://app.eraser.io/api/mcp"
    }
  }
}

Local server (API key)

Install and run via npx, authenticating with an Eraser API key.

claude mcp add eraser -- npx -y @eraserlabs/eraser-mcp

Set the API key:

export ERASER_API_KEY=your_eraser_api_key

An API key removes watermarks and enables higher-resolution exports. Generate one from your Eraser account settings.

Use Cases
  • Generate AWS or GCP architecture diagrams directly from Terraform or Helm configs found in a repo
  • Auto-create sequence diagrams that document how microservices interact based on code analysis
  • Search an Eraser workspace for an existing diagram, update it with new components, and export a fresh PNG
  • Spin up entity relationship diagrams from a Prisma or SQL schema and store them in a project folder
  • Keep diagram-as-code in version control while agents render and refresh embedded images on each change
Example Prompts
  • "Generate a cloud architecture diagram for the services defined in infra/main.tf and save it to the Platform folder in Eraser."
  • "Find the auth flow sequence diagram in my Eraser workspace and update it to include the new SSO provider."
  • "Create an ERD from the models in prisma/schema.prisma and export it as a 2x PNG."
  • "Search Eraser for any flowchart mentioning 'checkout' and list the editor URLs."
  • "Diagram how the API gateway, auth service, and Postgres database interact, then return the editor link."
Pros
  • Official, provider-maintained server from Eraser Labs with OAuth-based remote access
  • Broad tool surface: not just diagram generation but full CRUD over files, folders, and presets
  • Returns image URL, editor URL, and underlying DSL code so humans can refine what agents produce
  • Supports all major Eraser diagram types including architecture, sequence, ERD, flowchart, and BPMN
Limitations
  • Watermark-free output and higher-resolution exports require an Eraser API key or paid plan
  • Workspace write operations depend on your Eraser account permissions, which can limit multi-team setups
  • Diagram quality still depends on prompt detail; complex systems often need follow-up generateEdit calls
Alternatives
  • Mermaid (open-source diagram-as-code that several community MCP servers wrap)
  • Excalidraw MCP servers for hand-drawn-style diagrams
  • PlantUML based MCP servers for UML-centric workflows