VOOZH about

URL: https://www.cdata.com/kb/tech/domino-cloud-dataiku.rst

⇱ Integrating Dataiku with HCL Domino Data via CData Connect AI


Integrating Dataiku with HCL Domino Data via CData Connect AI

πŸ‘ Yazhini G
Yazhini G
Technical Marketing Engineer
Leverage the CData Connect AI Remote MCP Server to enable Dataiku Agents to securely query and act on live HCL Domino data.

Dataiku is a collaborative data science and AI platform that enables teams to design, deploy, and manage machine learning and generative AI projects within a governed environment. It's Agent and GenAI framework allows users to build intelligent agents that can analyze, generate, and act on data through custom workflows and model orchestration.

By integrating Dataiku with CData Connect AI through the built-in MCP (Model Context Protocol) Server, these agents gain secure, real-time access to live HCL Domino data. The integration bridges Dataiku's agent execution environment with CData's governed enterprise connectivity layer, allowing every query or instruction to run safely against authorized data sources without manual exports or staging.

This article demonstrates how to configure HCL Domino connectivity in Connect AI, prepare a Python code environment in Dataiku with MCP support, and create an agent that queries and interacts with live HCL Domino data directly from within Dataiku.

Step 1: Configure HCL Domino Connectivity for Dataiku

Connectivity to HCL Domino from Dataiku is made possible through CData Connect AI's Remote MCP Server. To interact with HCL Domino data from Dataiku, you start by creating and configuring a HCL Domino connection in CData Connect AI.

  1. Log into Connect AI, click Sources, then click Add Connection
  2. πŸ‘ Adding a Connection
  3. Select "HCL Domino" from the Add Connection panel
  4. πŸ‘ Selecting a data source
  5. Enter the necessary authentication properties to connect to HCL Domino.

    Connecting to Domino

    To connect to Domino data, set the following properties:

    • URL: The host name or IP of the server hosting the Domino database. Include the port of the server hosting the Domino database. For example: http://sampleserver:1234/
    • DatabaseScope: The name of a scope in the Domino Web UI. The driver exposes forms and views for the schema governed by the specified scope. In the Domino Admin UI, select the Scopes menu in the sidebar. Set this property to the name of an existing scope.

    Authenticating with Domino

    Domino supports authenticating via login credentials or an Entra ID (formerly Azure AD) OAuth application:

    Login Credentials

    To authenticate with login credentials, set the following properties:

    • AuthScheme: Set this to "OAuthPassword"
    • User: The username of the authenticating Domino user
    • Password: The password associated with the authenticating Domino user

    The driver uses the login credentials to automatically perform an OAuth token exchange.

    EntraID (formerly AzureAD)

    This authentication method uses Entra ID (formerly Azure AD) as an IdP to obtain a JWT token. You need to create a custom OAuth application in Entra ID (formerly Azure AD) and configure it as an IdP. To do so, follow the instructions in the Help documentation. Then set the following properties:

    • AuthScheme: Set this to "EntraID (formerly AzureAD)"
    • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
    • OAuthClientId: The Client ID obtained when setting up the custom OAuth application.
    • OAuthClientSecret: The Client secret obtained when setting up the custom OAuth application.
    • CallbackURL: The redirect URI defined when you registered your app. For example: https://localhost:33333
    • AzureTenant: The Microsoft Online tenant being used to access data. Supply either a value in the form companyname.microsoft.com or the tenant ID.

      The tenant ID is the same as the directory ID shown in the Azure Portal's Entra ID (formerly Azure AD) > Properties page.

    πŸ‘ Configuring a connection (Salesforce is shown)
  6. Click Save & Test
  7. Open the Permissions tab and set user-based permissions
  8. πŸ‘ Updating permissions

Add a Personal Access Token

A Personal Access Token (PAT) is used to authenticate the connection to Connect AI from Dataiku. It is best practice to create a separate PAT for each integration to maintain granular access control

  1. Click the gear icon () at the top right of the Connect AI app to open Settings
  2. On the Settings page, go to the Access Tokens section and click Create PAT
  3. Give the PAT a descriptive name and click Create
  4. πŸ‘ Creating a new PAT
  5. Copy the token when displayed and store it securely. It will not be shown again

With the HCL Domino connection configured and a PAT generated, Dataiku can now connect to HCL Domino data through the Connect AI.

Step 2: Prepare Dataiku and the Code Environment

A dedicated python code environment in Dataiku provides the runtime support needed for MCP-based communication. To enable Dataiku Agents to connect to CData Connect AI, create a Python environment and install the MCP client dependencies required for agent-to-server interaction.

  1. In Dataiku Cloud, open Code Envs
  2. πŸ‘ Dataiku Cloud Code Envs
  3. Click Add a code env to open the DSS settings window
  4. πŸ‘ Open DSS settings for Code Envs
  5. In DSS, click New Python env. Name it (for example, MCP_Package) and choose Python 3.10 (3.10 to 3.13 supported)
  6. πŸ‘ Create Python env
  7. Open Packages to install and add the following pip packages:
    • httpx
    • anyio
    • langchain-mcp-adapters
    πŸ‘ Add MCP client dependencies
  8. Open Containerized execution and under Container runtime additions select Agent tool MCP servers support
  9. πŸ‘ Enable Agent tool MCP servers support
  10. Check Rebuild env and click Save and update to install packages
  11. Back in Dataiku Cloud, open Overview and click Open instance
  12. πŸ‘ Open the DSS instance
  13. Click + New project and select Blank project. Name the project
  14. πŸ‘ Create a blank project

Step 3: Create a Dataiku Agent and connect to the MCP server

The Dataiku Agent serves as the bridge between the Dataiku workspace and Connect AI. To enable this connection, create a custom code-based agent, assign it the configured Python environment, and embed your Connect AI credentials to allow the agent to query and interact with live HCL Domino data.

  1. Go to Agents & GenAI Models and click Create your first agent
  2. πŸ‘ Agents and GenAI Models
  3. Choose Code agent, name it, and for Agent version select Asynchronous agent without streaming
  4. πŸ‘ Agent starter selection
  5. From the tab above select Settings. In Code env selection set Default Python code env to the environment you created (for example, MCP_Package)
  6. πŸ‘ Project settings Code env selection
  7. Return to the Agent Design tab and paste the following code. Replace EMAIL, and PAT with your values
  8. 
    import os
    import base64
    from typing import Dict, Any, List
     
    from dataiku.llm.python import BaseLLM
    from langchain_mcp_adapters.client import MultiServerMCPClient
     
    # ---------- Persistent MCP client (cached between calls) ----------
    _MCP_CLIENT = None
     
    def _get_mcp_client() -> MultiServerMCPClient:
     """Create (or reuse) a MultiServerMCPClient to CData Cloud MCP."""
     global _MCP_CLIENT
     if _MCP_CLIENT is not None:
     return _MCP_CLIENT
     
     # Set creds via env/project variables ideally
     EMAIL = os.getenv("CDATA_EMAIL", "YOUR_EMAIL") 
     PAT = os.getenv("CDATA_PAT", "YOUR_PAT") 
     BASE_URL = "https://mcp.cloud.cdata.com/mcp"
     
     if not EMAIL or PAT == "YOUR_PAT":
     raise ValueError("Set CDATA_EMAIL and CDATA_PAT as env variables or inline in the code.")
     
     token = base64.b64encode(f"{EMAIL}:{PAT}".encode()).decode()
     headers = {"Authorization": f"Basic {token}"}
     
     _MCP_CLIENT = MultiServerMCPClient(
     connections={
     "cdata": {
     "transport": "streamable_http",
     "url": BASE_URL,
     "headers": headers,
     }
     }
     )
     return _MCP_CLIENT
     
     
    def _pick_tool(tools, names: List[str]):
     L = [n.lower() for n in names]
     return next((t for t in tools if t.name.lower() in L), None)
     
     
    async def _route(prompt: str) -> str:
     """
     Simple intent router:
     - 'list connections' / 'list catalogs' -> getCatalogs
     - 'sql: ...' or 'query: ...' -> queryData
     - otherwise -> help text
     """
     client = _get_mcp_client()
     tools = await client.get_tools()
     
     p = prompt.strip()
     low = p.lower()
     
     # 1) List connections (catalogs)
     if "list connections" in low or "list catalogs" in low:
     t = _pick_tool(tools, ["getCatalogs", "listCatalogs"])
     if not t:
     return "No 'getCatalogs' tool found on the MCP server."
     res = await t.ainvoke({})
     return str(res)[:4000]
     
     # 2) Run SQL
     if low.startswith("sql:") or low.startswith("query:"):
     sql = p.split(":", 1)[1].strip()
     t = _pick_tool(tools, ["queryData", "sqlQuery", "runQuery", "query"])
     if not t:
     return "No query-capable tool (queryData/sqlQuery) found on the MCP server."
     try:
     res = await t.ainvoke({"query": sql})
     return str(res)[:4000]
     except Exception as e:
     return f"Query failed: {e}"
     
     # 3) Help
     return (
     "Connected to CData MCP
    
    "
     "Say **'list connections'** to view available sources, or run a SQL like:
    "
     " sql: SELECT * FROM [Salesforce1].[SYS].[Connections] LIMIT 5
    
    "
     "Remember to use bracket quoting for catalog/schema/table names."
     )
     
     
    class MyLLM(BaseLLM):
     async def aprocess(self, query: Dict[str, Any], settings: Dict[str, Any], trace: Any):
     # Extract last user message from the Quick Test payload
     prompt = ""
     try:
     prompt = (query.get("messages") or [])[-1].get("content", "")
     except Exception:
     prompt = ""
     
     try:
     reply = await _route(prompt)
     except Exception as e:
     reply = f"Error: {e}"
     
     # The template expects a dict with a 'text' key
     return {"text": reply}
    
    

    Run a Quick Test

    1. Open Quick Test on the right side panel
    2. Paste the JSON code and click Run test
    3. {
       "messages": [
       {
       "role": "user",
       "content": "list connections"
       }
       ],
       "context": {}
      }
      
      

    Chat with your Agent

    Switch to the Chat tab and try prompting like, "List all connections". The chat output will show a list of connection catalogs.

    πŸ‘ Chat: listing catalogs and running queries

    Get CData Connect AI

    To access hundreds of SaaS, Big Data, and NoSQL sources from your AI agents, try CData Connect AI today.