From Models to Agents: Shipping Enterprise AI Faster with Google’s MCP Toolbox & Agent Development Kit


Why another “agent framework”?
Large-language models (LLMs) are superb at generating prose, but production-grade systems need agents that can reason, plan, call tools, and respect enterprise guard-rails. Traditionally, that means:
- Hand-rolling connectors to databases & APIs
- Adding authentication, rate-limits, and connection pools
- Patching in tracing & metrics later
- Hoping your YAML jungle survives the next refactor
Google’s new duo—MCP Toolbox and the Agent Development Kit (ADK)—eliminates that toil so you can treat agent development like ordinary software engineering.
MCP Toolbox in one minute ⏳
What | Why it matters |
---|---|
Open-source MCP server | Implements the emerging Model Context Protocol; any compliant agent can call tools with a single gRPC/HTTP hop. |
YAML-driven “sources → tools → toolsets” | Declarative config auto-generates secure SQL & vector-search endpoints—zero boilerplate. |
Built-in auth & RBAC | authRequired and authenticatedParameters enforce per-call identity without leaking tokens to the LLM. |
Observability out of the box | OpenTelemetry traces and structured logs flow straight to Cloud Monitoring. |
Minimal YAML example
# tools.yaml
sources:
flights-db:
kind: cloud-sql-postgres
project: corp-air
region: us-central1
instance: prod
user: agent_app
password: $POSTGRES_PASS
database: flights
tools:
get_flight_by_id:
kind: postgres-sql
source: flights-db
statement: "SELECT * FROM flights WHERE id = $1"
parameters:
- name: id
type: int
description: Unique flight id
toolsets:
flight_tools:
- get_flight_by_id
$ pip install genai-toolbox
$ mcp-toolbox serve --tools tools.yaml
The MCP Toolbox now exposes get_flight_by_id
; any MCP-aware agent can invoke it by name, and Toolbox handles pooling, auth, and SQL-injection safety.
Meet the Agent Development Kit (ADK)
ADK is a model-agnostic runtime that lets you compose single agents or multi-agent teams in Python or Java—think “FastAPI for agents.”
from adk import Agent, Tool
from adk.models import GeminiPro # or OpenAI, Ollama, etc.
llm = GeminiPro()
# Wrap the MCP tool as an ADK Tool object
flight_tool = Tool.from_mcp("http://localhost:8080", "get_flight_by_id")
flight_agent = Agent(
name="FlightLookup",
model=llm,
tools=[flight_tool],
system_prompt="You are a helpful flight assistant."
)
if __name__ == "__main__":
print(flight_agent("When does flight 714 depart?"))
ADK handles function-call serialization, retries, and schema validation—so you stay focused on business logic.
Reference Architecture
- User → front-end (chat, Slack, REST API)
- ADK agent(s) → route intent, orchestrate planners/executors
- MCP Toolbox → exposes SQL, vector search, NL2SQL patterns over Cloud SQL / AlloyDB / BigQuery
- Databases & external APIs → secure data plane
- Observability → OpenTelemetry → Cloud Trace + Cloud Monitoring
End-to-end sample ✈️
# 1 Provision a Postgres instance on Cloud SQL
gcloud sql instances create flights --database-version=POSTGRES_15 ...
# 2 Load sample data (omitted)
# 3 Start MCP Toolbox
export POSTGRES_PASS=$(gcloud sql users ...)
mcp-toolbox serve --tools tools.yaml
# 4 Run the ADK agent script
python flight_agent.py
Ask the agent: “Is there a later flight to Boston with an empty window seat?”
Behind the scenes it chains NL2SQL → MCP Toolbox → Postgres query → reasoning → answer.
Deployment tips
- Cloud Run for stateless REST/gRPC endpoints; autoscale to zero.
- GKE for high-QPS multi-agent clusters—mount MCP config as a secret and use Cloud SQL Auth Proxy.
- CI/CD – treat
tools.yaml
like code; linting failures block production deploys, giving you SQL-level change review.
Resources & next steps
Happy hacking — and let me know what agents you build!
Comments
Post a Comment