Decision Management & Intelligence (ODM, DI)

Decision Management & Intelligence (ODM, DI)

Connect with experts and peers to elevate technical expertise, solve problems and share insights


#Data
#Data
#Businessautomation
 View Only

Exposing IBM Decision Intelligence as an MCP Server for Microsoft Copilot Studio via Dev Tunnel

By Said Moutaa posted Thu April 09, 2026 09:54 AM

  

This tutorial explains how to expose an IBM Decision Intelligence (DI) decision service as an MCP server, publish it through a Microsoft Dev Tunnel, and connect it to a Copilot Studio agent.

It is based on a working setup where the DI MCP server is launched behind mcp-proxy, because the proxy provides a stable HTTP endpoint on a fixed local port that Copilot Studio can consume.

Note: This tutorial was created and tested on macOS. While the core concepts apply to all operating systems, some commands are macOS-specific. Windows and Linux users may need to adapt some commands, though Dev Tunnel CLI is available for all major platforms.previe

Architecture Overview

Architecture of exposing an IBM Decision Intelligence decision service as an MCP server, published through a Microsoft Dev Tunnel and consumed by a Copilot Studio agent,

Flow Explanation

  1. Copilot Studio Agent sends an HTTPS request to the Dev Tunnel public URL
  2. Dev Tunnel forwards the request from the public URL to localhost:3002
  3. mcp-proxy (listening on port 3002) receives the HTTP request at /mcp endpoint
  4. mcp-proxy converts the HTTP request to stdio communication with its child process
  5. di-mcp-server (running in stdio mode) receives the request via stdin
  6. di-mcp-server makes HTTPS API calls to IBM DI Runtime
  7. IBM DI Runtime executes the decision and returns results
  8. Response flows back through the same chain in reverse

Key Port Details

  • Port 3002: Fixed HTTP port where mcp-proxy listens (stable endpoint)
  • Random Internal Port: mcp-proxy manages stdio communication with di-mcp-server internally (no fixed port needed)
  • Dev Tunnel Port: Maps public URL to localhost:3002

What You Will Build

You will create this flow:

Copilot Studio Agent
  → Dev Tunnel public URL
  → mcp-proxy on localhost:3002
  → di-mcp-server running in stdio mode
  → IBM Decision Intelligence runtime

At the end, your Copilot agent will show the deployed DI decision operations as tools. In the tested setup, the generated tool name was:

Getting_started_daily-advice

Why mcp-proxy is Needed

di-mcp-server works well with stdio, but Copilot Studio expects a remote MCP endpoint over HTTP. mcp-proxy solves that by:

  • Starting the DI MCP server as a child process
  • Talking to it over stdio (no fixed port needed for di-mcp-server)
  • Exposing a fixed HTTP MCP endpoint such as http://localhost:3002/mcp

That fixed port can then be published through Dev Tunnel.

Prerequisites

Make sure you have:

  • macOS system
  • Node.js and npx installed
  • Homebrew package manager
  • A deployed decision service in IBM Decision Intelligence
  • A DI API key
  • The runtime base URL for your DI environment
  • Access to Microsoft Copilot Studio
  • A Microsoft account (for Dev Tunnel authentication)

Example runtime URL:

https://your-di-instance.example.com/ads/runtime/api/v1

Note: You must use the runtime API base URL, not the DI landing page URL.

Step 0: Install and Configure Microsoft Dev Tunnel

Install Dev Tunnel CLI

Install using Homebrew:

brew install --cask devtunnel

Verify installation:

devtunnel --version

Login with Microsoft Entra ID

Authenticate with your Microsoft account:

devtunnel user login

This will open a browser window for authentication. Follow the prompts to sign in with your Microsoft account.

Create a Tunnel

Create a new tunnel with anonymous access (required for Copilot Studio):

devtunnel create --allow-anonymous

Example output:

Tunnel ID             : giant-chair-fwckv6f.uks1
Tunnel Name           : giant-chair-fwckv6f
Cluster               : uks1
Access control        : +Anonymous [connect]

Important: Save the Tunnel ID (e.g., giant-chair-fwckv6f.uks1) - you'll need it in the next steps.

The --allow-anonymous flag is crucial because it allows Copilot Studio to connect to your tunnel without authentication.

Step 1: Start the DI MCP Server Behind mcp-proxy

Run this command locally:

npx -y mcp-proxy --port 3002 -- \\
  npx -y di-mcp-server \\
    --di-apikey "<YOUR_DI_API_KEY>" \\
    --url "https://your-di-instance.example.com/ads/runtime/api/v1" \\
    --debug \\
    --decision-service-ids "644005GQPF/Alice-9-March-26/Getting started"

Important Notes

  • Do not add --transport http to di-mcp-server in this setup
  • di-mcp-server should remain in its default stdio mode
  • mcp-proxy is the component that exposes HTTP on port 3002
  • The di-mcp-server communicates with mcp-proxy via stdio (stdin/stdout)

Step 2: Verify the MCP Server Startup Logs

If startup is successful, you should see output similar to this:

The authentication mode is not defined. Using 'DiApiKey'
The transport protocol is not defined. Using 'stdio'
IBM Decision Intelligence MCP Server version 2.1.2 running on stdio
Now polling for tools change every 30s
MCP server 'mcp-server' is up & running...
starting server on port 3002

You may also see the discovered decision service and operation schema in the logs.

Step 3: Configure Dev Tunnel Port and Host

Create a port on your tunnel for 3002:

Use the Tunnel ID from Step 0:

devtunnel port create -p 3002

Example output:

Tunnel ID             : giant-chair-fwckv6f.uks1
Port Number           : 3002
Protocol              : auto
Access control        : {Inherited: +Anonymous [connect]}

Host the tunnel:

devtunnel host giant-chair-fwckv6f.uks1

Replace giant-chair-fwckv6f.uks1 with your actual Tunnel ID.

Example output:

Hosting port: 3002
Connect via browser: https://2d2bvkrr-3002.uks1.devtunnels.ms
Ready to accept connections for tunnel: giant-chair-fwckv6f.uks1

Note: If your tunnel also shows other ports such as 3000, that is fine. It only means those ports are also attached to the same tunnel. For this DI test, you only need port 3002.

Keep this terminal window open - the tunnel must remain active for Copilot Studio to connect.

Step 4: Build the MCP URL for Copilot Studio

Use the Dev Tunnel URL from the previous step plus /mcp:

https://2d2bvkrr-3002.uks1.devtunnels.ms/mcp

Replace 2d2bvkrr-3002.uks1.devtunnels.ms with your actual tunnel URL.

This is the URL you will configure in Copilot Studio.

Step 5: Create the Copilot Studio Agent

In Copilot Studio:

  1. Create a new agent
  2. Go to Tools
  3. Add an existing MCP server
  4. Paste the tunnel URL:
    https://2d2bvkrr-3002.uks1.devtunnels.ms/mcp
    
  5. Complete the connection flow
  6. Wait for the tools to be discovered
  7. If prompted to open the connection manager, do that and click Connect

Step 6: Confirm the Tool Appears

Once Copilot Studio connects successfully, it should import the decision operation as a tool.

In the tested setup, the tool appeared as:

Getting_started_daily-advice

This name is derived from:

  • Decision service name: Getting started
  • Operation ID: daily-advice

MCP server successfully configured and connected in Copilot Studio, with the decision tool (Getting_started_daily-advice) discovered and available for use by the agent.

Step 7: Test the Tool from Agent Chat

Now you can test the integration with various scenarios. The decision service expects the following input schema:

  • name: string
  • weather.rainForecast: integer
  • weather.stormAlert: boolean
  • weather.temperature: one of cold, hot, warm

Test Cases 

Below are three comprehensive test cases that validate different aspects of the decision logic.

Test 1 — Storm Scenario

Prompt to ask Copilot:

Give daily advice for Jamie. The temperature is cold, rain forecast is 100, and there is a storm alert.

Expected tool input:

{
  "name": "Jamie",
  "weather": {
    "temperature": "cold",
    "rainForecast": 100,
    "stormAlert": true
  }
}

Expected result:

Hello Jamie! It would be wise to stay home. There is a storm alert.

What this validates:

  • ✅ Boolean handling for stormAlert = true
  • ✅ Correct decision branch for storm conditions
  • ✅ Successful MCP tool invocation

Test 2 — Cold Day Scenario

Prompt to ask Copilot:

Give daily advice for Avery. The temperature is cold, rain forecast is 10, and there is no storm alert.

Expected tool input:

{
  "name": "Avery",
  "weather": {
    "temperature": "cold",
    "rainForecast": 10,
    "stormAlert": false
  }
}

Expected result:

Hello Avery! Cold day! Take a coat.
Testing of the MCP tool within Copilot Studio, where different user prompts trigger the decision service and return contextual daily advice based on weather conditions such as temperature, rain forecast, and storm alerts.

What this validates:

  • ✅ Enum handling for temperature = cold
  • ✅ Low rain without storm
  • ✅ Correct rule path for cold weather advice

Test 3 — Rainy Day Scenario

Prompt to ask Copilot:

Give daily advice for Robin. The temperature is cold, rain forecast is 90, and there is no storm alert.

Expected tool input:

{
  "name": "Robin",
  "weather": {
    "temperature": "cold",
    "rainForecast": 90,
    "stormAlert": false
  }
}

Expected result:

Hello Robin! Rainy day! Take an umbrella.

What this validates:

  • ✅ Numeric threshold handling for rain
  • ✅ No storm path
  • ✅ Correct rainy-day business rule

Summary

This tutorial demonstrated how to successfully integrate IBM Decision Intelligence with Microsoft Copilot Studio using the Model Context Protocol (MCP) and Microsoft Dev Tunnel. The following sections recap the main topics and outcomes.

Key Components and Architecture

We built a complete integration chain consisting of four main layers:

  1. IBM Decision Intelligence Runtime – The cloud-based decision service execution engine
  2. Local MCP Server Stack – A two-tier architecture using di-mcp-server (stdio mode) and mcp-proxy (HTTP endpoint)
  3. Microsoft Dev Tunnel – A secure public tunnel that exposes the local MCP endpoint to the internet
  4. Microsoft Copilot Studio – The AI agent platform that consumes the decision services as tools

What You Accomplished

By following this tutorial, you:

  • Installed and configured Microsoft Dev Tunnel CLI on macOS
  • Created an anonymous-access tunnel to enable Copilot Studio connectivity
  • Launched the DI MCP server behind mcp-proxy for stable HTTP endpoint exposure
  • Exposed the local MCP endpoint through a public Dev Tunnel URL
  • Connected Copilot Studio to the IBM Decision Intelligence runtime via MCP
  • Tested the integration with multiple scenarios validating different decision logic paths

Real-World Application

The "Getting started / daily-advice" decision service demonstrated how business rules can be:

  • Exposed as conversational AI tools
  • Invoked through natural language prompts
  • Validated with structured input schemas (strings, integers, booleans, enums)
  • Integrated into enterprise AI workflows

0 comments
26 views

Permalink