How to Connect to Live SAP Ariba Source Data from Gemini CLI (via CData Connect AI)

Jerod Johnson
Jerod Johnson
Senior Technology Evangelist
Leverage the CData Connect AI Remote MCP Server to enable Gemini CLI to securely read and take actions on your SAP Ariba Source data for you.

Gemini CLI is a command-line interface tool that provides direct access to Google's Gemini AI models for code generation, text analysis, and conversational AI capabilities. When combined with CData Connect AI Remote MCP, you can leverage Gemini CLI to interact with your SAP Ariba Source data in real-time through natural language queries. This article outlines the process of connecting to SAP Ariba Source using Connect AI Remote MCP and configuring Gemini CLI to interact with your SAP Ariba Source data.

CData Connect AI offers a dedicated cloud-to-cloud interface for connecting to SAP Ariba Source data. The CData Connect AI Remote MCP Server enables secure communication between Gemini CLI and SAP Ariba Source. This allows you to ask questions and take actions on your SAP Ariba Source data using natural language through Gemini CLI, all without the need for data replication to a natively supported database. With its inherent optimized data processing capabilities, CData Connect AI efficiently channels all supported SQL operations, including filters and JOINs, directly to SAP Ariba Source. This leverages server-side processing to swiftly deliver the requested SAP Ariba Source data.

In this article, we show how to configure Gemini CLI to conversationally explore (or Vibe Query) your data using natural language. With Connect AI you can query and interact with live SAP Ariba Source data, plus hundreds of other sources.

Step 1: Configure SAP Ariba Source Connectivity for Gemini CLI

Connectivity to SAP Ariba Source from Gemini CLI is made possible through CData Connect AI Remote MCP. To interact with SAP Ariba Source data from Gemini CLI, we start by creating and configuring a SAP Ariba Source connection in CData Connect AI.

  1. Log into Connect AI, click Sources, and then click Add Connection
  2. Select "SAP Ariba Source" from the Add Connection panel
  3. Enter the necessary authentication properties to connect to SAP Ariba Source.

    In order to connect with SAP Ariba Source, set the following:

    • API: Specify which API you would like the provider to retrieve SAP Ariba data from. Select the Supplier, Sourcing Project Management, or Contract API based on your business role (possible values are SupplierDataAPIWithPaginationV4, SourcingProjectManagementAPIV2, or ContractAPIV1).
    • DataCenter: The data center where your account's data is hosted.
    • Realm: The name of the site you want to access.
    • Environment: Indicate whether you are connecting to a test or production environment (possible values are TEST or PRODUCTION).

    If you are connecting to the Supplier Data API or the Contract API, additionally set the following:

    • User: Id of the user on whose behalf API calls are invoked.
    • PasswordAdapter: The password associated with the authenticating User.

    If you're connecting to the Supplier API, set ProjectId to the Id of the sourcing project you want to retrieve data from.

    Authenticating with OAuth

    After setting connection properties, you need to configure OAuth connectivity to authenticate.

    • Set AuthScheme to OAuthClient.
    • Register an application with the service to obtain the APIKey, OAuthClientId and OAuthClientSecret.

      For more information on creating an OAuth application, refer to the Help documentation.

    Automatic OAuth

    After setting the following, you are ready to connect:

      APIKey: The Application key in your app settings. OAuthClientId: The OAuth Client Id in your app settings. OAuthClientSecret: The OAuth Secret in your app settings.

    When you connect, the provider automatically completes the OAuth process:

    1. The provider obtains an access token from SAP Ariba and uses it to request data.
    2. The provider refreshes the access token automatically when it expires.
    3. The OAuth values are saved in memory relative to the location specified in OAuthSettingsLocation.
  4. Click Save & Test
  5. Navigate to the Permissions tab in the Add SAP Ariba Source Connection page and update the User-based permissions.

Add a Personal Access Token

A Personal Access Token (PAT) is used to authenticate the connection to Connect AI from Gemini CLI. It is best practice to create a separate PAT for each service to maintain granularity of access.

  1. Click on the Gear icon () at the top right of the Connect AI app to open the settings page.
  2. On the Settings page, go to the Access Tokens section and click Create PAT.
  3. Give the PAT a name and click Create.
  4. The personal access token is only visible at creation, so be sure to copy it and store it securely for future use.

With the connection configured and a PAT generated, we are ready to connect to SAP Ariba Source data from Gemini CLI.

Step 2: Configure Gemini CLI for CData Connect AI

Follow these steps to configure Gemini CLI to connect to CData Connect AI:

  1. Ensure Gemini CLI is installed on your system. If not, install it using npm:
    npm install -g @google-gemini/cli
  2. Locate your Gemini CLI settings file. If the file doesn't exist, create it:
    • Linux/Unix/Mac: ~/.gemini/settings.json
    • Windows: %USERPROFILE%\.gemini\settings.json
  3. Add the CData Connect AI Remote MCP Server to the mcpServers object in your settings file. Replace YOUR_EMAIL and YOUR_PAT with your Connect AI email address and the PAT created previously:
    {
      "mcpServers": {
        "cdata-connect-cloud": {
          "httpUrl": "https://mcp.cloud.cdata.com/mcp",
          "headers": {
            "Authorization": "Basic YOUR_EMAIL:YOUR_PAT"
          }
        }
      }
    }    
    For example, if your email is [email protected] and your PAT is Uu90pt5vEO..., the Authorization header would be:
    "Authorization": "Basic [email protected]:Uu90pt5vEO..."
  4. Save the settings file. Gemini CLI will now use the CData Connect AI MCP Server for data operations.

Step 3: Query Live SAP Ariba Source Data with Natural Language

With Gemini CLI configured and connected to CData Connect AI, you can now interact with your SAP Ariba Source data using natural language queries. The MCP integration allows you to ask questions and receive responses from the SAP Ariba Source data source in real-time.

Start using Gemini CLI to explore your data:

  1. Open your terminal and start a Gemini CLI session:
    gemini
  2. You can now use natural language to query your SAP Ariba Source data. For example:
    • "Show me all customers from the last 30 days"
    • "What are my top performing products?"
    • "Analyze sales trends for Q4"
    • "List all active projects with their current status"
  3. Gemini CLI will automatically translate your natural language queries into appropriate SQL queries and execute them against your SAP Ariba Source data through the CData Connect AI MCP Server.

The combination of Gemini CLI's natural language processing capabilities and CData Connect AI's robust data connectivity enables you to explore and analyze your SAP Ariba Source data without writing complex SQL queries or needing deep technical knowledge of the underlying data structure.

Get CData Connect AI

To get live data access to 300+ SaaS, Big Data, and NoSQL sources directly from your cloud applications, try CData Connect AI today!

Ready to get started?

Learn more about CData Connect AI or sign up for free trial access:

Free Trial