IBM watsonx.data remote Model Context Protocol (MCP) server

IBM watsonx.data remote MCP server is a Model Context Protocol (MCP) compliant service that seamlessly connects AI agents with document libraries in watsonx.data, document sets and data assets(tables) in watsonx.data, enabling intelligent data retrieval and interaction. While you must manually set up and configure a local MCP server, a remote MCP server is hosted on IBM infrastructure and accessed over a network, making it easier to collaborate and reducing the need for manual setup and configuration.

Key features of watsonx.data remote MCP server:

  • Better efficiency: Uses static tools and an MCP prompt as system instructions to intelligently narrow the search space, delivering faster and more efficient responses.
  • Natural language interface: Query document libraries using natural language and receive human-readable responses.
  • Setup and Configuration: No setup or configuration is required, as the solution is already deployed on IBM infrastructure
  • Framework agnostic integration: Plug directly into the preferred agentic frameworks with native MCP compatibility.

Capabilities

The remote MCP server exposes six static tools and one MCP prompt that the agent can use:

  • Tools:

    1. Tool Name : LIST_DOCUMENT_LIBRARY
      Description : Lists all available Document Libraries and their metadata.
      Requires : None
      Provides : document_library_metadata

    2. Tool Name : QUERY_DOCUMENT_LIBRARY
      Description : Executes a natural language query against a specified Document Library.
      Requires : LIST_DOCUMENT_LIBRARY (for parameters)
      Provides : Retrieval Results

    3. Tool Name : LIST_DOCUMENT_SET
      Description : Lists all available Document Sets within a specified Document Library and their metadata.
      Requires : LIST_DOCUMENT_LIBRARY (for parameters)
      Provides : document_set_metadata

    4. Tool Name : QUERY_DOCUMENT_SET
      Description : Executes a natural language query against a specified Document Set.
      Requires : LIST_DOCUMENT_SET (for parameters)
      Provides : Retrieval Results

    5. Tool Name : LIST_DATA_ASSETS
      Description : Returns filtered Presto tables based on provided connection parameters.
      Requires : User-provided connection parameters (container_type, container_id, presto_instance_crn, presto_engine_id)
      Provides : tables, container_type, container_id, presto_instance_crn, presto_engine_id

    6. Tool Name : QUERY_DATA_ASSETS
      Description : Executes a natural language query across the selected Presto tables.
      Requires : LIST_DATA_ASSETS (for parameters)
      Provides : Retrieval Results

  • Prompt:

    • workflow_guidance – A crucial prompt defined in the MCP server that provides guidance on how to effectively use MCP tools to retrieve information from document libraries, document sets, and data assets. The user should retrieve this prompt from the server and configure it as a system instruction.

    Example with LangChain Agent:

       tools2 = await load_mcp_tools(session=session)
       agent = create_react_agent(
         model=llm,
         tools=tools2,
       )
       query = input("Enter the Query \n")
       guidance_prompt_with_query = await session.get_prompt(name="workflow_guidance")
       prompt_text = guidance_prompt_with_query.messages[0].content.text
       result = await agent.ainvoke(input = { "messages": [SystemMessage(content=prompt_text),HumanMessage(content=query)]})
    

Prerequisites

Before you using the remote MCP server, make sure that the following prerequisites are met:

  • You must have valid access credentials (bearer token) and certificate.
  • Make sure that your AI agent framework supports the MCP protocol.
  • To use the data assets tools (external tables), the MCP Server requires user-provided configuration values whenever the agent requests them. The following are the values that the agent expects:
    • container_id
    • presto_instance_crn
    • presto_engine_id
    • container_type

Remote MCP server functional overview

The remote MCP server serves as a bridge between AI framework and the watsonx.data sources like document libraries, document sets, and tables. It enables seamless discovery, interaction, and intelligent querying of document libraries using the Model Context Protocol (MCP).

  • Static Tools and MCP Prompt: The server exposes 6 static tools and one MCP prompt. The client should fetch the prompt and use it as a system instruction
  • Agent Interaction: AI agents establish a connection with the MCP server using the MCP protocol. After the connection is established, they can discover and all registered document libraries.
  • Query Processing: The MCP server receives natural language queries from agents, translates them into appropriate API calls to the relevant document library, and returns the results in a human-readable format.

Connect to the remote MCP Server

To connect to the remote MCP server, use the following endpoint:

https://<your-instance-url>/api/v2/mcp/

Replace <your-instance-url> with the URL of your specific watsonx.data instance. Agents use this endpoint to discover and interact with available document libraries.

Integration options for remote MCP server

You can integrate a remote MCP server with watsonx Orchestrate and other agentic frameworks. For more details, see the following topics:

Limitations of Remote MCP Server

  • Document libraries, document sets, and data assets (tables) must include descriptions that accurately represent the data they hold. The agent relies heavily on these descriptions to select the correct data source for queries.

Parent topic: Retrieval service