Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
262:mcpserver [2026/10/23 10:47] – [Installation] Fuhl, Alexander262:mcpserver [2026/10/28 10:46] (current) – Policnik, Florian
Line 5: Line 5:
 Through our MCP server, AI systems can access process data managed in Stages for various purposes and use cases. Through our MCP server, AI systems can access process data managed in Stages for various purposes and use cases.
  
-In the currently provided MCP solution Stages provides access to a **valid versions of workspaces only**.+In the currently provided MCP solution Stages provides access to **valid versions of workspaces only**. 
 ===== What it offers ===== ===== What it offers =====
  
Line 11: Line 12:
  
 Currently it offers 10 tools to browse and search workspaces and elements. This is subject to change. Currently it offers 10 tools to browse and search workspaces and elements. This is subject to change.
 +
 ===== Availability ===== ===== Availability =====
  
-The Stages MCP server is integrated into Stages 26.2.0.0 and later. +The Stages MCP server is integrated into Stages 26.2.0.0 and later. 
- +
-<placeholder for authentication setup instructions>+
  
 Note: Stages 7.12.5.1 or later and Stages 26.1.0.0 or later had a beta implementation of this feature that worked quite differently. Note: Stages 7.12.5.1 or later and Stages 26.1.0.0 or later had a beta implementation of this feature that worked quite differently.
  
 +===== Configuration =====
  
-==== Configure credentials =====+Authentication is currently available only through an external identity provider (IdP), such as Microsoft Entra ID or Keycloak.
  
-Access to the MCP server and Stages data is protected. A [[262:api-tokens|personal Stages API token]] is required to access the REST API. The user must have the following privileges:+==== IdP configuration ====
  
-  * Process Modeler +To enable MCP, add a resource configuration to your IdP, typically by creating an app or client registration. If you already use OIDC, you can use that configuration.
-  * CollectorData Read and Create permission +
-  * Permission according to the data collector (e.g. Process Read)+
  
 +Add the custom scope to the client:
  
 +''stages:mcp:read''
  
-==== Configure AI system =====+Depending on your IdP, you may find this under "Expose an API" or "Client scopes". In Microsoft Entra ID, specify the Application ID URI using this format:
  
-Configuration depends on Stages version+''<nowiki>https://stages.example.com/stages/api/1/mcp</nowiki>''
  
-=== Stages 7.12 / Tomcat 9 ===+Use this value as the audience in the configuration. In other systems, the audience may be the application's client ID. Stages checks this value against the JWT's audience claim.
  
-Currently Stages MCP server supports Server-Sent Events (SSE) protocol for Tomcat 9 version. The endpoint is ''/mcp/sse'', e.g.:+==== Stages configuration ====
  
-''<nowiki>https://stages.example.com/mcp/sse</nowiki>''+Add the following to the ''<authentication>'' section in ''config.xml'':
  
-The API token that was created must be provided to the MCP server via the header ''StagesToken''. +<code xml> 
- +<method type="JWT" name="myIdp"> 
-An example MCP configuration: +    <properties> 
- +        <property name="discoveryURI" value="${idp.myIdp.oidc.discovery.url}" /> 
-<code javascript> +        <property name="audience" value="${idp.myIdp.oidc.audience}" /> 
-{ +        <property name="usernameAttribute" value="upn" /> 
-  "command": "npx", +    </properties> 
-  "args": [ +    <filters> 
-    "mcp-remote", +        <attribute-match id="*" pattern="*" defaultUserGroupsUsername="${user.default.username}" 
-    "https://stages.example.com/mcp/sse", +            defaultLicenseType="${user.default.licenseType}" autocreateUser="${saml.autocreate}" /> 
-    "--header", +    </filters> 
-    "StagesToken: ${AUTH_TOKEN}" +</method>
-  ], +
-  "env": { +
-    "AUTH_TOKEN": "eyJh..." +
-  }, +
-  "active": true +
-}+
 </code> </code>
  
 +  * ''discoveryURI'': The URL of the IdP's ''.well-known/openid-configuration'' file. For example, in Microsoft Entra ID: ''https://login.microsoftonline.com/<tenantId>/v2.0/.well-known/openid-configuration''.
 +  * ''audience'': The audience value that Stages, as the resource server, checks in the JWT.
 +  * ''usernameAttribute'': The JWT claim containing the username. This is typically the user's email address.
 +  * Configure the filter as you would for [[.:integration:oidc|OIDC]] authentication.
  
-=== Stages 26.1 / Tomcat 10 ===+==== Stages permissions ====
  
-Currently Stages MCP server supports Streamable HTTP protocol for Tomcat 10 version. The endpoint is ''/mcp/http'', e.g.:+The MCP integration acts on behalf of the authenticated user. In addition to the usual permissions to view workspaces and process elements, the user must have the MCP permission to access them through MCP.
  
-''<nowiki>https://stages.example.com/mcp/http</nowiki>''+To let all users use MCP, add the MCP domain to the default group.
  
-The API token that was created must be provided to the MCP server via the header ''StagesToken''.+==== MCP client configuration ====
  
-An example MCP configuration:+Configure your MCP client to connect to the Stages MCP server at this URL:
  
-<code javascript> +''<nowiki>https://stages.example.com/stages/api/1/mcp</nowiki>''
-{ +
-  "command": "npx", +
-  "args": [ +
-    "mcp-remote", +
-    "https://stages.example.com/mcp/http", +
-    "--header", +
-    "StagesToken: ${AUTH_TOKEN}" +
-  ], +
-  "env": { +
-    "AUTH_TOKEN": "eyJh..." +
-  }, +
-  "active": true +
-} +
-</code>+
  
 +Stages currently supports Streamable HTTP.