MCP Server

Introduction

The Eraser MCP server connects AI coding agents to Eraser, letting them generate, create, read, and update files, documents, and diagrams in your Eraser workspace — all through the Model Context Protocol.

The remote server is hosted at https://app.eraser.io/api/mcp and uses OAuth for authentication. When you first connect, your MCP client will open a browser window to authorize access to your Eraser account.

Capabilities

  • Diagram generation — Describe a system, flow, or architecture in natural language and have your agent generate a complete Eraser diagram
  • Document generation — Generate rich documents from code, conversations, or natural language and save them directly to your Eraser workspace
  • File management — Create, list, read, update, and archive Eraser files
  • Diagram management — Create, read, update, and delete individual diagrams within files

Installation and setup

The remote MCP server URL for all clients is:

https://app.eraser.io/api/mcp

After adding the server, your client will prompt you to authenticate via OAuth in the browser.

Claude Code

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

Claude

  1. Open claude.ai and navigate to Settings > Integrations
  2. Under MCP servers, click Add integration
  3. Enter the server URL: https://app.eraser.io/api/mcp
  4. Click Allow access to authenticate

Cursor

Add to your Cursor MCP config (.cursor/mcp.json):

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

Codex

codex mcp add eraser --url https://app.eraser.io/api/mcp

VS Code

Add to your VS Code MCP config (.vscode/mcp.json):

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

GitHub Copilot

Add to your VS Code settings.json:

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

Tools

Account

ToolDescription
whoamiReturns the current user's profile, active team, and list of all teams. Call this before any file or diagram operation.
listTeamsLists all teams the user is a member of.
selectTeamSelects which team to use for subsequent file and diagram operations.

Files

All file tools require a team to be selected first (whoamiselectTeam).

ToolDescription
createFileCreate a new file with a document and/or diagram elements. Agents can generate documents and diagrams from a description and persist them as Eraser files in one step.
listFilesList files in the workspace with pagination, sorting, and filtering by folder or author.
getFileGet a file's metadata, document content, and diagram elements.
updateFileUpdate a file's title, document content, folder, or link access settings.
archiveFileSoft-delete a file. Can be restored from the trash in the Eraser UI.

Diagrams

ToolDescription
listDiagramsList all diagrams in a file with their type and code.
createDiagramGenerate and add a new diagram to an existing file. Specify diagramType and the diagram code.
getDiagramGet a specific diagram's type and code.
updateDiagramReplace a diagram's code — useful for iterating on a generated diagram.
deleteDiagramPermanently delete a diagram from a file. Cannot be undone.

FAQ

Is it free?

Yes. The Eraser MCP server is free to use and subject to the same free tier limits as in-app usage.

What can the Eraser MCP do?

With the Eraser MCP, agents can generate diagrams and documents from natural language, create and manage files in your Eraser workspace, and read or update existing diagrams and documents. See Capabilities and Tools above for the full list.

Which server and auth method should I use?

The remote server with OAuth is recommended for most users. It requires no installation and authenticates securely via your Eraser account. API key auth and the local server are better suited for agentic pipelines where users may not have their own Eraser accounts, or for environments that don't support OAuth.

Does it support API key authentication?

Yes. Obtain an API key from your Eraser account settings and pass it as the ERASER_API_KEY environment variable.

Does it support a local MCP server?

Yes. The local server is available as @eraserlabs/eraser-mcp on npm and uses API key authentication. Replace your_api_key with your key from Eraser account settings.

Claude Code:

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

Then set ERASER_API_KEY in your environment or Claude Code's MCP env config.

Cursor / VS Code / GitHub Copilot — add to your MCP config:

{
  "mcpServers": {
    "eraser": {
      "command": "npx",
      "args": ["-y", "@eraserlabs/eraser-mcp"],
      "env": {
        "ERASER_API_KEY": "your_api_key"
      }
    }
  }
}

Where are files and diagrams saved?

All files and diagrams are saved to your Eraser account and accessible from the Eraser app.

Who can access files I've generated?

Only you. Files are created under your identity and are private by default. You can change the access level and link sharing settings at any time, either in the Eraser app or via the updateFile tool.

Does it use AI credits?

Yes. Calls that involve AI generation will use AI credits from your Eraser account.

Something missing?

Reach out to the Eraser team at [email protected].