![]() |
VOOZH | about |
Google ADK (Agent Development Kit) is a powerful, model-agnostic framework for building AI agents that can interact with various data sources and services. When combined with CData Connect AI Remote MCP, you can leverage Google ADK to build intelligent agents that interact with your Amazon Athena data in real-time through natural language queries. This article outlines the process of connecting to Amazon Athena using Connect AI Remote MCP and configuring a Google ADK agent to interact with your Amazon Athena data through ADK Web.
CData Connect AI offers a dedicated cloud-to-cloud interface for connecting to Amazon Athena data. The CData Connect AI Remote MCP Server enables secure communication between Google ADK agents and Amazon Athena. This allows your agents to read from and take actions on your Amazon Athena data, 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 Amazon Athena. This leverages server-side processing to swiftly deliver the requested Amazon Athena data.
In this article, we show how to configure a Google ADK agent to conversationally explore (or Vibe Query) your data using natural language. With Connect AI you can build agents with access to live Amazon Athena data, plus hundreds of other sources.
CData provides the easiest way to access and integrate live data from Amazon Athena. Customers use CData connectivity to:
Users frequently integrate Athena with analytics tools like Tableau, Power BI, and Excel for in-depth analytics from their preferred tools.
To learn more about unique Amazon Athena use cases with CData, check out our blog post: https://www.cdata.com/blog/amazon-athena-use-cases.
Connectivity to Amazon Athena from Google ADK agents is made possible through CData Connect AI Remote MCP. To interact with Amazon Athena data from your ADK agent, we start by creating and configuring a Amazon Athena connection in CData Connect AI.
To authorize Amazon Athena requests, provide the credentials for an administrator account or for an IAM user with custom permissions: Set to the access key Id. Set to the secret access key.
Note: Though you can connect as the AWS account administrator, it is recommended to use IAM user credentials to access AWS services.
To obtain the credentials for an IAM user, follow the steps below:
To obtain the credentials for your AWS root account, follow the steps below:
If you are using the CData Data Provider for Amazon Athena 2018 from an EC2 Instance and have an IAM Role assigned to the instance, you can use the IAM Role to authenticate. To do so, set to true and leave and empty. The CData Data Provider for Amazon Athena 2018 will automatically obtain your IAM Role credentials and authenticate with them.
In many situations it may be preferable to use an IAM role for authentication instead of the direct security credentials of an AWS root user. An AWS role may be used instead by specifying the . This will cause the CData Data Provider for Amazon Athena 2018 to attempt to retrieve credentials for the specified role. If you are connecting to AWS (instead of already being connected such as on an EC2 instance), you must additionally specify the and of an IAM user to assume the role for. Roles may not be used when specifying the and of an AWS root user.
For users and roles that require Multi-factor Authentication, specify the and connection properties. This will cause the CData Data Provider for Amazon Athena 2018 to submit the MFA credentials in a request to retrieve temporary authentication credentials. Note that the duration of the temporary credentials may be controlled via the (default 3600 seconds).
In addition to the and properties, specify , and . Set to the region where your Amazon Athena data is hosted. Set to a folder in S3 where you would like to store the results of queries.
If is not set in the connection, the data provider connects to the default database set in Amazon Athena.
๐ Configuring a connection (Salesforce is shown)A Personal Access Token (PAT) is used to authenticate the connection to Connect AI from your Google ADK agent. It is best practice to create a separate PAT for each service to maintain granularity of access.
With the connection configured and a PAT generated, we are ready to connect to Amazon Athena data from your Google ADK agent.
Follow these steps to configure your Google ADK agent to connect to CData Connect AI. You can use our pre-built agent as a starting point, available at https://github.com/CDataSoftware/adk-mcp-client, or follow the instructions below to create your own.
pip install google-genkit google-adk
MCP_SERVER_URL=https://mcp.cloud.cdata.com/mcp MCP_USERNAME=YOUR_EMAIL MCP_PASSWORD=YOUR_PATReplace YOUR_EMAIL with your Connect AI email address and YOUR_PAT with the Personal Access Token created in Step 1.
import os
import base64
from google.adk.agents import LlmAgent
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPConnectionParams
from dotenv import load_dotenv
# Load environment variables
load_dotenv()
# Get configuration from environment
MCP_SERVER_URL = os.getenv('MCP_SERVER_URL', 'https://mcp.cloud.cdata.com/mcp')
MCP_USERNAME = os.getenv('MCP_USERNAME', '')
MCP_PASSWORD = os.getenv('MCP_PASSWORD', '')
# Create auth header for MCP server
auth_header = {}
if MCP_USERNAME and MCP_PASSWORD:
credentials = f"{MCP_USERNAME}:{MCP_PASSWORD}"
auth_header = {"Authorization": f"Basic {base64.b64encode(credentials.encode()).decode()}"}
# Define your agent with CData MCP tools
root_agent = LlmAgent(
model='gemini-2.0-flash-exp', # You can use any supported model
name='data_query_assistant',
instruction="""You are a data query assistant with access to Amazon Athena data through CData Connect AI.
You can help users explore and query their Amazon Athena data in real-time.
Use the available MCP tools to:
- List available databases and schemas
- Explore table structures
- Execute SQL queries
- Provide insights about the data
Always explain what you're doing and format results clearly.""",
tools=[
MCPToolset(
connection_params=StreamableHTTPConnectionParams(
url=MCP_SERVER_URL,
headers=auth_header
)
)
],
)
adk web --port 5000 .
Note: If you installed ADK with pip install --user, the adk command may not be in your PATH. You can either:
With your Google ADK agent configured and connected to CData Connect AI, you can now build sophisticated agents that interact with your Amazon Athena data using natural language. The MCP integration provides your agents with powerful data access capabilities.
Your Google ADK agent has access to the following CData Connect AI MCP tools:
Here are some examples of what your Google ADK agents can do with live Amazon Athena data access:
Once deployed to ADK Web, you can interact with your agent through natural language queries. For example:
Your Google ADK agent will automatically translate these natural language queries into appropriate SQL queries and execute them against your Amazon Athena data through the CData Connect AI MCP Server, providing real-time insights without requiring users to write complex SQL or understand the underlying data structure.
To get live data access to hundreds of SaaS, Big Data, and NoSQL sources directly from your Google ADK agents and cloud applications, try CData Connect AI today!
Learn more about CData Connect AI or sign up for free trial access:
Free Trial