egon-mcp

v0.2.0
egon-mcp Checked 2 days ago Published 16 days ago

MCP server for creating, editing, validating and rendering Egon.io domain stories

An MCP server that lets AI agents create, edit, check and render domain stories for Egon.io, the Domain Storytelling modeler, plus a skill that teaches agents how to use it. An agent can turn a process description into a numbered domain story, save it as an .egn file, render it as SVG, and open it in the Egon web app. The files import into the public app at egon.io (Egon 3.2.1) and into the upcoming Egon 4. modules/egon.io is read-only reference material and stays unchanged (ADR 2). The server's build reads Egon's built-in icons from it, so check it out before building.

Summary extracted from the README.

Egon-MCP

An MCP server that lets AI agents create, edit, check and render domain stories for Egon.io, the Domain Storytelling modeler, plus a skill that teaches agents how to use it.

An agent can turn a process description into a numbered domain story, save it as an .egn file, render it as SVG, and open it in the Egon web app. The files import into the public app at egon.io (Egon 3.2.1) and into the upcoming Egon 4.

Layout

egon-mcp/
├── egon_mcp/          # The MCP server (Node, TypeScript)
├── skills/
│   └── egon-mcp-skill # Agent skill that documents how to use the server
├── docs/adr/          # Architecture decision records
├── examples/          # Stories generated by the server
├── .claude/           # Project agents and skills for Claude Code
└── modules/
    └── egon.io/       # Git submodule: reference copy of Egon.io (fork of WPS/egon.io)

modules/egon.io is read-only reference material and stays unchanged (ADR 2). The server's build reads Egon's built-in icons from it, so check it out before building.

Install

Egon-MCP needs Node 22.18 or newer. Install it with npm:

npm install -g egon-mcp

Or with Homebrew, which brings its own Node:

brew install dervism/tap/egon-mcp

Both put an egon-mcp command on your path. To run it without installing, use npx -y egon-mcp wherever the examples below say egon-mcp.

Claude Code

claude mcp add egon -- egon-mcp --root /path/to/your/stories

--root is the folder the server may read and write stories in. Inside this repository the server is already registered in .mcp.json, with examples/ as its workspace.

Claude Desktop

Add the server to claude_desktop_config.json (on macOS in ~/Library/Application Support/Claude/):

{
  "mcpServers": {
    "egon": {
      "command": "npx",
      "args": ["-y", "egon-mcp", "--root", "/path/to/your/stories"]
    }
  }
}

Claude Desktop does not start servers with your shell's PATH, so it may not find npx, or node when Node comes from Homebrew or a version manager such as nvm. Then install egon-mcp with npm or Homebrew and give both full paths:

{
  "mcpServers": {
    "egon": {
      "command": "/full/path/to/node",
      "args": ["/full/path/to/egon-mcp/dist/index.js", "--root", "/path/to/your/stories"]
    }
  }
}

After npm install -g egon-mcp, which node prints the first path, and the second is dist/index.js in the folder that echo "$(npm root -g)/egon-mcp" prints. After a Homebrew install, echo "$(brew --prefix)/bin/node" prints the first, and the second is dist/index.js in the folder that echo "$(brew --prefix egon-mcp)/libexec/lib/node_modules/egon-mcp" prints.

The skill

The skill tells an agent which tool to use when and how to write good domain stories. It comes with the package. Link it into your personal Claude Code skills after an npm install:

mkdir -p ~/.claude/skills && ln -sfn "$(npm root -g)/egon-mcp/skill" ~/.claude/skills/egon-mcp-skill

Or after a Homebrew install:

mkdir -p ~/.claude/skills && ln -sfn "$(brew --prefix egon-mcp)/share/egon-mcp/skill" ~/.claude/skills/egon-mcp-skill

Both links keep working after upgrades. If ~/.claude/skills/egon-mcp-skill is a copied folder rather than a link, remove it first. With a Node version manager, the npm link points into the Node version you installed with; after installing egon-mcp under another version, run the command again. Inside this repository Claude Code loads the skill from skills/egon-mcp-skill by itself.

From source

To work on the server, clone the repository with its submodule and build it:

git clone --recurse-submodules https://github.com/dervism/egon-mcp.git
cd egon-mcp/egon_mcp && npm ci && npm run build

Then use node /path/to/egon-mcp/egon_mcp/dist/index.js in place of egon-mcp, and link skills/egon-mcp-skill into ~/.claude/skills.

What the server offers

  • 27 tools to create, open, edit, validate, narrate, lay out, export and save stories, and to open them in Egon. See the tool reference.
  • Resources: every open story as .egn, Markdown narrative and SVG, the icon catalog, and a notation guide.
  • Prompts: model_domain_story, review_domain_story, domain_story_interview and find_subdomains.

Server options:

Flag Environment Default Meaning
--root <dir> EGON_MCP_ROOT current directory The only directory file tools may read and write. The file system root is refused, so set it when your client starts servers in /.
--egon-url <url> EGON_APP_URL https://egon.io/app/ Egon instance that open_in_egon links to.
--egon-format egon3|egon4 EGON_FORMAT egon3 .egn layout. egon3 works in egon.io 3.x and Egon 4; egon4 also keeps title and scope in the file.

The client starts egon-mcp when a session needs it and stops it when the session ends, so nothing runs in the background. Open stories live in the server's memory until you save them with save_story, and unsaved changes are lost when the server stops.

open_in_egon serves the story from 127.0.0.1 and links Egon to it. The link works on the same machine while the server runs. Some browsers ask for permission to reach local addresses or block it; then save the story and use "Import file" in Egon.

Development

See egon_mcp/DEVELOPMENT.md. Decisions are recorded in docs/adr. The project agent independent-reviewer reviews changes without any context from the conversation that produced them.

Working with the egon.io submodule

The submodule has two remotes:

Remotes are local git config and are not cloned. After a fresh clone, add upstream again:

git -C modules/egon.io remote add upstream https://github.com/WPS/egon.io.git

Move the pinned commit to the latest main of the fork:

git submodule update --remote modules/egon.io
git add modules/egon.io
git commit -m "Bump egon.io reference"

Sync the fork with the original project:

cd modules/egon.io
git fetch upstream
git merge upstream/main
git push origin main

License

Egon-MCP is free software under the GNU General Public License, version 3 or (at your option) any later version (GPL-3.0-or-later). These are the same terms as Egon (ADR 14). The full text is in LICENSE.

Copyright (C) 2026 Dervis Mansuroglu.

Egon-MCP uses the Egon.io application and file format:

Egon.io, GPLv3.0

Copyright © 2018-present WPS - Workplace Solutions GmbH

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Note about use of icons

The built-in icons that the build reads from modules/egon.io come from Egon under the GPL version 3 or (at your option) any later version. Most of them are based on Google's Material Icons, which are licensed under the Apache License 2.0.