A local MCP server plugin for Astah Professional, a UML modeling tool, that enables AI agents to:
- Design systems and represent them as UML models.
- Explain UML models.
- Generate source code from UML models, and vice versa.
- Create UML diagrams from hand-drawn sketches.
This plugin experimentally implements a programmatic tool calling mode, inspired by the "Programmatic Tool Calling" idea described in this Anthropic article.
Prompts:
I. Design a simple library management system and draw a class diagram in Astah to illustrate its structure.
II. Based on the contents of the Astah model, draw a sequence diagram to illustrate the behavior of borrowing a book.
III. Based on the contents of the Astah model, draw an activity diagram to illustrate the behavior of returning a book.
IV. Based on the contents of the Astah model, draw a state machine diagram to illustrate the state transitions of a book.
Model: Opus 5 / Effort: Medium / Total time: approx. 13 min
| I | II | III | IV |
Model: Astra / Effort: Medium / Total time: approx. 19 min
| I | II | III | IV |
Model: Grok 4.6 / Effort: Medium / Total time: approx. 41 min
| I | II | III | IV |
AI agent The AI agents below have been tested, but no guarantee is implied. From personal experience, Claude Code works well for UML modeling, followed byCodex CLI .
- Claude Code
- Codex CLI
- Grok Build
- Antigravity CLI
- Cursor IDE
- Antigravity IDE
- Kiro IDE
Astah Pro v12.0 or later* Note:* This MCP server only connects to AI agents running on the same machine as Astah Professional. According to Astah's terms of use, using Astah via an AI agent is permitted only if you hold a valid license and access it exclusively for your own use with your licensed Astah. Allowing a non-licensed third party to operate Astah via such an agent is strictly prohibited. For details, please refer to the FAQ (English /Japanese ) orcontact Change Vision (the developer of Astah) directly.
- Class Diagram
- Sequence Diagram
- Activity Diagram
- State Machine Diagram
- Use Case Diagram
- Mind Map
- Requirement Diagram
- Composite Structure Diagram (with some limitations)
- Communication Diagram (query-only)
- ER Diagram (query-only)
Download from here and install.
Download the plugin JAR file (astah-pro-mcp-x.x.x.jar), drop it into Astah, and restart Astah (see here). If the mcp tab appears in the Extra View, the plugin is installed.
This plugin experimentally implements a programmatic tool calling mode (port 8888), inspired by the "Programmatic Tool Calling" idea described in this Anthropic article. The direct tool calling mode also remains available (port 18888). Unless you have a specific reason to choose otherwise, specify port 8888.
| Mode | Port | Exposed tools |
|---|---|---|
| Programmatic tool calling | 8888 |
83 |
| Direct tool calling | 18888 |
398 |
Claude Code #
Run this command for project scope in your project directory:
claude mcp add --transport http --scope project astah-pro-mcp http://127.0.0.1:8888/mcp
Or run this command for user scope:
claude mcp add --transport http --scope user astah-pro-mcp http://127.0.0.1:8888/mcp
Codex CLI #
Create .codex/config.toml under your project directory or your user directory with:
[mcp_servers.astah-pro-mcp]
transport = "http"
url = "http://127.0.0.1:8888/mcp"
Grok Build #
Run this command for project scope in your project directory:
grok mcp add --scope project --transport http astah-pro-mcp http://127.0.0.1:8888/mcp
Or run this command for user scope:
grok mcp add --scope user --transport http astah-pro-mcp http://127.0.0.1:8888/mcp
Antigravity CLI #
Create .agents/mcp_config.json under your project directory (workspace scope) or edit ~/.gemini/config/mcp_config.json (global scope) with:
{
"mcpServers": {
"astah-pro-mcp": {
"serverUrl": "http://127.0.0.1:8888/mcp"
}
}
}
By default, the plugin listens on 8888 (programmatic tool calling mode) and 18888 (direct tool calling mode). Each port can be overridden with an environment variable:
| Mode | Environment variable |
|---|---|
| Programmatic tool calling | ASTAH_PRO_MCP_PORT_FOR_PROGRAMMATIC |
| Direct tool calling | ASTAH_PRO_MCP_PORT_FOR_DIRECT |
Remember to update your AI agent settings to the same port numbers.
Start Astah Pro Some AI agents try to connect to the MCP server on startup, so start Astah Pro first . 2. Start AI agents Each time an AI agent establishes a new session with the Astah Pro MCP server, you will be asked to confirm. Review the details and click 'Connect' . 3. Send prompts to the AI agents
If you want to disable the Astah Pro MCP plugin in Astah, click [Plugin] > [Installed Plugins], select the Astah Pro MCP entry in the plugin list dialog, click Disable, and then restart Astah.
If you want to build and test locally:
Set up your Astah plugin development environment (see here ). 2. Build:
astah-build
Run tests (change astahPath to your Astah Pro installation path):Run all tests on Windows 11:
astah-mvn test -DastahPath="C:\Program Files\astah-professional"
Run specific tests on Windows 11:
astah-mvn test -DastahPath="C:\Program Files\astah-professional" -Dtest="**/editor/*Test"
This project is currently experimental. The design and implementation may undergo breaking changes.
Astah project data and logs will be shared with the AI agent. For Astah projects that contain confidential information, either refrain from using this MCP server or use it only with appropriate safeguards (e.g., enabling opt-out settings for AI agents).
Because this MCP server edits model elements and diagrams, we recommend committing your Astah project to a Git repository or making copies before and during use so you can revert if necessary.
Some model or diagram information (e.g., certain properties) cannot be viewed or edited via the provided tool functions. Use the Astah GUI directly for those.
This MCP server prioritizes providing the information AI agents need and does not implement token-saving measures. We recommend using AI agents on a flat-rate plan rather than pay-as-you-go.
Just as when working with source code, AI agents can make mistakes or misinterpret model elements and diagrams.
Some tool functions provided by this MCP server return excerpts from the OMG UML 2.5.1 and OMG SysML 1.7 specifications and from FIPS PUB 184 IDEF1X. The OMG UML/SysML specifications are licensed as stated at the beginning of each document. FIPS PUB 184 IDEF1X is a U.S. Government work (NIST) and is not subject to copyright protection in the United States (17 U.S.C. §105), but may be subject to foreign copyright. When content from these specifications/documents is returned by tool functions, it is explicitly indicated as an excerpt. "Mind Map" is a registered trademark of The Buzan Organisation Limited.
One tool function returns UML diagram consistency rules quoted from the papers below. Copyright of these rule statements remains with their authors and publishers; they are quoted with attribution and explicitly indicated as excerpts.
- Torre, Damiano, et al. "A systematic identification of consistency rules for UML diagrams." Journal of Systems and Software 144 (2018): 121-142.
- Torre, Damiano, et al. "How consistency is handled in model-driven software engineering and UML: an expert opinion survey." Software Quality Journal 31.1 (2023): 1-54.
All other works, including source code, are copyrighted by Takaaki Teshima and released under the MIT-0 license.
This project is developed independently by the authors in their personal capacities and is not affiliated with any university, institution, or employer.
Please open an issue. Because this project is in an experimental phase and may introduce breaking changes, we aren't accepting pull requests until the design and implementation stabilize. Thank you for your understanding.
If you need private support, contact takaaki.teshima.dev [at] gmail.com (replace [at] with @). It could become a paid project; I may still be able to support you/it.