archimate-mcp 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- archimate_mcp-0.4.0/LICENSE +21 -0
- archimate_mcp-0.4.0/MANIFEST.in +5 -0
- archimate_mcp-0.4.0/PKG-INFO +103 -0
- archimate_mcp-0.4.0/README.md +75 -0
- archimate_mcp-0.4.0/archimate_mcp/__init__.py +64 -0
- archimate_mcp-0.4.0/archimate_mcp/__main__.py +4 -0
- archimate_mcp-0.4.0/archimate_mcp/agent_server.py +73 -0
- archimate_mcp-0.4.0/archimate_mcp/api/__init__.py +0 -0
- archimate_mcp-0.4.0/archimate_mcp/api/api_client_archi.py +420 -0
- archimate_mcp-0.4.0/archimate_mcp/api/archimate_model.py +562 -0
- archimate_mcp-0.4.0/archimate_mcp/api_client.py +16 -0
- archimate_mcp-0.4.0/archimate_mcp/auth.py +26 -0
- archimate_mcp-0.4.0/archimate_mcp/mcp/__init__.py +0 -0
- archimate_mcp-0.4.0/archimate_mcp/mcp/mcp_archi.py +297 -0
- archimate_mcp-0.4.0/archimate_mcp/mcp_config.json +1 -0
- archimate_mcp-0.4.0/archimate_mcp/mcp_server.py +59 -0
- archimate_mcp-0.4.0/archimate_mcp/models.py +33 -0
- archimate_mcp-0.4.0/archimate_mcp.egg-info/PKG-INFO +103 -0
- archimate_mcp-0.4.0/archimate_mcp.egg-info/SOURCES.txt +32 -0
- archimate_mcp-0.4.0/archimate_mcp.egg-info/dependency_links.txt +1 -0
- archimate_mcp-0.4.0/archimate_mcp.egg-info/entry_points.txt +3 -0
- archimate_mcp-0.4.0/archimate_mcp.egg-info/requires.txt +16 -0
- archimate_mcp-0.4.0/archimate_mcp.egg-info/top_level.txt +7 -0
- archimate_mcp-0.4.0/pyproject.toml +53 -0
- archimate_mcp-0.4.0/requirements.txt +1 -0
- archimate_mcp-0.4.0/scripts/security_sanitizer.py +160 -0
- archimate_mcp-0.4.0/scripts/validate_a2a_agent.py +139 -0
- archimate_mcp-0.4.0/scripts/validate_agent.py +62 -0
- archimate_mcp-0.4.0/scripts/verify_api_integration.py +279 -0
- archimate_mcp-0.4.0/setup.cfg +4 -0
- archimate_mcp-0.4.0/tests/conftest.py +0 -0
- archimate_mcp-0.4.0/tests/test_concept_parity.py +1 -0
- archimate_mcp-0.4.0/tests/test_init_dynamics.py +1 -0
- archimate_mcp-0.4.0/tests/test_startup.py +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Knuckles-Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: archimate-mcp
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: ArchiMate model engine + MCP Server + A2A Server for Agentic AI!
|
|
5
|
+
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Development Status :: 4 - Beta
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Requires-Python: <3.14,>=3.11
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: agent-utilities>=0.41.0
|
|
16
|
+
Provides-Extra: mcp
|
|
17
|
+
Requires-Dist: agent-utilities[mcp]>=0.41.0; extra == "mcp"
|
|
18
|
+
Provides-Extra: agent
|
|
19
|
+
Requires-Dist: agent-utilities[agent,logfire]>=0.41.0; extra == "agent"
|
|
20
|
+
Provides-Extra: all
|
|
21
|
+
Requires-Dist: agent-utilities[agent,logfire,mcp]>=0.41.0; extra == "all"
|
|
22
|
+
Provides-Extra: test
|
|
23
|
+
Requires-Dist: pytest-xdist>=3.6.0; extra == "test"
|
|
24
|
+
Requires-Dist: pytest; extra == "test"
|
|
25
|
+
Requires-Dist: pytest-asyncio; extra == "test"
|
|
26
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# archimate-mcp
|
|
30
|
+
|
|
31
|
+
A self-contained **ArchiMate model engine** exposed as a Model Context
|
|
32
|
+
Protocol (MCP) server and an A2A agent. It gives AI agents full ArchiMate 3.x
|
|
33
|
+
authoring capabilities — create/load/save models, full CRUD on elements,
|
|
34
|
+
relationships, folders, and views (diagrams), query/traverse the model, and
|
|
35
|
+
import/export the **Open Group Model Exchange File Format** so the models open
|
|
36
|
+
directly in [Archi](https://www.archimatetool.com/).
|
|
37
|
+
|
|
38
|
+
Archi has no native server API, so `archimate-mcp` ships its own dependency-light
|
|
39
|
+
engine built on the Python standard library (`xml.etree.ElementTree`).
|
|
40
|
+
|
|
41
|
+
## Table of Contents
|
|
42
|
+
- [Overview](#overview)
|
|
43
|
+
- [Installation](#installation)
|
|
44
|
+
- [Usage](#usage)
|
|
45
|
+
- [Architecture](#architecture)
|
|
46
|
+
- [Deployment](#deployment)
|
|
47
|
+
- [Environment Variables](#environment-variables)
|
|
48
|
+
- [MCP Tools](#mcp-tools)
|
|
49
|
+
|
|
50
|
+
## Overview
|
|
51
|
+
`archimate-mcp` exposes a standardized interface for authoring ArchiMate models via
|
|
52
|
+
the Model Context Protocol. The full ArchiMate vocabulary (Strategy, Business,
|
|
53
|
+
Application, Technology, Physical, Motivation, Implementation layers) and all
|
|
54
|
+
relationship types are supported, with structural validation and round-trip
|
|
55
|
+
Open Exchange Format serialization.
|
|
56
|
+
|
|
57
|
+
## Installation
|
|
58
|
+
```bash
|
|
59
|
+
pip install -e .
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Usage
|
|
63
|
+
Run the MCP server directly:
|
|
64
|
+
```bash
|
|
65
|
+
archimate-mcp
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Or run the agent server:
|
|
69
|
+
```bash
|
|
70
|
+
archimate-agent
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Architecture
|
|
74
|
+
See `/docs` for architectural diagrams and further documentation. The model
|
|
75
|
+
engine lives in `archimate_mcp/api/` (`archimate_model.py`, `api_client_archi.py`),
|
|
76
|
+
the MCP tools in `archimate_mcp/mcp/mcp_archi.py`.
|
|
77
|
+
|
|
78
|
+
## Deployment
|
|
79
|
+
### Bare-metal
|
|
80
|
+
```bash
|
|
81
|
+
archimate-agent
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Docker
|
|
85
|
+
```bash
|
|
86
|
+
docker build -f docker/Dockerfile -t archimate-mcp .
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Environment Variables
|
|
90
|
+
| Variable | Description |
|
|
91
|
+
|----------|-------------|
|
|
92
|
+
| `ARCHI_MODEL_PATH` | Path to the working model file (Open Exchange Format). Default `./model.archimate`. |
|
|
93
|
+
| `ARCHITOOL` | Enable/disable the ArchiMate tool registration. Default `True`. |
|
|
94
|
+
|
|
95
|
+
## MCP Tools
|
|
96
|
+
| Tool | Description |
|
|
97
|
+
|------|-------------|
|
|
98
|
+
| `archi_model` | Model lifecycle: new/load/save/export_exchange/import_exchange/summary |
|
|
99
|
+
| `archi_element` | Element CRUD: add/get/update/delete/list/find |
|
|
100
|
+
| `archi_relationship` | Relationship CRUD + validate: add/get/update/delete/list/validate |
|
|
101
|
+
| `archi_view` | Views (diagrams): create/add_element/add_connection/list/get |
|
|
102
|
+
| `archi_folder` | Organizations (folders): add/move/list |
|
|
103
|
+
| `archi_query` | Query/traversal: neighbors/relationships_of/by_type + vocabulary |
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# archimate-mcp
|
|
2
|
+
|
|
3
|
+
A self-contained **ArchiMate model engine** exposed as a Model Context
|
|
4
|
+
Protocol (MCP) server and an A2A agent. It gives AI agents full ArchiMate 3.x
|
|
5
|
+
authoring capabilities — create/load/save models, full CRUD on elements,
|
|
6
|
+
relationships, folders, and views (diagrams), query/traverse the model, and
|
|
7
|
+
import/export the **Open Group Model Exchange File Format** so the models open
|
|
8
|
+
directly in [Archi](https://www.archimatetool.com/).
|
|
9
|
+
|
|
10
|
+
Archi has no native server API, so `archimate-mcp` ships its own dependency-light
|
|
11
|
+
engine built on the Python standard library (`xml.etree.ElementTree`).
|
|
12
|
+
|
|
13
|
+
## Table of Contents
|
|
14
|
+
- [Overview](#overview)
|
|
15
|
+
- [Installation](#installation)
|
|
16
|
+
- [Usage](#usage)
|
|
17
|
+
- [Architecture](#architecture)
|
|
18
|
+
- [Deployment](#deployment)
|
|
19
|
+
- [Environment Variables](#environment-variables)
|
|
20
|
+
- [MCP Tools](#mcp-tools)
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
`archimate-mcp` exposes a standardized interface for authoring ArchiMate models via
|
|
24
|
+
the Model Context Protocol. The full ArchiMate vocabulary (Strategy, Business,
|
|
25
|
+
Application, Technology, Physical, Motivation, Implementation layers) and all
|
|
26
|
+
relationship types are supported, with structural validation and round-trip
|
|
27
|
+
Open Exchange Format serialization.
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
```bash
|
|
31
|
+
pip install -e .
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
Run the MCP server directly:
|
|
36
|
+
```bash
|
|
37
|
+
archimate-mcp
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or run the agent server:
|
|
41
|
+
```bash
|
|
42
|
+
archimate-agent
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Architecture
|
|
46
|
+
See `/docs` for architectural diagrams and further documentation. The model
|
|
47
|
+
engine lives in `archimate_mcp/api/` (`archimate_model.py`, `api_client_archi.py`),
|
|
48
|
+
the MCP tools in `archimate_mcp/mcp/mcp_archi.py`.
|
|
49
|
+
|
|
50
|
+
## Deployment
|
|
51
|
+
### Bare-metal
|
|
52
|
+
```bash
|
|
53
|
+
archimate-agent
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Docker
|
|
57
|
+
```bash
|
|
58
|
+
docker build -f docker/Dockerfile -t archimate-mcp .
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Environment Variables
|
|
62
|
+
| Variable | Description |
|
|
63
|
+
|----------|-------------|
|
|
64
|
+
| `ARCHI_MODEL_PATH` | Path to the working model file (Open Exchange Format). Default `./model.archimate`. |
|
|
65
|
+
| `ARCHITOOL` | Enable/disable the ArchiMate tool registration. Default `True`. |
|
|
66
|
+
|
|
67
|
+
## MCP Tools
|
|
68
|
+
| Tool | Description |
|
|
69
|
+
|------|-------------|
|
|
70
|
+
| `archi_model` | Model lifecycle: new/load/save/export_exchange/import_exchange/summary |
|
|
71
|
+
| `archi_element` | Element CRUD: add/get/update/delete/list/find |
|
|
72
|
+
| `archi_relationship` | Relationship CRUD + validate: add/get/update/delete/list/validate |
|
|
73
|
+
| `archi_view` | Views (diagrams): create/add_element/add_connection/list/get |
|
|
74
|
+
| `archi_folder` | Organizations (folders): add/move/list |
|
|
75
|
+
| `archi_query` | Query/traversal: neighbors/relationships_of/by_type + vocabulary |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""archimate-mcp: ArchiMate model engine + MCP Server + A2A Server."""
|
|
2
|
+
|
|
3
|
+
import importlib
|
|
4
|
+
import inspect
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
__version__ = "0.2.0"
|
|
8
|
+
__all__: list[str] = []
|
|
9
|
+
|
|
10
|
+
CORE_MODULES = ["archimate_mcp.api_client"]
|
|
11
|
+
OPTIONAL_MODULES = {
|
|
12
|
+
"archimate_mcp.agent_server": "agent",
|
|
13
|
+
"archimate_mcp.mcp_server": "mcp",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _expose_members(module):
|
|
18
|
+
for name, obj in inspect.getmembers(module):
|
|
19
|
+
if (inspect.isclass(obj) or inspect.isfunction(obj)) and not name.startswith(
|
|
20
|
+
"_"
|
|
21
|
+
):
|
|
22
|
+
globals()[name] = obj
|
|
23
|
+
if name not in __all__:
|
|
24
|
+
__all__.append(name)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
for module_name in CORE_MODULES:
|
|
28
|
+
module = importlib.import_module(module_name)
|
|
29
|
+
_expose_members(module)
|
|
30
|
+
|
|
31
|
+
_loaded_optional_modules = {}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _import_module_safely(module_name: str):
|
|
35
|
+
try:
|
|
36
|
+
return importlib.import_module(module_name)
|
|
37
|
+
except ImportError:
|
|
38
|
+
return None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def __getattr__(name: str) -> Any:
|
|
42
|
+
if name == "_MCP_AVAILABLE":
|
|
43
|
+
mcp_key = next((k for k in OPTIONAL_MODULES if "mcp_server" in k), None)
|
|
44
|
+
return _import_module_safely(mcp_key) is not None if mcp_key else False
|
|
45
|
+
if name == "_AGENT_AVAILABLE":
|
|
46
|
+
agent_key = next((k for k in OPTIONAL_MODULES if "agent_server" in k), None)
|
|
47
|
+
return _import_module_safely(agent_key) is not None if agent_key else False
|
|
48
|
+
|
|
49
|
+
for module_name in OPTIONAL_MODULES:
|
|
50
|
+
if module_name not in _loaded_optional_modules:
|
|
51
|
+
module = _import_module_safely(module_name)
|
|
52
|
+
if module is not None:
|
|
53
|
+
_loaded_optional_modules[module_name] = module
|
|
54
|
+
_expose_members(module)
|
|
55
|
+
|
|
56
|
+
module = _loaded_optional_modules.get(module_name)
|
|
57
|
+
if module is not None and hasattr(module, name):
|
|
58
|
+
return getattr(module, name)
|
|
59
|
+
|
|
60
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def __dir__() -> list[str]:
|
|
64
|
+
return sorted(list(globals().keys()) + __all__)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""Graph-based Pydantic AI agent server entry point for archimate-mcp."""
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
import os
|
|
5
|
+
import sys
|
|
6
|
+
import warnings
|
|
7
|
+
|
|
8
|
+
__version__ = "0.2.0"
|
|
9
|
+
|
|
10
|
+
logging.basicConfig(
|
|
11
|
+
level=logging.INFO,
|
|
12
|
+
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
|
13
|
+
)
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
DEFAULT_AGENT_NAME = None
|
|
17
|
+
DEFAULT_AGENT_DESCRIPTION = None
|
|
18
|
+
DEFAULT_AGENT_SYSTEM_PROMPT = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def agent_server():
|
|
22
|
+
"""Start the graph-based Pydantic AI agent server for ArchiMate."""
|
|
23
|
+
from agent_utilities import (
|
|
24
|
+
build_system_prompt_from_workspace,
|
|
25
|
+
create_agent_parser,
|
|
26
|
+
create_agent_server,
|
|
27
|
+
initialize_workspace,
|
|
28
|
+
load_identity,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
global DEFAULT_AGENT_NAME, DEFAULT_AGENT_DESCRIPTION, DEFAULT_AGENT_SYSTEM_PROMPT
|
|
32
|
+
initialize_workspace()
|
|
33
|
+
meta = load_identity()
|
|
34
|
+
DEFAULT_AGENT_NAME = os.getenv(
|
|
35
|
+
"DEFAULT_AGENT_NAME", meta.get("name", "Archi Agent")
|
|
36
|
+
)
|
|
37
|
+
DEFAULT_AGENT_DESCRIPTION = os.getenv(
|
|
38
|
+
"AGENT_DESCRIPTION",
|
|
39
|
+
meta.get("description", "AI agent for ArchiMate modeling operations."),
|
|
40
|
+
)
|
|
41
|
+
DEFAULT_AGENT_SYSTEM_PROMPT = os.getenv(
|
|
42
|
+
"AGENT_SYSTEM_PROMPT",
|
|
43
|
+
meta.get("content") or build_system_prompt_from_workspace(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
warnings.filterwarnings("ignore", message=".*urllib3.*")
|
|
47
|
+
warnings.filterwarnings("ignore", category=DeprecationWarning, module="fastmcp")
|
|
48
|
+
|
|
49
|
+
print(f"{DEFAULT_AGENT_NAME} v{__version__}", file=sys.stderr)
|
|
50
|
+
parser = create_agent_parser()
|
|
51
|
+
args = parser.parse_args()
|
|
52
|
+
|
|
53
|
+
create_agent_server(
|
|
54
|
+
mcp_url=args.mcp_url,
|
|
55
|
+
mcp_config=args.mcp_config or "mcp_config.json",
|
|
56
|
+
host=args.host,
|
|
57
|
+
port=args.port,
|
|
58
|
+
provider=args.provider,
|
|
59
|
+
model_id=args.model_id,
|
|
60
|
+
router_model=args.model_id,
|
|
61
|
+
agent_model=args.model_id,
|
|
62
|
+
base_url=args.base_url,
|
|
63
|
+
api_key=args.api_key,
|
|
64
|
+
custom_skills_directory=args.custom_skills_directory,
|
|
65
|
+
enable_web_ui=args.web,
|
|
66
|
+
enable_otel=args.otel,
|
|
67
|
+
otel_endpoint=args.otel_endpoint,
|
|
68
|
+
otel_headers=args.otel_headers,
|
|
69
|
+
otel_public_key=args.otel_public_key,
|
|
70
|
+
otel_secret_key=args.otel_secret_key,
|
|
71
|
+
otel_protocol=args.otel_protocol,
|
|
72
|
+
debug=args.debug,
|
|
73
|
+
)
|
|
File without changes
|