0A

03sarath/adk-mcp-app

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 12 forks 质量 42 趋势 0

A sophisticated web application that combines with to create an intelligent cocktail recommendation system.

概览

A sophisticated web application that combines with to create an intelligent cocktail recommendation system. This application demonstrates how to integrate AI agents with external APIs through MCP tools. This application serves as a of building AI-powered applications that can: - through MCP (Model Context Protocol) - using Google's Gemini AI model - via WebSocket connections - for more complex AI agent applications - : Cocktail menu recommendations and ingredient suggestions - : Learning about mixology and cocktail recipes - : Interactive cocktail discovery and trivia - : API integration patterns for AI applications : The main web application that orchestrates everything.

README

以下为原文 README 节选,完整内容请查看原文。

🍸 ADK MCP Cocktail Application

A sophisticated web application that combines Google’s Agent Development Kit (ADK) with Model Context Protocol (MCP) to create an intelligent cocktail recommendation system. This application demonstrates how to integrate AI agents with external APIs through MCP tools.

🎯 Use Case & Purpose

This application serves as a practical example of building AI-powered applications that can:

  • Interact with external APIs through MCP (Model Context Protocol)
  • Provide intelligent responses using Google’s Gemini AI model
  • Handle real-time communication via WebSocket connections
  • Serve as a foundation for more complex AI agent applications

Real-World Applications:

  • Restaurant/Hospitality: Cocktail menu recommendations and ingredient suggestions
  • Educational: Learning about mixology and cocktail recipes
  • Entertainment: Interactive cocktail discovery and trivia
  • Business: API integration patterns for AI applications

🏗️ Architecture Overview

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   Web Browser   │◄──►│   FastAPI App   │◄──►│   MCP Server    │
│   (Frontend)    │    │   (main.py)     │    │ (cocktail.py)   │
└─────────────────┘    └─────────────────┘    └─────────────────┘
                              │                        │
                              ▼                        ▼
                       ┌─────────────────┐    ┌─────────────────┐
                       │  ADK Agent      │    │ TheCocktailDB   │
                       │  (Gemini AI)    │    │     API         │
                       └─────────────────┘    └─────────────────┘

📁 Project Structure

adk_mcp_app/
├── main.py                 # FastAPI web application with ADK integration
├── mcp_server/
│   └── cocktail.py        # MCP server with cocktail API tools
├── static/
│   └── index.html         # Web frontend with WebSocket client
├── requirements.txt       # Python dependencies
└── README.md             # This documentation

🔧 Core Components

1. main.py - FastAPI Web Application

Purpose: The main web application that orchestrates everything.

Key Features:

  • FastAPI Web Server: Handles HTTP requests and WebSocket connections
  • ADK Agent Integration: Creates and manages Google Gemini AI agents
  • MCP Tool Integration: Connects to the MCP server for cocktail tools
  • Session Management: Handles user sessions and conversation history
  • Error Handling: Graceful fallbacks when MCP tools are unavailable

Main Components:

# Core Services
session_service = InMemorySessionService()      # Manages user sessions
artifacts_service = InMemoryArtifactService()   # Handles artifacts
ct_server_params = StdioServerParameters(...)   # MCP server connection

# Agent Creation
def create_agent(server_params):                # Creates ADK agent with MCP tools
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →