tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Generative AI > Google Gemini API > ADK with Databricks as MCP Server

ADK with Databricks as MCP Server

Author: Venkata Sudhakar

The Model Context Protocol (MCP) defines a standard way for AI agents to discover and call tools exposed by external servers. Databricks ships a native MCP server that exposes Genie Spaces and Unity Catalog functions as MCP tools. ADK supports MCP natively via MCPToolset, so connecting an ADK agent to Databricks requires zero custom connector code - just a server URL and token.

For ShopMax India, this means the same Genie Spaces and UC functions that data engineers register in Databricks become immediately available to ADK agents as first-class tools. The MCP server handles authentication, schema discovery, and tool invocation - the agent simply picks the right tool for each question.

The below example shows how to connect an ADK agent to the Databricks MCP server and list the tools it discovers automatically from the ShopMax India workspace.


It gives the following output,

Discovered 6 tools from Databricks MCP server:
  - genie_ask_shopmax_sales: Query ShopMax sales data using natural lan...
  - genie_ask_shopmax_inventory: Query ShopMax inventory and warehouse ...
  - uc_fn_get_top_products: Unity Catalog - return top N products by re...
  - uc_fn_customer_segment: Unity Catalog - classify customer by purchas...
  - uc_fn_stock_alert: Unity Catalog - return items below reorder level...
  - databricks_run_sql: Execute read-only SQL on ShopMax Delta Lake tab...

The below example shows the agent using a discovered MCP tool to answer a ShopMax India inventory question, with ADK automatically handling the MCP protocol round-trip.


It gives the following output,

Analyst: Show me all products with stock below reorder level across all warehouses.
Agent: Using uc_fn_stock_alert from Databricks MCP server...
  3 items below reorder level:
  - OnePlus 12 5G  | Delhi warehouse   | Stock: 8  | Reorder: 25
  - Samsung S24    | Pune warehouse    | Stock: 3  | Reorder: 20
  - boAt Airdopes  | Chennai warehouse | Stock: 12 | Reorder: 30

Analyst: What are the top 3 products by revenue in the last 30 days?
Agent: Using uc_fn_get_top_products from Databricks MCP server...
  Top 3 products (last 30 days, all cities):
  1. Samsung 55" QLED TV  - Rs 62,40,000
  2. iPhone 15 Pro 256GB  - Rs 48,18,000
  3. MacBook Air M3       - Rs 31,68,000

The Databricks MCP server approach gives ShopMax India a protocol-native integration where new tools registered in Databricks Unity Catalog or new Genie Spaces are automatically available to ADK agents on the next connection - no code changes needed. This makes the data platform and the agent platform independently evolvable by separate teams.


 
  


  
bl  br