Create MCP Resources
Creating MCP Resources
MCP resources are implemented using scripts written in QPR ProcessAnalyzer expression language. A script will be added as the MCP resource when the MCP resource option is selected in the Script Properties. Only system administrator users can enable the MCP resource option. Also, only system administrators can modify scripts that are MCP resources, because any changes to the MCP interface is restricted to system administrators for security reasons.
To enable a script as an MCP Resource:
- Log in to QPR ProcessAnalyzer as a System Administrator.
- Open or create the script.
- For the script to be used as an MCP resource, give it a name. This name is then used as the MCP resource name. It is important to ensure that every script intended for MCP use has a non-empty, valid name, as clients may fail to discover resources with invalid names. The maximum length of the name is 50 characters.
- Open the properties of the script.
- Switch to the MCP tab and select the MCP resource option.
- Switch to the Description tab and provide a description. The description is added to the context of the client.
MCP Resource Settings
The MCP resource is a read-only data entity that provides AI models with external context, files, or background knowledge. When a resource is read, the associated script is executed and the result is returned as text resource contents.
Every script can define its own resource configuration as JSON. Supported values are same as here, except for the name which is always generated automatically and can't be overridden. Defining the resource configuration will override any default configurations generated for scripts automatically by QPR ProcessAnalyzer. For example, specifying the value for "title" here will override the default functionality of using script's name as title of the resource.
In addition to the name of the resource, MCP resources provide the following information to the MCP client:
- title: Title of the resource. Uses the script's title by default.
- description: Description of the resource. Uses the script's description by default.
- uri: "script:///{scriptId}" where scriptId is the script's database identifier. This value can't be modified.
- mimeType: Mime type of the resource. Defaults to "text/plain".
- annotations: Metadata for filtering and prioritization of the resource content.
- audience (optional, array of roles): The intended audience for this content. Supported values are: "user" and "assistant".
- priority (optional, number): How important this data is, as a decimal number between "0" (lowest) and "1" (highest).
- lastModified (optional, string): When the resource was last modified, as an ISO 8601 date-time string (e.g. "2025-01-12T15:00:58Z").
- size (integer): Size in bytes.
- icons: Same as icons for MCP tools.
- meta: Metadata about the resource.
Example: a full MCP resource configuration:
{
"title": "Process Mining Data Export",
"description": "Exports process mining analysis results as JSON",
"mimeType": "application/json",
"size": 102400,
"annotations": {
"audience": ["user", "assistant"],
"priority": 0.8,
"lastModified": "2025-06-25T10:30:00Z"
},
"icons": [
{
"src": "https://example.com/icons/export.png",
"mimeType": "image/png",
"sizes": ["48x48"]
}
],
"meta": {
"refreshInterval": "300",
"dataSource": "process-mining"
}
}