- Multi-MCP AI Agent
Multi-MCP AI Agent
An AI agent which utilizes multiple MCP servers, including internal tools like math tools, and external tools like Google services and web scraping.
Content
Multi-MCP AI Agent
An Agentic AI agent system that leverages multiple MCP (Model Control Protocol) servers to provide a wide range of capabilities, from basic mathematical operations to advanced external service integrations like Google Workspace and web scraping. The agent includes a Telegram bot interface and Server-Sent Events (SSE) for real-time communication.
🌟 Features
- Multi-MCP Architecture: Utilizes multiple MCP servers for distributed processing and diverse capabilities
- Cognitive Modules: Implements perception, decision-making, memory, and action modules
- External Service Integration:
- Google Workspace (Gmail, Google Drive, Google Sheets)
- Web scraping and content extraction
- DuckDuckGo search integration
- Real-time Communication:
- Telegram Bot interface
- Server-Sent Events (SSE) for live updates
- Core Components:
- Agent loop management
- Session handling
- Context management
- Strategic decision making
🏗️ Project Structure
├── agent.py # Main agent entry point
├── core/ # Core agent components
│ ├── context.py # Context management
│ ├── loop.py # Main agent loop
│ ├── session.py # Session handling
│ └── strategy.py # Strategic decision making
├── modules/ # Cognitive modules
│ ├── action.py # Action execution
│ ├── decision.py # Decision making
│ ├── memory.py # Memory management
│ ├── model_manager.py # Model management
│ ├── perception.py # Input processing
│ └── tools.py # Tool definitions
├── config/ # Configuration files
│ ├── models.json # Model configurations
│ └── profiles.yaml # MCP server profiles
└── mcp_server_*.py # MCP server implementations
🚀 Getting Started
Prerequisites
- Python 3.11+
- UV package manager
- Telegram Bot Token (for bot functionality)
- Google Cloud credentials (for Google Workspace integration)
Installation
- Clone the repository:
git clone <repository-url>
cd <repository-name>
- Create and activate a virtual environment:
uv venv
venv\Scripts\activate # On Mac: source venv/bin/activate
- Install dependencies using UV:
uv sync
- Set up environment variables:
- Create
.envwith Gemini API key and Telegram Bot token. - Generate
credentials.jsonusing Google OAuth client.
- Create
Configuration
- Configure MCP servers in
config/profiles.yaml - Set up model configurations in
config/models.json - Configure Google Cloud credentials:
- Place
credentials.jsonin the root directory - Run the application once to generate
token.json
- Place
🎮 Usage
Starting the Agent
uv run agent.py
Starting the Telegram Bot Server
uv run telegram_sse_server.py
🛠️ MCP Servers
MCP Server 1: Basic Operations
- Mathematical operations
- Image processing
- File operations
MCP Server 2: Document Processing
- Document indexing
- Semantic search
- Content extraction
- Image captioning
MCP Server 3: Web Integration
- DuckDuckGo search
- Web content fetching
- Rate-limited requests
MCP Server 4: Google Workspace
- Gmail integration
- Google Sheets operations
- Google Drive management
- F1 standings fetcher (URL scraper)
📡 Communication
Telegram Bot
- Command handling
- Message processing
- Real-time responses
SSE Server
- Real-time event streaming
- Client connection management
- Event broadcasting
🧠 Cognitive Architecture
The agent implements a cognitive architecture with the following modules:
- Perception: Processes input and extracts relevant information
- Memory: Manages state and historical data
- Decision: Makes strategic decisions based on input and context
- Action: Executes decided actions through appropriate tools
📝 License
MIT License
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Tavily Mcp
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
DeepChatYour AI Partner on Desktop
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
ChatWiseThe second fastest AI chatbot™
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Serper MCP ServerA Serper MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Amap Maps高德地图官方 MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server