Setting up a local MCP server

You must install and configure the local MCP server on your local computer.

Prerequisite software

Before you begin, ensure that your system meets the following requirements:

System requirements
Component Requirement Notes
Python Version 3.11 or later Download Python
Package manager uv Install uv

Installing the MCP Server

You can install the IBM watsonx.data MCP Server using one of the following methods:

Installing with pipx

  1. Run the following code to install pipx if not already installed.

    pip install pipx
    
  2. Run the following code to install the MCP server.

    pipx install ibm-watsonxdata-mcp-server
    

Installing with pip

Use this method if you prefer to install the server in your user Python environment.

  1. Run the following code to install the MCP server.

    pip install --user ibm-watsonxdata-mcp-server
    

To install MCP sever for development setup, refer IBM watsonx.data MCP Server.

Configuring the MCP server

After installation, configure your hosts to communicate with the MCP server.

Find the MCP server executable

Complete the steps below to locate the MCP server executable based on your operating system. You will use this path when configuring your hosts.

  • macOS or Linux

    Open a terminal and run:

    which ibm-watsonxdata-mcp-server
    
  • Windows (PowerShell)

    Open PowerShell and run:

    where.exe ibm-watsonxdata-mcp-server
    

Getting the required configuration information

You need to provide values for the following variables in the host configuration file:

  • path/to/ibm-watsonxdata-mcp-server: The MCP server executable location
  • WATSONX_DATA_BASE_URL: The <console-host> portion of your watsonx.data instance URL for the MCP server endpoint. The MCP server endpoint has the following format:
    • https://<console-host>/lakehouse/api
  • WATSONX_DATA_API_KEY: Your IBM Cloud API key
  • WATSONX_DATA_INSTANCE_ID: The Cloud Resource Name (CRN) of watsonx.data instance

To get the required information:

  1. To get the MCP server executable location, open a terminal and run the appropriate command:

    • macOS or Linux

      1. Open a terminal and run:

        which ibm-watsonxdata-mcp-server
        
    • Windows (PowerShell)

      1. Open PowerShell and run:
      where.exe ibm-watsonxdata-mcp-server
      
  2. Log into IBM Cloud.

  3. To find the <console-host> and CRN values, go to Resources list from the navigation menu and select your watsonx.data instance from Database dropdown.

  4. Get the value of <console-host> by copying the first part of the web console URL. For example: console-ibm-cator.lakehouse.saas.ibm.com

  5. Get your watsonx.data instance CRN by copying the CRN value. The CRN has the following format: crn:v1:bluemix:public:lakehouse:us-south/a/...

  6. Copy your IBM Cloud API key or if necessary, create one. See Creating an API key.

Configuring the host

You must configure the host to connect to the MCP server by editing the host configuration file:

  • The IBM Bob configuration file is (file path).

     ~/Library/Application Support/Bob-IDE/User/globalStorage/ibm.bob-code/settings/mcp_settings.json
    
  • The Claude Desktop configuration file location varies by operating system:

    Configuration file location
    Operating System Configuration File Path
    macOS ~/Library/Application Support/Claude/claude_desktop_config.json
    Windows %APPDATA%\Claude\claude_desktop_config.json
    Linux ~/.config/Claude/claude_desktop_config.json

To configure the host:

  1. Open the configuration file in a text editor.

  2. Add the following configuration, replacing placeholder values with your actual credentials:

    {
      "mcpServers": {
        "IBM watsonx.data MCP Server": {
          "command": "/path/to/ibm-watsonxdata-mcp-server",
          "args": ["--transport", "stdio"],
          "env": {
            "WATSONX_DATA_BASE_URL": "https://<console-host>.lakehouse.cloud.ibm.com/lakehouse/api",
            "WATSONX_DATA_API_KEY": "<your_api_key_here>",
            "WATSONX_DATA_INSTANCE_ID": "crn:v1:<bluemix:public:lakehouse:us-south/a/...>"
          }
        }
      }
    }
    
  3. Save the file.

  4. Restart the host.

Next steps