Skip to content

MCP Tools

The ArchiSpark MCP server exposes 38 tools, 2 prompts and 2 resources allowing an LLM (Claude, GPT-4…) to explore and fully modify an ArchiMate model — elements, relationships, views, workspaces, import/export.

Endpoint: http://localhost:3001/mcp/
Transport: Streamable HTTP (MCP protocol 2025-03-26), stateless — no mcp-session-id, every request gets a fresh server instance (safe for serverless, no sticky sessions needed)
Auth: Bearer token — a personal API token (api_tokens table, same tokens used by the REST API). Generate one from Mon profil → Tokens API → Nouveau token in the web UI.

The token resolves the calling user’s organization membership and all tools operate on that organization’s active workspace. Write tools (create_*, update_*, delete_*, activate_workspace, import_model) require org role owner/admin or platform role platform_admin — org members get a read-only error. See Authentication & Authorization for the full role model.

Configuration in Claude Code:

Terminal window
claude mcp add archimate \
http://localhost:3001/mcp/ \
--transport http \
--header "Authorization: Bearer <token>"

Configuration for Vercel deployment:

Terminal window
claude mcp add archimate-vercel \
https://archispark-mcp-server.vercel.app/mcp/ \
--transport http \
--header "Authorization: Bearer <token>"

All mutations are persisted to PostgreSQL immediately. save_model is a no-op kept for compatibility.


Prompts inject semantic context into the LLM session. Call them at the start of a modeling session.

Injects the complete ArchiMate 3.1 rules: layers, element types, relationship semantics, essential modeling rules and the recommended workflow. Call this first before any modeling session.

// No arguments
// Returns: a user message with the full ArchiMate 3.1 guide

Step-by-step guide for creating a view for a specific viewpoint, including the right elements to place and the recommended workflow.

ArgumentTypeDescription
viewpointstringTarget ArchiMate viewpoint (e.g. "Application Structure", "Layered")

Resources are static documents the LLM can read on demand without polluting every tool response.

JSON document containing all 8 ArchiMate layers with their element types grouped by category (active, behavioural, passive) and descriptions. Read before create_element to choose the correct type.

JSON document with the semantics, direction and a concrete example for each of the 11 ArchiMate relationship types. Read before create_relationship to choose the most precise type.


1. archimate-modeling-guide ← load ArchiMate rules
2. get_model_info ← verify active workspace
3. create_element × N ← create all elements
4. create_relationship × N ← link elements
5. create_view ← create view with a viewpoint
6. create_node × N ← place elements in the view
7. create_connection × N ← represent relationships visually
8. render_view ← visualize the SVG result

Returns global metadata of the active workspace model. Call first to verify which model is loaded.

// Input: none
// Output: { identifier, name, version, element_count, relationship_count, view_count, property_definition_count }

Returns ArchiMate 3.1 element types present in the model, grouped by layer and category. Each layer entry includes the types actually present in the model alongside the full ArchiMate 3.1 type list.

// Input: none
// Output:
{
"layers": {
"Business": {
"description": "Couche métier: acteurs, processus, services...",
"active": ["BusinessActor"], // present in model
"behavioral": ["BusinessProcess"],
"passive": ["BusinessObject"],
"all_active": ["BusinessActor", "BusinessRole", ...],
"all_behavioral": ["BusinessProcess", "BusinessFunction", ...],
"all_passive": ["BusinessObject", "Contract", ...]
},
"Application": { "..." },
"...": {}
},
"note": "Lists without 'all_' prefix contain only types present in this model."
}

Lists elements with optional filters.

ParameterTypeDescription
element_typestring?Filter by ArchiMate 3.1 type (e.g. ApplicationComponent)
namestring?Filter by name (substring, case-insensitive)

Returns the full detail of an element: type, name, documentation and custom properties. The identifier is the identifier field returned by list_elements or create_element.

ParameterTypeDescription
element_idstringElement identifier

Creates a new ArchiMate element. The response includes a hints field with the element’s layer and suggested next steps.

ParameterTypeDescription
namestringElement name
typestringArchiMate 3.1 type (see full list)
documentationstring?Description
propertiesarray?[{ property_definition_ref, value }]
// Response includes hints:
{
"identifier": "e-abc",
"type": "ApplicationComponent",
"hints": {
"layer": "Application",
"next_steps": [
"Link to the BusinessProcess it serves via Serving",
"Link to TechnologyService supporting it via Realization",
"Create a view with viewpoint 'Application Structure' or 'Application Usage'"
]
}
}

If the type is invalid, the error message lists all valid types grouped by ArchiMate layer.


Updates an existing element (only provided fields are modified). Changing the type may invalidate existing relationships — verify with get_element_relationships after modification.

ParameterTypeDescription
element_idstringIdentifier
namestring?New name
typestring?New ArchiMate 3.1 type
documentationstring?New documentation (null to clear)
propertiesarray?Replaces all properties

Deletes an element and all its relationships (incoming and outgoing). The element is also removed from all views. Irreversible.

ParameterTypeDescription
element_idstringIdentifier

Returns all relationships (incoming and outgoing) for an element. Useful to check semantic consistency before modifying or deleting an element.

ParameterTypeDescription
element_idstringElement identifier

Returns identifiers of elements placed in at least one view. Useful to distinguish modeled elements (with visual representation) from orphans (in the model but without a view).

// Input: none
// Output: ["id-abc", "id-def", …]

Lists the ArchiMate relationship types present in the model, enriched with semantics and direction for each type.

// Output:
[
{
"type": "Assignment",
"description": "Lies an active element to the behavioural element it performs.",
"direction": "active → behavioural (same layer or Physical layer)"
},
{
"type": "Realization",
"description": "A more concrete element implements a more abstract one.",
"direction": "lower layer → upper layer"
}
]

Lists relationships with optional filters.

ParameterTypeDescription
rel_typestring?ArchiMate relationship type (e.g. Assignment, Realization)
source_id_filterstring?Filter by source element identifier
target_idstring?Filter by target element identifier

Returns the full detail of a relationship by its identifier: type, source, target, name and properties.

ParameterTypeDescription
relationship_idstringRelationship identifier

Creates a relationship between two existing elements. The response includes a hints field with the semantics of the chosen type and suggested next steps.

ParameterTypeDescription
typestringRelationship type: Assignment, Realization, Serving, Access, Composition, Aggregation, Influence, Triggering, Flow, Specialization, Association
sourcestringSource element identifier
targetstringTarget element identifier
namestring?Optional label
access_typestring?For Access: Access, Read, Write, ReadWrite
is_directedboolean?For Association
influence_strengthstring?For Influence: +, ++, -, -- or any string
// Response includes hints:
{
"identifier": "r-abc",
"type": "Serving",
"hints": {
"semantics": "An element provides its capability for use by another.",
"direction": "provider → consumer",
"next_steps": [
"Visualize in a view via create_connection (with the returned relationship_id)",
"Check consistency with get_element_relationships on the source element"
]
}
}

Choosing the most precise type matters: Assignment / Realization / Serving carry richer semantics than Association. Consult the resource archimate://relationships for guidance.


Updates an existing relationship (only provided fields are modified).

ParameterTypeDescription
relationship_idstringIdentifier
namestring?New name
typestring?New ArchiMate 3.1 type
sourcestring?New source element identifier
targetstring?New target element identifier
access_typestring?New access type
is_directedboolean?New directed flag
influence_strengthstring?New influence strength

Deletes a relationship. Visual connections associated with it in views are also removed.

ParameterTypeDescription
relationship_idstringIdentifier

Lists all views with their viewpoint, node count and connection count.


Returns the detail of a view: viewpoint, placed nodes and represented connections. Use render_view to get the visual SVG.

ParameterTypeDescription
view_idstringView identifier

Creates a new view (diagram). A viewpoint defines the audience and expected element types. The response includes next_steps hints.

ParameterTypeDescription
namestringView name
viewpointstring?ArchiMate viewpoint (use list_viewpoints to get valid values)
documentationstring?Description
// Response includes next_steps:
{
"identifier": "v-xyz",
"name": "Payment Architecture",
"next_steps": [
"Call list_elements to find elements to display",
"Call create_node for each element to place in this view",
"Call create_connection to represent relationships visually",
"Call render_view to visualize the result"
]
}

Use the prompt create-viewpoint-view for a full step-by-step guide.


Updates the name, viewpoint or documentation of a view (only provided fields are modified).

ParameterTypeDescription
view_idstringView identifier
namestring?New name
viewpointstring?New viewpoint (null to clear)
documentationstring?New documentation (null to clear)

Deletes a view. The underlying elements and relationships are not deleted — only the visual representation is removed.

ParameterTypeDescription
view_idstringView identifier

Generates an SVG image of a view. Returns base64-encoded SVG as an image content block. Call after placing elements and connections.

ParameterTypeDescription
view_idstringView identifier

Returns the sorted list of all 28 ArchiMate 3.1 viewpoints. Key viewpoints: Layered (cross-cutting), Application Structure, Business Process Cooperation, Technology, Implementation and Deployment, Motivation, Strategy, Capability Map.

// Input: none
// Output: ["Application Cooperation", "Application Platform", …]

See the full viewpoints table for audience and typical elements.


Places an element in a view as a visual node. The same element can appear in multiple views independently. Coordinates and dimensions are in pixels; if omitted, the element is placed automatically.

ParameterTypeDescription
view_idstringView identifier
element_idstringElement to represent
x, ynumber?Position in pixels
w, hnumber?Dimensions in pixels (default ~120×55)

Updates the position, size or display name of a node. The display name overrides the element name in this view only.

ParameterTypeDescription
view_idstringView identifier
node_idstringNode identifier
x, ynumber?New position
w, hnumber?New dimensions
namestring?Override display name (null to reset to element name)

Removes a node from a view. The underlying element is not deleted — it remains visible in other views.

ParameterTypeDescription
view_idstringView identifier
node_idstringNode identifier

Creates a visual connection between two nodes in a view. Link it to an ArchiMate relationship via relationship_id to carry semantic meaning. Without relationship_id, the connection is purely visual.

ParameterTypeDescription
view_idstringView identifier
sourcestringSource node identifier
targetstringTarget node identifier
relationship_idstring?Underlying ArchiMate relationship (recommended)
namestring?Label
source_sidestring?Edge attachment: top, right, bottom, left
target_sidestring?Edge attachment: top, right, bottom, left

Updates a connection in a view (only provided fields are modified).

ParameterTypeDescription
view_idstringView identifier
connection_idstringConnection identifier
namestring?New label (null to clear)
sourcestring?New source node
targetstring?New target node
source_sidestring?New edge side
target_sidestring?New edge side

Removes a connection from a view. The underlying ArchiMate relationship is not deleted.

ParameterTypeDescription
view_idstringView identifier
connection_idstringConnection identifier

Lists all custom property definitions in the model. Properties add custom metadata to elements and relationships.


Returns the detail of a property definition.

ParameterTypeDescription
idstringDefinition identifier

Creates a custom property definition.

ParameterTypeDescription
namestringName
typestring?string (default), boolean, date, number, enumeration

Updates a property definition (only provided fields are modified).

ParameterTypeDescription
idstringIdentifier
namestring?New name
typestring?New type

Deletes a definition and removes the property from all elements and relationships.

ParameterTypeDescription
idstringIdentifier

Lists all workspaces and indicates which one is active. Each workspace is an independent ArchiMate model.

// Input: none
// Output: [{ id, name, active }, …]

Activates a workspace. All subsequent operations (elements, relationships, views) target this workspace.

ParameterTypeDescription
workspace_idstringWorkspace identifier (from list_workspaces)

Exports the active model as Open Exchange XML (ArchiMate 3.1, The Open Group standard). The XML can be imported into other ArchiMate tools (Archi, etc.).

// Input: none
// Output: XML string (text content block)

Imports a model from Open Exchange XML. Replaces the content of the active workspace.

ParameterTypeDescription
xmlstringXML content (Open Exchange Format, archimate3_Model.xsd)

Returns the model metadata after import.


No-op — all changes are persisted to PostgreSQL immediately. Kept for compatibility with clients that call it explicitly.


Human: Create an Application Architecture view for the Payment domain.
→ archimate-modeling-guide()
← [ArchiMate 3.1 rules loaded]
→ get_model_info()
← { identifier: "m-1", name: "Payment Platform", element_count: 0, … }
→ create_element(name="Payment Service", type="ApplicationComponent")
← { identifier: "e-abc", hints: { layer: "Application", next_steps: ["Link to BusinessProcess via Serving", …] } }
→ create_element(name="Payment DB", type="DataObject")
← { identifier: "e-def", … }
→ create_relationship(type="Access", source="e-abc", target="e-def", access_type="ReadWrite")
← { identifier: "r-ghi", hints: { semantics: "A behavioural element reads or writes a passive element.", … } }
→ create_view(name="Payment Architecture", viewpoint="Application Structure")
← { identifier: "v-xyz", next_steps: ["Call create_node for each element", …] }
→ create_node(view_id="v-xyz", element_id="e-abc", x=100, y=100, w=120, h=55)
→ create_node(view_id="v-xyz", element_id="e-def", x=280, y=100, w=120, h=55)
→ create_connection(view_id="v-xyz", source="n-1", target="n-2", relationship_id="r-ghi")
→ render_view(view_id="v-xyz")
← [SVG image]