A Google ADK agent that provides natural language access to CData Connect Cloud databases through the MCP (Model Context Protocol).
- 🔍 Natural Language Queries: Ask questions about your data in plain English
- 📊 Database Exploration: Browse catalogs, schemas, and tables
- 🔧 SQL Execution: Run queries on connected data sources
- 🌐 Web Interface: Visual interface through ADK Web
- Python 3.8+
- Google AI API key
- CData Connect Cloud MCP server credentials
- Install ADK and dependencies:
pip install google-adk python-dotenv
Note: If you install with
pip install --user
(or pip defaults to user installation), theadk
command may not be in your PATH. You'll need to either:
- Use the full path:
~/Library/Python/3.x/bin/adk
(on macOS)- Add to PATH:
export PATH="$HOME/Library/Python/3.x/bin:$PATH"
in your shell config- Use a virtual environment where the PATH is automatically configured
- Configure environment variables:
- Copy the
.env.example
file to.env
:cp .env.example .env
- Edit
.env
and add your credentials:# Google AI API Configuration GOOGLE_API_KEY=your_google_api_key_here # CData MCP Server Configuration MCP_SERVER_URL=https://mcp.cloud.cdata.com/mcp MCP_USERNAME=your_email@example.com MCP_PASSWORD=your_mcp_password_here # Optional: Gemini Model (defaults to gemini-2.0-flash-exp) GEMINI_MODEL=gemini-2.0-flash-exp
- Copy the
- Start ADK Web from this directory:
adk web --port 5000 .
-
Open the web interface (typically http://localhost:5000)
-
Select the agent: Choose
cdata_query_assistant
from the dropdown -
Start querying your data with natural language:
- "What databases are available?"
- "Show me the tables in MongoDB1"
- "List the schemas in the SQL2 database"
- "What columns are in the customers table?"
- Explore databases: "List all available catalogs"
- View schemas: "Show schemas in the MongoDB1 catalog"
- Browse tables: "What tables are in the dbo schema?"
- Examine structure: "Describe the columns in the orders table"
- Query data: "Show me recent orders from the sales database"
- ADK Agent: The
LlmAgent
receives your natural language queries - MCP Toolset: Connects to CData Connect Cloud via MCP protocol
- Tool Discovery: Automatically discovers available data operations
- Gemini AI: Understands queries and determines which tools to use
- Data Access: Executes operations and returns formatted results
getCatalogs
- List available databasesgetSchemas
- View schemas in a databasegetTables
- Browse tables in a schemagetColumns
- Examine table structuregetProcedures
- List stored proceduresgetProcedureParameters
- View procedure parametersexecuteProcedure
- Run stored proceduresqueryData
- Execute SQL queries
User Query → ADK Web UI → CData MCP Agent → Gemini AI
↓ ↓
Visual Interface MCP Protocol
↓ ↓
Response Display CData Connect Cloud
- Connection errors: Verify MCP_SERVER_URL and credentials
- No tools available: Check MCP server is accessible
- Auth issues: Ensure username/password are correct
- Windows users: Try
adk web --no-reload
if you encounter subprocess errors
- The agent uses Gemini 2.0 Flash for fast, intelligent responses
- All data operations go through CData's secure MCP server
- The web interface provides a better user experience than CLI