watsonx.data

watsonx.data

Put your data to work, wherever it resides, with the hybrid, open data lakehouse for AI and analytics

 View Only

Using Watsonx.Data Intelligence with MCP and IBM Bob

By Aaron Ploetz posted 14 days ago

  

Introduction 

The watsonx.data intelligence MCP server is now generally available. MCP (Model Context Protocol) is a common, open standards protocol designed to allow AI models to securely communicate with a variety of different databases and files. Enterprise users can use it to understand more about their data by working with agentic development tools like IBM Bob.

In this article, we will demonstrate how to configure a connection to the watsonx.data intelligence MCP server. We will also show how to use our agentic development tool to analyze one of our data assets.

The watsonx.data intelligence MCP server 

While any agentic development tool will work, we will be using IBM Bob for this example. First, we will show how to configure IBM Bob to connect to our watsonx.data intelligence MCP server. Then we will demonstrate a few simple ways to work with it from an agentic standpoint.

Connecting with IBM Bob 

There are a few methods to connect to a watsonx.data intelligence environment over MCP, and they do require additional tools. Two possible options are uv (Python package manager) and mcp-remote. One of these should be installed before proceeding.

To connect to the MCP server, we will also need an IBM Cloud API key. Be sure to generate one ahead of time and have it ready for the configuration step below. Instructions for generating an API key can be found here:  Creating  your IBM Cloud API key.

Since we are using IBM Bob for development, we can easily configure a connection to the watsonx.data intelligence MCP server. From within the IBM Bob pane, click on the “three dots" menu and select “MCP servers.”

Figure 1: Accessing the MCP server configuration from within IBM Bob

Then, click the “Open” button for the “Global MCPs.” This will allow us to define our connection in the mcp_settings.json file. The entry into this file will depend on which underlying, command line tool is being used to connect. Here are examples for the uv and mcp-remote tools.

For uv: 

{ 
  "mcpServers": { 
    "wxdi-mcp-server": { 
      "command": "uvx", 
      "args": [ 
        "ibm-watsonx-data-intelligence-mcp-server", 
        "--transport", 
        "stdio" 
      ], 
      "env": { 
        "DI_SERVICE_URL": "https://api.dataplatform.cloud.ibm.com", 
        "DI_APIKEY": "<YOUR_IBM_CLOUD_API_KEY>", 
        "DI_ENV_MODE": "SaaS", 
        "LOG_FILE_PATH": "/tmp/di-mcp-server-logs" 
      } 
    } 
  } 
} 

 

For mcp-remote: 

{ 
  "mcpServers": { 
    "wxdi-mcp-server": { 
      "command": "/opt/homebrew/bin/mcp-remote", 
      "args": [ 
        "https://api.dataplatform.cloud.ibm.com/semantic_agents/public/v1/mcp_server/mcp/", 
        "--header", 
        "x-api-key:${API_KEY}" 
      ], 
      "env": { 
        "API_KEY": " <YOUR_IBM_CLOUD_API_KEY> " 
      } 
    } 
  } 
} 

After saving the file, we should see the “wxdi-mcp-server" appear in the MCP Server list. We can now work with our watsonx.data intelligence environment through IBM Bob’s agentic interface.

Analyzing a PostgreSQL table

Let’s say that we are trying to work with data in one of the PostgreSQL tables in watsonx.data intelligence and want to learn more about its definition. We can prompt IBM Bob to help:

“Can you show me the table definition for the tm_manta.EU_DAILY_TRADES PostgreSQL table? Feel free to put it into a local file named eu_daily_trades.sql

After granting a few approvals (including switching from “plan mode” to “code mode”), I can now see the table definition in the file pane. Next, I’ll ask for help with building a query for that table:

Can you help me build a SQL query which returns the last 100 trades, sorted by TRADE_DTE in descending order?

This returns: 

SELECT SNDR_MSG_ID, MSG_FCTN, TRADE_DTE, SETTLE_DTE, FIN_INSTRMNT_ID, TRD_PLACE, DEAL_PRICE, CURRENCY_CD, SETTLE_STATUS, SETTLE_PRIORITY, PARTY_PRIORITY 
FROM tm_manta_functional_demo.EU_DAILY_TRADES
ORDER BY TRADE_DTE DESC
LIMIT 100;

Now, we have a query that we can run, and perhaps even use it as the foundation for a report. 

Conclusions 

In this short article, we have introduced the watsonx.data intelligence MCP server. We have shown how to use it to learn more about our underlying enterprise data stores, as well as how to connect to it using an agentic development tool like IBM Bob. With this in-place, we can now leverage our agentic tools to lower the “barriers to entry” for our enterprise data.

For next steps, be sure to check out our documentation for IBM watsonx.data intelligence MCP Server. Here you can find all kinds of great information, including how to connect to your organization’s watsonx.data intelligence environment. If you would like to learn more about watsonx.data intelligence, we also have a document designed to help you get started: Getting started with watsonx.data intelligence.

Additionally, have a look at IBM Bob. It’s a great integrated development environment that can supercharge your software development output. The download link can be found here: https://bob.ibm.com/download.


#watsonx.data

0 comments
29 views

Permalink