Integrate Kilo Code CLI with Live XML Data via CData Connect AI

Yazhini G
Yazhini G
Technical Marketing Engineer
Use the CData Connect AI Remote MCP Server to give Kilo Code CLI governed, real-time access to live XML data from within your terminal-based coding agent.

Kilo Code is an open-source AI coding agent that runs in the terminal through the Kilo CLI. It connects to a wide range of large language model (LLM) providers and supports the Model Context Protocol (MCP) through its configuration file, so you can register external tools and data sources and give the agent access to live systems beyond the model's training data.

By integrating Kilo Code CLI with CData Connect AI through the built-in MCP Server, you can ask Kilo questions about live XML data in natural language, and the agent calls Connect AI tools to find and retrieve the data it needs. Connect AI governs every request, so the agent reaches only sources you've authorized.

This article explains how to configure XML connectivity in Connect AI, generate the required personal access token, install Kilo Code CLI, connect an LLM provider, add the Connect AI MCP Server in a project-level configuration file, and verify the integration by asking Kilo about live XML data.

Step 1: Configure XML connectivity for Kilo Code

Connectivity to XML from Kilo Code is made possible through Connect AI's Remote MCP Server. To interact with XML data from Kilo, start by creating and configuring a XML connection in Connect AI.

  1. Log into Connect AI, click Sources, and then click Add Connection
  2. Adding a connection in Connect AI
  3. Select XML from the Add Connection panel
  4. Selecting data source
  5. Enter the necessary authentication properties to connect to XML.

    Connecting to Local or Cloud-Stored (Box, Google Drive, Amazon S3, SharePoint) XML Files

    CData Drivers let you work with XML files stored locally and stored in cloud storage services like Box, Amazon S3, Google Drive, or SharePoint, right where they are.

    Setting connection properties for local files

    Set the URI property to local folder path.

    Setting connection properties for files stored in Amazon S3

    To connect to XML file(s) within Amazon S3, set the URI property to the URI of the Bucket and Folder where the intended XML files exist. In addition, at least set these properties:

    • AWSAccessKey: AWS Access Key (username)
    • AWSSecretKey: AWS Secret Key

    Setting connection properties for files stored in Box

    To connect to XML file(s) within Box, set the URI property to the URI of the folder that includes the intended XML file(s). Use the OAuth authentication method to connect to Box.

    Dropbox

    To connect to XML file(s) within Dropbox, set the URI proprerty to the URI of the folder that includes the intended XML file(s). Use the OAuth authentication method to connect to Dropbox. Either User Account or Service Account can be used to authenticate.

    SharePoint Online (SOAP)

    To connect to XML file(s) within SharePoint with SOAP Schema, set the URI proprerty to the URI of the document library that includes the intended XML file. Set User, Password, and StorageBaseURL.

    SharePoint Online REST

    To connect to XML file(s) within SharePoint with REST Schema, set the URI proprerty to the URI of the document library that includes the intended XML file. StorageBaseURL is optional. If not set, the driver will use the root drive. OAuth is used to authenticate.

    Google Drive

    To connect to XML file(s) within Google Drive, set the URI property to the URI of the folder that includes the intended XML file(s). Use the OAuth authentication method to connect and set InitiateOAuth to GETANDREFRESH.

    The DataModel property is the controlling property over how your data is represented into tables and toggles the following basic configurations.

    • Document (default): Model a top-level, document view of your XML data. The data provider returns nested elements as aggregates of data.
    • FlattenedDocuments: Implicitly join nested documents and their parents into a single table.
    • Relational: Return individual, related tables from hierarchical data. The tables contain a primary key and a foreign key that links to the parent document.

    See the Modeling XML Data chapter for more information on configuring the relational representation. You will also find the sample data used in the following examples. The data includes entries for people, the cars they own, and various maintenance services performed on those cars.

    Configuring a connection (Salesforce is shown)
  6. Click Save & Test
  7. Navigate to the Permissions tab and update 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 Kilo Code. 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 Personal 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 won't be shown again

With the XML connection configured and a PAT generated, Kilo Code can now connect to XML data through Connect AI.

Step 2: Install Kilo Code CLI and connect an LLM provider

Kilo Code CLI is installed through npm, so you need Node.js and npm on your machine. After installation, connect an LLM provider so the agent can interpret prompts and call MCP tools.

  1. Open a terminal (PowerShell or Windows Terminal on Windows, Terminal on macOS) and check whether Node.js and npm are installed:
    node --version
    npm --version

    Note: If either command is not recognized, install the current Node.js LTS version from nodejs.org and reopen your terminal.

  2. Install Kilo Code CLI:
    npm install -g @kilocode/cli
  3. Verify the installation, and then launch Kilo:
    kilo --version
    kilo
    Installing and launching Kilo Code CLI
  4. In the Kilo prompt, type /connect and select Connect provider Running the /connect command in Kilo
  5. Choose an LLM provider from the list. In this example, OpenAI / Codex is used, but you can select any supported provider, such as Kilo Gateway, Anthropic, or Google Selecting an LLM provider in Kilo
  6. If prompted, enter your provider API key and press Enter to submit Entering the provider API key
  7. Select the model you want Kilo to use. In this example, GPT-5.5 is selected Selecting a model in Kilo

Step 3: Add the Connect AI MCP Server in Kilo

Next, add the Connect AI Remote MCP Server in a project-specific configuration file. A project-level file means you don't need to locate Kilo's global configuration directory.

  1. Create a new project folder and open a new kilo.json file in a text editor.

    On Windows (PowerShell):

    mkdir "$HOME\kilo-cdata-test"
    cd "$HOME\kilo-cdata-test"
    notepad kilo.json

    On macOS (Terminal):

    mkdir ~/kilo-cdata-test
    cd ~/kilo-cdata-test
    nano kilo.json
  2. Paste the following configuration into the file:
    {
      "mcp": {
        "cdata-connect-ai": {
          "type": "remote",
          "url": "https://mcp.cloud.cdata.com/mcp",
          "enabled": true,
          "timeout": 15000,
          "headers": {
            "Authorization": "Basic your_base64_encoded_email_PAT"
          }
        }
      }
    }

    Note: Kilo will use Basic authentication with Connect AI. Combine your Connect AI user email and the PAT you created earlier in the format email:PAT, base64 encode the combined string, and prefix it with Basic. For example, given [email protected]:ABC123...XYZ789, the Authorization value becomes something like: Basic dXNlckBkb21haW4uY29tOkFCQzEyMy4uLlhZWjc4OQ==

  3. Save the file as kilo.json. In nano, press Ctrl+O, then Enter to save, and Ctrl+X to exit

Note: This configuration stores the credential in a local file. Don't commit this file to Git or share it. For a longer-term setup, Kilo also supports environment variable references such as {env:CDATA_MCP_AUTH}.

Step 4: Verify the MCP connection

Before sending prompts, confirm that Kilo can reach the Connect AI MCP Server.

  1. In the same terminal window, run:
    kilo mcp list
    The cdata-connect-ai server should be listed as connected Verifying the MCP connection with kilo mcp list
  2. Launch Kilo from the project folder, type /mcps, and press Enter Running the /mcps command in Kilo
  3. Confirm that cdata-connect-ai is listed as connected and Enabled. If it is not enabled, press Space to toggle it on Confirming the MCP server is enabled in Kilo

With the MCP server added and enabled, Kilo is ready to work with live XML data through Connect AI.

Step 5: Ask Kilo about live XML data

With the integration complete, use Kilo to interact with live XML data through natural language prompts handled by the configured LLM.

  1. Start with a tool discovery prompt to confirm the available MCP tools:
    • Show me all the tools available from the cdata-connect-ai MCP server.
  2. Kilo returns the tools Connect AI exposes to the agent for discovering and retrieving data, such as search_context, getCatalogs, and queryData
  3. Then ask questions about your data, for example:
    • List catalogs from cdata-connect-ai mcp server.
    • What data is available for XML?
    • Summarize the most recent records in XML data
    Kilo calling Connect AI tools to list available catalogs

Kilo Code CLI now calls the Connect AI MCP Server and retrieves live XML data through remote MCP tools, directly from your terminal.

Get CData Connect AI

To access hundreds of SaaS, big data, and NoSQL sources directly from your cloud applications, try CData Connect AI today. Download a free 14-day trial of CData Connect AI, and our Support Team is available to help with any questions you have.

Ready to get started?

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

Free Trial