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
261:mcpserver [2026/04/15 07:29] Policnik, Florian261:mcpserver [2026/05/07 10:33] (current) Policnik, Florian
Line 3: Line 3:
 [[https://modelcontextprotocol.io/docs/getting-started/intro|MCP (Model Context Protocol)]] has established itself as the universal way to connect LLMs (Large Language Models) and other AI systems with data sources. [[https://modelcontextprotocol.io/docs/getting-started/intro|MCP (Model Context Protocol)]] has established itself as the universal way to connect LLMs (Large Language Models) and other AI systems with data sources.
  
-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.
  
-===== How it works =====+In the currently provided MCP solution Stages provides access to a **single workspace only**. In future versions of MCP support this limitation is going to be eliminated.
  
-The Stages MCP Server takes advantage of [[261:collector_data_rest_api|Stages Collector Data API]]. Data that should be provided via MCP can be precisely defined and precalculated. MCP Server then connects the AI systems with the collected data. MCP server adds context so the AI system get domain specific instructions.+===== How it works =====
  
 +The Stages MCP server uses the [[261:collector_data_rest_api|Stages Collector Data API]]. Data that should be provided via MCP need to be provided by one or multiple Stages Collector jobs. The MCP server then provides the AI-systems with the collected data.
  
 ===== How to get started ===== ===== How to get started =====
  
-This feature is currently in beta. It requires Stages 7.12.5.1 and later or Stages 26.1.0.0 and later.+This feature is currently in beta. It requires Stages 7.12.5.1 or lateror Stages 26.1.0.0 or later.
  
-Please request from Stages support current version of MCP package. You will get the MCP server, script and configuration suitable for processes based on unified configuration.+Please request the current version of the MCP package from Stages support. You will receive an MCP server, scriptand configuration suitable for processes based on the unified configuration metamodel.
  
 ==== Installation ===== ==== Installation =====
  
-  * In Stages go to Administration -> Jobs and create a job for mcp (e.g. "mcp") 
-  * Upload ''mcp.js'' file to mcp job 
-  * Run job once 
-  * Specify a cron expression to keep data up to date 
   * Stop Stages   * Stop Stages
-  * Activate [[261:api-tokens|API tokens in Stages]] and restart Stages +  * Activate [[261:api-tokens|API tokens in Stages]] 
-  * Add ''mcp-server.properties'' to Stages conf folder +  * Add ''mcp-server.properties'' to the Stages conf folder 
-  * Choose the right war file:+  * Choose the right WAR file:
     * Stages 7.12: ''mcp-web-tomcat-9-*.war''     * Stages 7.12: ''mcp-web-tomcat-9-*.war''
     * Stages 26.1: ''mcp-web-tomcat-10-*.war''     * Stages 26.1: ''mcp-web-tomcat-10-*.war''
-    * Extract the war file to ''stages/tomcat/webapps/mcp''. Ensue that the folders ''META-INF'' and ''WEB-INF'' are directly in the ''mcp'' folder+    * Extract the WAR file to ''stages/tomcat/webapps/mcp''. Ensue that the folders ''META-INF'' and ''WEB-INF'' are directly in the ''mcp'' folder
   * Start Stages   * Start Stages
 +  * Go to the Company workspace and add the workspace variable ''mcpDefaultWorkspace''. Set the value to the ID of the workspace that you want to access.
 +  * In Stages go to Administration -> Jobs and create a job for MCP (e.g. "mcp")
 +  * Upload the ''mcp.js'' file to MCP job
 +  * Run the job once
 +  * Specify a cron expression to keep the data updated
  
-If Stages is running you can test if MCP Server is running by checking path ''/mcp/status'' on your Stages server. For example: ''<nowiki>https://stages.example.com/mcp/status</nowiki>''+If Stages is runningyou can check the path ''/mcp/status'' on your Stages server to see if the MCP server is running. For example: ''<nowiki>https://stages.example.com/mcp/status</nowiki>''
  
 ==== Configure credentials ===== ==== Configure credentials =====
  
-Access to MCP Server and Stages data is protected. To access a personal [[261:api-tokens|Stages API token for REST-API]] is required. The user must be:+Access to the MCP server and Stages data is protected. [[261:api-tokens|personal Stages API token]] is required to access the REST API. The user must have the following privileges:
  
-  * Process Modeller+  * Process Modeler
   * CollectorData Read and Create permission   * CollectorData Read and Create permission
-  * Permission accourding data collectore.g. Process Read+  * Permission according to the data collector (e.g. Process Read
  
-The created API token must be provided to MCP Server via Header ''StagesToken'' 
  
 ==== Configure AI system ===== ==== Configure AI system =====
  
-MCP Config:+Currently Stages MCP server supports Server-Sent Events (SSE) protocol. The endpoint is ''/mcp/sse'', e.g.: 
 + 
 +''<nowiki>https://stages.example.com/mcp/sse</nowiki>'' 
 + 
 +The API token that was created must be provided to the MCP server via the header ''StagesToken''
 + 
 + 
 +An example MCP configuration:
  
 <code javascript> <code javascript>
Line 62: Line 71:
 } }
 </code> </code>
- 
-