Generating MCP and Rest-API tokens

Note:

This feature is available only on configured SaaS environments.

An Model Context Protocol (MCP) server works as a bridge between an AI agent and IBM Process Mining. Thanks to the MCP token, you can seamlessly connect your IBM Process Mining with an AI agent or other MCP client, enabling intelligent data retrieval and interaction. With an MCP token, you can avoid manually setting up and configuring a local MCP server: a remote MCP server is hosted on IBM infrastructure and accessed over a network, making it easier to collaborate and reducing the need for manual setup and configuration.

Using MCP tokens provides you with the following advantages:
  • Agent interaction: AI agents can establish a connection with the MCP server using the MCP protocol.
  • Automation: The tools inside IBM Process Mining are automatically accessed and used by the MCP client. For more information, see Available tools.
  • Natural language interface: You can take advantage of the tools provided by IBM Process Mining inside your chosen AI agent by using natural language and receive human-readable responses.
  • Query processing: The MCP server receives natural language queries from agents, translates them into appropriate API calls and SQL queries, and returns the results in a human-readable format.
  • Minimal set up and configuration: Almost no set up or configuration is required, as the solution is already deployed on IBM infrastructure.
  • Framework agnostic integration: You can use IBM Process Mining with any agent frameworks or other MCP clients with native MCP compatibility of your choice.

Available tools

The following IBM Process Mining tools are exposed through MCP:
getCurrentUser
Gets all projects accessible to the current user.
getAllProjects
Gets the current authenticated user.
textToSql
Transforms natural language questions to SQL and executes them.
getAllActivities
Gets all activities of a specific project.

Generating a token

Complete the following steps to generate a Rest-API and MCP token:
  1. In IBM Process Mining homepage, perform one of the following actions:
    • in the right upper corner, click the gear icon button.
    • in the right upper corner, click the user profile Menu button, and then click the User profile link.
  2. Switch the Enable API key toggle to On.
  3. In the User profile window, click Generate token.
  4. Copy the token.
    Note: The token is valid for four hours. However, if you close the User profile window, but you do not copy the token, you must open the window again and generate a new token again.

You can now paste the token into your preferred MCP client and configure the settings to connect your MCP client with IBM Process Mining. You can use the URLs provided under the token in order to configure the connection.

Integrating with watsonx Orchestrate

Complete the following steps to integrate the remote MCP server with watsonx Orchestrate:

  1. Install IBM watsonx Orchestrate Agent Development Kit (ADK) and complete the initial setup. For more information, see Welcome to IBM watsonx Orchestrate Agent Development Kit.

  2. Run the following command to create connections.
    orchestrate connections add -a <CONN_NAME>
    orchestrate connections configure --app-id <CONN_NAME> --environment draft -t team -k bearer
    orchestrate connections set-credentials --app-id <CONN_NAME> --env draft --token <TOKEN>
    Where:
    • <CONN_NAME> is a custom name, a variable to notify the user who is integrating.
    • <TOKEN> is the token you generated in IBM Process Mining.
  3. Run the following command to import toolkit to watsonx Orchestrate. For more information on toolkits, see Managing Toolkits.
    orchestrate toolkits import \
    --kind mcp \
    --name <TOOLKIT_NAME> \
    --description "IBM Process Mining MCP server" \
    --url "<URL>"  \
    --transport "streamable_http" \
    --tools "*" \
    --app-id " <CONN_NAME> "
    
    Where:
    • <TOOLKIT_NAME> is the name of the toolkit from IBM Process Mining.
    • url is the URL you can retrieve from your user profile window in IBM Process Mining.
    The following example demonstrates how to add tools as a toolkit in watsonx Orchestrate.
    orchestrate toolkits import \
    --kind mcp \
    --name process-mining-tools \
    --description "IBM Process Mining MCP server" \
    --url "url "https://processmining.ibm.com/mcp" \ 
    --transport "streamable_http" \
    --tools "*" \
    --app-id " test_remote "

When you finish importing the toolkit, you can go to the Build tab in watsonx Orchestrate and see the All tools section. You can use these tools to create your own agent. To do so, open the watsonx Orchestrate chat window, click Create agent and add the tools to your agent. For more information on creating agents, see Creating your first agent.