MCP AI代理服务

这是一款集成 MCP 协议的 AI 代理服务,核心功能是通过 Wikipedia 代理获取结构化动物数据并生成查询应答,适用于构建和部署云端 AI Agent 应用。

  • by harshithasriadulapuram
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 HarshithaSri01/mcp-agent-lab

使用说明

Location Intelligence ADK Agent with MCP

This is a mini-project for the ADK + MCP track. It implements an AI agent that uses the Model Context Protocol (MCP) to connect to a Wikipedia proxy (acting as a remote "Zoo Server") to retrieve structured data about animals and generate a response.

Features

  • Built with Google ADK (google.adk).
  • Connects to an MCP server using McpToolset (mcp standard).
  • Fast and reliable deployment to Google Cloud Run using a lightweight FastAPI wrapper and Docker.

Running Locally

  1. Set your GOOGLE_API_KEY:

    export GOOGLE_API_KEY="your-api-key-here"
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Run the application:

    uvicorn main:app --port 8080
    
  4. You can then query the agent:

    curl -X POST "http://localhost:8080/query" \
         -H "Content-Type: application/json" \
         -d '{"query": "Tell me about pandas."}'
    

Deploying to Cloud Run

Assuming you have gcloud set up and configured:

gcloud run deploy mcp-adk-agent \
  --source . \
  --region us-central1 \
  --allow-unauthenticated \
  --set-env-vars GOOGLE_API_KEY=YOUR_API_KEY