Get the FREE Ultimate OpenClaw Setup Guide →

ibm-watsonxdata-dl-retrieval

The Watsonx.data Document Library Retrieval MCP Server is a Model Context Protocol (MCP)-compliant service that seamlessly connects AI agents with document libraries in watsonx.data, enabling intelligent data retrieval and interaction.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ibm-ibm-watsonxdata-dl-retrieval-mcp-server uv run ibm-watsonxdata-dl-retrieval-mcp-server \
  --env LH_CONTEXT="Set to CPD or SAAS depending on deployment" \
  --env CPD_ENDPOINT="CPD endpoint URL (if deploying to CPD)" \
  --env CPD_PASSWORD="CPD password" \
  --env CPD_USERNAME="CPD username" \
  --env CA_BUNDLE_PATH="Path to CA bundle (if required by CPD)" \
  --env WATSONX_DATA_API_KEY="API key for Watsonx data (SAAS)" \
  --env DOCUMENT_LIBRARY_API_ENDPOINT="Document library endpoint (SAAS)" \
  --env WATSONX_DATA_RETRIEVAL_ENDPOINT="Retrieval service endpoint (SAAS)" \
  --env WATSONX_DATA_TOKEN_GENERATION_ENDPOINT="Token generation endpoint (SAAS)"

How to use

This MCP server provides an interface between agent frameworks and Watsonx.data document libraries. It automatically discovers and registers document libraries as MCP tools, allowing agents to query and retrieve information from your document libraries using natural language or structured tool calls. The server supports two MCP transport modes: SSE (streaming) and stdio (direct IO), enabling integration with a wide range of agent frameworks. By deploying this server, you can act as a bridge between AI agents and your Watsonx.data content, enabling tasks like document retrieval, summarization, and contextual answering through MCP-compliant tools.

To use it, run the server with the desired transport and port. In SSE mode, the server exposes endpoints that agents can call via streaming SSE, while in stdio mode it can be wired directly into frameworks that support standard I/O MCP communication. Tools are created dynamically for each document library, and each library is exposed as a unique tool name, enabling precise invocation from agents. Configuration via environment variables sets the connection details for CPD or Watsonx SaaS, including endpoints, credentials, and necessary tokens. Once running, agents can discover available tools and invoke them through the MCP protocol, receiving structured responses that can be used for natural language interactions or further processing.

How to install

Prerequisites:

  • Python 3.11+ installed on your system
  • Access to CPD or Watsonx SaaS environment with appropriate credentials
  • Internet access to install Python packages

Step 1: Install Python (if not already installed)

Step 2: Create and activate a virtual environment

python -m venv .venv
source .venv/bin/activate  # macOS/Linux
.venv\Scripts\activate     # Windows

Step 3: Install the MCP server package

pip install ibm-watsonxdata-dl-retrieval-mcp-server

Step 4: Install the uv tool (Python-based MCP runner)

pip install uv

Step 5: Configure environment variables (see README for details) You can export the required variables as shown in the Configuration section of the README prior to running the server.

Additional notes

Notes and tips:

  • Ensure your agent framework supports MCP via SSE or stdio for compatibility.
  • For CPD deployments, set CPD_ENDPOINT, CPD_USERNAME, CPD_PASSWORD, and CA_BUNDLE_PATH. For Watsonx SaaS, set WATSONX_DATA_API_KEY and the various ENDPOINT variables.
  • The server registers each document library as a distinct tool with a unique name constructed from the library name and ID. Tools can be invoked by agents using the MCP tool interface.
  • If credentials or endpoints change, you should restart the server with updated environment variables; credentials cannot be changed at runtime.
  • When running in SAAS with local MCP server, expose the endpoint if needed to allow agent frameworks to reach the MCP server.

Related MCP Servers

Sponsor this space

Reach thousands of developers