GitHub Copilot


GitHub Copilot


Prerequisites

Before you can configure and use GitHub Copilot with Connect AI, you must do the following:

  1. Connect a data source to your Connect AI account. See Sources for more information.

  2. Install and enable GitHub Copilot in Visual Studio Code (or any IDE supporting GitHub Copilot).

  3. Generate a Personal Access Token (PAT) on the Settings page. Copy this down, as it acts as your password during authentication. Generate an OAuth JWT bearer token. Copy this down, as it acts as your password during authentication.

Create the Configuration File

  1. Create a folder named .vscode in your project repository. Within this folder, create a file named mcp.json and add the following configuration. Replace Basic <your_base64_encoded_email_PAT> with Basic and the Base64-encoded value of username:PAT (the PAT was generated in the prerequisites).Replace Basic <your_base64_encoded_email_PAT> with Bearer and the OAuth JWT bearer token you created in the prerequisites.

    {
      "servers": {
          "cdata-mcp": {
          "type": "http",
          "url": "https://mcp.cloud.cdata.com/mcp",
          "headers": {
             "Authorization": "Basic <your_base64_encoded_email_PAT>"
         }
       }
      },
     "inputs": []
    }
    

Start the MCP Server

  1. Click Start within your IDE to start the MCP server. If the MCP server starts without error, it displays Running.

  2. Toggle Chat in the title bar to display the Chat pane on the right.

  3. Click Add Context in the bottom of the Chat pane. In the search bar, select Tools. Then search for CData. Add cdata-mcp All Tools.

Chat with GitHub Copilot

You can now chat with GitHub Copilot and issue contextual prompts. As a test, you can provide the MCP server with a simple prompt, such as a list of tables for a particular connection. GitHub Copilot uses the Connect AI tools such as getCatalogs, getSchemas, and getTables to retrieve data from the connected data source.