Get the FREE Ultimate OpenClaw Setup Guide →

AI_Agent_with_MCP

MCP server built with Google’s Agent Development(ADK) Kit featuring multiple specialised agents that collaborate through intelligent routing. The system provides RESTful API endpoints for various capabilities including web searches, data analysis, and code generation while maintaining extensibility through a modular architecture

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zayedrais-ai_agent_with_mcp python server.py \
  --env GROQ_API_KEY="YOUR_GROQ_API_KEY" \
  --env OPENROUTER_API_KEY="YOUR_OPENROUTER_API_KEY"

How to use

This MCP server implements a modular agent system built on Google's Agent Development Kit (ADK) and a FastMCP-based server. It includes a Coordinator Agent that routes requests to specialized agents: a Search Agent for web information retrieval, a Data Analysis Agent for handling CSV/Excel data and generating visualizations and reports, and a Code Generator Agent that can create source code from natural language descriptions. Clients interact via HTTP endpoints such as /ask to route to the best-suited agent, /search for direct web searches, /analyze-data for data-focused analysis, /generate-code for code generation, and /chat/completions for conversational interactions. To use it, start the server and send structured JSON requests to these endpoints; for example, post a query to /ask to obtain an analysis, a search result, or code generation depending on the content of your request.

How to install

Prerequisites:

  • Python 3.9+
  • Git
  • Access to required API keys (OpenRouter and GROQ)

Install steps:

  1. Clone the repository: git clone https://github.com/your-org/AI_Agent_with_MCP.git cd AI_Agent_with_MCP

  2. Create and activate a virtual environment: python -m venv venv

    macOS/Linux

    source venv/bin/activate

    Windows

    venv\Scripts\activate

  3. Install dependencies: pip install -r requirements.txt

  4. Create a .env file (optional) and add API keys, or set environment variables directly: OPENROUTER_API_KEY=YOUR_KEY GROQ_API_KEY=YOUR_KEY

  5. Run the MCP server: python server.py

The server will start on http://0.0.0.0:8080 by default.

Additional notes

Notes and tips:

  • Ensure your OPENROUTER_API_KEY and GROQ_API_KEY are valid and accessible from the environment where you run the server.
  • The Coordinator Agent determines the best specialized agent for a given request; structure requests clearly to improve routing accuracy (e.g., include file_path for data analysis or language and target output for code generation).
  • Endpoints available: /ask (general routing), /search (web search), /analyze-data (data analysis), /generate-code (code generation), and /chat/completions (conversational).
  • Review requests_log.txt for debugging and auditing requests/responses.
  • If you add new agents or tools, update the coordinator routing logic so that the new capability can be invoked via /ask.
  • If running behind a firewall or proxy, ensure the application can reach external web services for searching or data retrieval.

Related MCP Servers

Sponsor this space

Reach thousands of developers