This Model Context Protocol (MCP) server empowers AI assistants by accessing decisions from IBM Decision Intelligence or IBM Automation Decision Services.
The MCP server for Decision Intelligence and Automation Decision Services is available as an npm package in the free npm registry at https://www.npmjs.com/package/di-mcp-server.
It supports both STDIO and streamable HTTP transports for local or remote deployments for supporting any MCP clients.
flowchart LR
github["di-mcp-server github repository"] -- publish --> registry
registry["NPM registry"] -- npx -y di-mcp-server--> server
subgraph MCP Host
client["MCP Client"] <-- MCP/STDIO --> server("DI MCP Server")
end
server -- HTTPS --> runtime("Decision Runtime")
subgraph id["Decision Intelligence<br>or Automation Decision Services"]
runtime
end
client <-- MCP/HTTP --> server2("DI MCP Server") -- HTTPS --> runtime
- Supercharge your AI Assistants with the decisioning capabilities of IBM Decision Intelligence: step by step instructions to use this MCP server for IBM Decision Intelligence
You can use the MCP server available in the npm registry. If you want to develop your own MCP server or contribute to the development, see Developing the MCP server.
You can run the MCP server with npx to expose each operation of the last deployed version of a decision service as a MCP tool:
npx -y di-mcp-server <CREDENTIALS> --url <RUNTIME_BASE_URL> [--transport <TRANSPORT>] [--runtime <RUNTIME>] [--deployment-spaces <DEPLOYMENT_SPACES>]where
-
CREDENTIALSis one of the following options:--apikey <DI_API_KEY>whereDI_API_KEYis the API key to access the decision runtime for Decision Intelligence.--username <USERNAME> --password <PASSWORD>whereUSERNAMEandPASSWORDare the basic authentication credentials to connect to the decision runtime for Automation Decision Services.--username <USERNAME> --apikey <ZEN_API_KEY>whereUSERNAMEandZEN_API_KEYare the Zen API key credentials to access the decision runtime for Automation Decision Services (see Authorizing HTTP requests by using the Zen API key)
-
RUNTIME_BASE_URLis the base URL of the decision runtime REST API. For Decision Intelligence its pattern is:https://<TENANT_NAME>.decision-prod-us-south.decision.saas.ibm.com/ads/runtime/api/v1where TENANT_NAME is the name of the tenant. -
TRANSPORT(optional) is the transport protocol, eitherSTDIO(default) orHTTP. -
RUNTIME(optional) is the decision runtime, eitherDI(default) orADSfor using the decision runtime for respectively Decision Intelligence or Automation Decision Services. -
DEPLOYMENT_SPACES(optional) is a comma-separated list of deployment spaces to scan (defaults todevelopment). -
Example:
npx -y di-mcp-server --apikey HRJcDNlNXZVWlk9 --url https://mytenant.decision-prod-us-south.decision.saas.ibm.com/ads/runtime/api/v1The MCP server for Decision Intelligence extends its capability by enabling AI applications, such as IBM watsonx Orchestrate and Claude, to discover and execute deployed decision services.
You can integrate decision services into IBM watsonx Orchestrate by adding the MCP server.
-
In the agent builder, click Add tool.
-
Click Import.
-
Click Import from MCP server.
-
Click Add MCP server.
-
Specify the name for the server and the
npxcommand that is explained in the Getting started section. -
Close the dialog box, and select the tool that you want to add to your agent.
Your agent is now empowered with decisions.
You can use the connection setting to specity the API key and URL environment variables.
-
Open the main menu, expand Manage, and then click Connections. The Connection settings opens.
-
Click Add new connection to launch the Add new connection wizard.
-
Enter the Connection ID and Display name fields, and then click Save and continue.
-
In the Configure draft connection panel:
- Select Key Value Pair as Authentication Type.
- Enter the Key and Value fields to define the
APIKEYenvironment variable. - Click Add key value pair.
-
Enter the Key and Value fields to define the
URLenvironment variable, and then click Connect. -
When the draft connection is connected, click Next.
-
Similarly configure the live connection. When it is done, click Add connection.
-
In the Add MCP Server wizard:
- Select the display name corresponding to the connection you just configured.
- Enter the
npxcommand WITHOUT the--apikeyand--urlarguments. - Click Connect, and then click Done.
You can integrate decision services into Claude Desktop by adding the MCP server.
-
Locate the Claude Desktop configuration file.
Find your Claude configuration directory:
- macOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
${HOME}/.config/Claude/claude_desktop_config.json
- macOS:
-
Add the MCP server configuration to the configuration file.
-
In the configuration directory, edit or create
claude_desktop_config.json:{ [..] "mcpServers": { "di-mcp-server": { "command": "npx", "args": [ "-y", "di-mcp-server", "--apikey", "<APIKEY>", "--url", "https://<TENANT_NAME>.decision-prod-us-south.decision.saas.ibm.com/ads/runtime/api/v1" ] } } [..] } -
Alternatively, you can use the
APIKEYandURLenvironment variables to respectively specify the API key and the base URL of the decision runtime REST API:{ [..] "mcpServers": { "di-mcp-server": { "command": "npx", "args": ["-y", "di-mcp-server"], "env": { "APIKEY": "<APIKEY>", "URL": "https://<TENANT_NAME>.decision-prod-us-south.decision.saas.ibm.com/ads/runtime/api/v1" } } } [..] }
-
For more information, see https://modelcontextprotocol.io/quickstart/user.
You can integrate decision services into Cursor by adding the MCP server.
-
In Cursor, click the cog wheel icon to open the Cursor settings.
-
Click Tools & Integration in the settings categories that are listed on the left.
-
Click + New MCP Server, to open Cursor's
mcp.jsonconfiguration file. -
Add a new MCP server entry.
As for Claude Desktop, you can specify the API key and base URL of the decision runtime REST API using with one of the following methods:
- Using command line arguments:
{ [..] "mcpServers": { "di-mcp-server": { "command": "npx", "args": [ "-y", "di-mcp-server", "--apikey", "<APIKEY>", "--url", "https://<TENANT_NAME>.decision-prod-us-south.decision.saas.ibm.com/ads/runtime/api/v1" ] } } [..] } - Using environment variables:
{ [..] "mcpServers": { "di-mcp-server": { "command": "npx", "args": ["-y", "di-mcp-server"], "env": { "APIKEY": "<APIKEY>", "URL": "https://<TENANT_NAME>.decision-prod-us-south.decision.saas.ibm.com/ads/runtime/api/v1" } } } [..] }
- Using command line arguments:
For more information, see Cursor's documentation about Installing MCP servers in the Cursor documentation.
When you integrate with MCP hosts, you might need to customize the tool names to meet specific requirements or limitations, such as:
- Maximum length restrictions
- Forbidden characters
- Naming conventions
By default, tool names are generated in the following way:
- Combines the decision service name with the operation ID:
decisionServiceName operationID - Replaces spaces and forward slashes with underscores:
decisionServiceName_operationID - Handles name collisions by using the decision service ID: use
decisionServiceID_operationIDifdecisionServiceName_operationIDalready exists
If the default naming strategy doesn't meet the requirements of your MCP hosts, you can specify custom tool names by setting the mcpToolName.OPERATION_ID decision metadata:
{
"map": {
[..]
"mcpToolName.OPERATION_ID": {
"name": "mcpToolName.OPERATION_ID",
"kind": "PLAIN",
"readOnly": false,
"value": "YourCustomToolName"
}
[..]
}
}where
OPERATION_IDis the operation unique identifierYourCustomToolNameis the desired tool name for the operation
You can develop your own MCP server by using the source files that are available here.
Run the following command to get the source files of the MCP server:
git clone https://github.com/DecisionsDev/di-mcp-server.git
cd di-mcp-serverRun the following commands to build the MCP server from the source files:
npm install
npm run buildRun the following command to test the MCP server:
npm testThe project is configured with Jest's built-in code coverage capabilities. To generate a code coverage report, run the following command:
npm run test:coverageThis will:
- Run all tests in the project
- Generate a coverage report showing which parts of the code are covered by tests
- Create detailed reports in the
coveragedirectory
The coverage report includes:
- Statement coverage: percentage of code statements executed
- Branch coverage: percentage of control structures (if/else, switch) executed
- Function coverage: percentage of functions called
- Line coverage: percentage of executable lines executed
Coverage thresholds are set to 70% for statements, branches, functions, and lines. If the coverage falls below these thresholds, the test command fails.
To view the detailed HTML coverage report, open coverage/lcov-report/index.html in your browser after running the coverage command.
Run the MCP server with nodemon and the DEBUG environment variable:
- The server is restarted whenever changes are detected on the source code.
- Debug output is enabled.
npm run dev -- --apikey <APIKEY> --url <URL>APIKEY=<APIKEY> URL=<URL> npm run dev| Name | Description |
|---|---|
| APIKEY | API key to access the decision runtime for either Decision Intelligence or Automation Decision Services |
| DEPLOYMENT_SPACES | Optional comma-separated list of deployment spaces to scan (default: development) |
| DEBUG | When the value is true, the debug messages are written to the stderr of the MCP server |
| PASSWORD | Password to access the decision runtime for Automation Decision Services with basic authentication |
| RUNTIME | Optional target decision runtime: DI (default) or ADS |
| TRANSPORT | Optional transport protocol: STDIO (default) or HTTP |
| URL | Base URL of the decision runtime |
| USERNAME | Username to access the decision runtime for Automation Decision Services either with basic authentication or Zen API key |
© Copyright IBM Corporation 2025.