{"id":30867865,"url":"https://github.com/grupa-ai/agent-mcp","last_synced_at":"2025-12-14T13:04:43.725Z","repository":{"id":286355677,"uuid":"961164403","full_name":"grupa-ai/agent-mcp","owner":"grupa-ai","description":"MCPAgent for Grupa.AI Multi-agent Collaboration Network (MACNET) with Model Context Protocol (MCP) capabilities baked in","archived":false,"fork":false,"pushed_at":"2025-06-12T02:40:28.000Z","size":58057,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-01T21:41:35.264Z","etag":null,"topics":["agents","aiagent","aiagents","awesome-mcp-servers","mcp","mcp-agent-framework","mcp-client","mcp-server","mcp-server-store","mcp-servers"],"latest_commit_sha":null,"homepage":"https://www.grupa.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grupa-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-05T22:26:19.000Z","updated_at":"2025-08-21T01:04:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"de5777cf-a9d6-4744-96ae-acabaa56ad46","html_url":"https://github.com/grupa-ai/agent-mcp","commit_stats":null,"previous_names":["geniusgeek/agent-mcp","grupa-ai/agent-mcp"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/grupa-ai/agent-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grupa-ai%2Fagent-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grupa-ai%2Fagent-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grupa-ai%2Fagent-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grupa-ai%2Fagent-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grupa-ai","download_url":"https://codeload.github.com/grupa-ai/agent-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grupa-ai%2Fagent-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274102306,"owners_count":25222573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","aiagent","aiagents","awesome-mcp-servers","mcp","mcp-agent-framework","mcp-client","mcp-server","mcp-server-store","mcp-servers"],"created_at":"2025-09-07T22:03:38.619Z","updated_at":"2025-12-14T13:04:38.674Z","avatar_url":"https://github.com/grupa-ai.png","language":"Python","funding_links":[],"categories":["🤖 AI/ML","📚 Projects (2474 total)"],"sub_categories":["MCP Servers"],"readme":"# AgentMCP: The Universal System for AI Agent Collaboration\n\n\u003e Unleashing a new era of AI collaboration: AgentMCP is the system that makes any AI agent work with every other agent - handling all the networking, communication, and coordination between them. Together with MACNet (The Internet of AI Agents), we're creating a world where AI agents can seamlessly collaborate across any framework, protocol, or location.\n\n## ✨ The Magic: Transform Your Agent in 30 Seconds\n\nTurn *any* existing AI agent into a globally connected collaborator with just **one line of code**.\n\n```bash\npip install agent-mcp  # Step 1: Install\n```\n\n```python\nfrom agent_mcp import mcp_agent  # Step 2: Import\n\n@mcp_agent(mcp_id=\"MyAgent\")      # Step 3: Add this one decorator! 🎉\nclass MyExistingAgent:\n    # ... your agent's existing code ...\n    def analyze(self, data):\n        return \"Analysis complete!\"\n```\n\nThat's it! Your agent is now connected to the Multi-Agent Collaboration Network (MACNet), ready to work with any other agent, regardless of its framework.\n\n➡️ *Jump to [Quick Demos](#-quick-demos-see-agentmcp-in-action) to see it live!* ⬅️\n\n## What is AgentMCP?\n\nAgentMCP is the world's first universal system for AI agent collaboration. Just as operating systems and networking protocols enabled the Internet, AgentMCP handles all the complex work needed to make AI agents work together:\n- Converting agents to speak a common language\n- Managing network connections and discovery\n- Coordinating tasks and communication\n- Ensuring secure and reliable collaboration\n\nWith a single decorator, developers can connect their agents to MACNet (our Internet of AI Agents), and AgentMCP takes care of everything else - the networking, translation, coordination, and collaboration. No matter what framework or protocol your agent uses, AgentMCP makes it instantly compatible with our global network of AI agents.\n\n## 📚 Examples\n\n**🚀 Quick Demos: See AgentMCP in Action!**\n\nThese examples show the core power of AgentMCP. See how easy it is to connect agents and get them collaborating!\n\n### 1. Simple Multi-Agent Chat (Group Chat)\n\nWatch two agents built with *different frameworks* (Autogen and LangGraph) chat seamlessly.\n\n**The Magic:** The `@mcp_agent` decorator instantly connects them.\n\n*From `demos/basic/simple_chat.py`:*\n```python\n# --- Autogen Agent --- \n@mcp_agent(mcp_id=\"AutoGen_Alice\")\nclass AutogenAgent(autogen.ConversableAgent):\n    # ... agent code ...\n\n# --- LangGraph Agent --- \n@mcp_agent(mcp_id=\"LangGraph_Bob\")\nclass LangGraphAgent:\n    # ... agent code ...\n```\n**What it shows:**\n- Basic agent-to-agent communication across frameworks.\n- How `@mcp_agent` instantly connects agents to the network.\n- The foundation of collaborative work.\n\n**Run it:**\n```bash\npython demos/basic/simple_chat.py\n```\n\n### 2. Email Agent Task (Networked Task Execution)\n\nSee an `EmailAgent` get tasked by another agent over the network to send an email.\n\n**The Magic:**\n1.  The `@mcp_agent` decorator makes `EmailAgent` available on the network.\n2.  The coordinating agent targets `EmailAgent` by its `mcp_id` within the task definition.\n\n*From `demos/network/email_agent.py`:*\n```python\n@mcp_agent(mcp_id=\"EmailAgent\")\nclass EmailAgent(LangGraphMCPAdapter):\n    # ... email sending logic ... \n```\n\n*From `demos/network/test_deployed_network.py` (within task definition):*\n```python\n    # ... other steps ...\n    {\n        \"task_id\": \"send_report\",\n        \"agent\": \"EmailAgent\", # \u003c-- Target agent by name!\n        \"description\": \"Send the research findings via email\",\n        \"content\": { ... email details ... },\n        \"depends_on\": [\"market_analysis\"]\n    }\n    # ...\n```\n**What it shows:**\n- An agent becoming an MCP participant.\n- Joining the MACNet global network.\n- Receiving and executing a task (sending an email) via the network.\n- How AgentMCP orchestrates real-world collaboration.\n\n**Files Involved:**\n- `demos/network/email_agent.py`: The agent performing the work.\n- `demos/network/test_deployed_network.py`: The script initiating the task.\n- `agent_mcp/heterogeneous_group_chat.py`: The underlying mechanism managing the interaction.\n\n**Run it:**\n*Ensure you have set your SMTP environment variables first (see `email_agent.py`).*\n```bash\npython demos/network/test_deployed_network.py\n```\n\n### Why AgentMCP Matters\n\nIn today's fragmented AI landscape, agents are isolated by their frameworks and platforms. AgentMCP changes this by providing:\n- **A Universal System**: The operating system for AI agent collaboration.\n- **The Global Network (MACNet)**: Connect to the Internet of AI Agents.\n- **Simplicity**: Achieve powerful collaboration with minimal effort.\n- **Framework Independence**: Build agents your way; we handle the integration.\n- **Scalability**: Enterprise-ready features for secure, large-scale deployment.\n\n---\n\n## 🔑 Core Concepts \u0026 Benefits\n\nAgentMCP is built on a few powerful ideas:\n\n### 🎯 One Decorator = Infinite Possibilities\n\n\u003e The `@mcp_agent` decorator is the heart of AgentMCP's simplicity and power. Adding it instantly transforms your agent:\n\n-   🌐 **Connects** it to the Multi-Agent Collaboration Network (MACNet).\n-   🤝 Makes it **discoverable** and ready to collaborate with any other agent on MACNet.\n-   🔌 Ensures **compatibility** regardless of its underlying framework (Langchain, CrewAI, Autogen, Custom, etc.).\n-   🧠 Empowers it to **share context** and leverage specialized capabilities from agents worldwide.\n\n*Result: No complex setup, no infrastructure headaches – just seamless integration into the global AI agent ecosystem.* \n\n### 💡 Analogy: Like Uber for AI Agents\n\nThink of AgentMCP as the platform connecting specialized agents, much like Uber connects drivers and riders:\n\n-   **Your Agent**: Offers its unique skills (like a driver with a car).\n-   **Need Help?**: Easily tap into a global network of specialized agents (like hailing a ride).\n-   **No Lock-in**: Works with any agent framework or custom implementation.\n-   **Effortless Connection**: One decorator is all it takes to join or utilize the network.\n\n### 🛠 Features That Just Work\n\nAgentMCP handles the complexities behind the scenes:\n\n**For Your Agent:**\n\n-   **Auto-Registration \u0026 Authentication**: Instant, secure network access.\n-   **Tool Discovery \u0026 Smart Routing**: Automatically find and communicate with the right agents for the task.\n-   **Built-in Basic Memory**: Facilitates context sharing between collaborating agents.\n-   **Availability Management**: Handles agent online/offline status and ensures tasks are routed to active agents.\n\n**For Developers:**\n\n-   **Framework Freedom**: Use the AI frameworks you know and love.\n-   **Zero Config Networking**: Focus on agent logic, not infrastructure.\n-   **Simple API**: Primarily interacts through the `@mcp_agent` decorator and task definitions.\n-   **Adapters for Popular Frameworks**: Built-in support for Langchain, CrewAI, Autogen, LangGraph simplifies integration.\n-   **Asynchronous \u0026 Scalable Architecture**: Built on FastAPI for high performance.\n\n---\n\n## Supported Frameworks\n\nAgentMCP is designed for broad compatibility:\n\n**Currently Supported:**\n\n-   Autogen\n-   LangChain\n-   LangGraph\n-   CrewAI\n-   Custom Agent Implementations\n\n**Coming Soon:**\n\n-   🔜 LlamaIndex\n-   🔜 A2A Protocol Integration\n\n*AgentMCP acts as a universal connector, enabling agents from different ecosystems to work together seamlessly.*\n\n## 🚀 Quick Start (Reference)\n\nFor quick reference, here's the basic setup again:\n\n### 1️⃣ Install\n```bash\npip install agent-mcp\n```\n\n### 2️⃣ Decorate\n```python\nfrom agent_mcp import mcp_agent\n\n# Your existing agent - no changes needed!\nclass MyMLAgent:\n    def predict(self, data):\n        return self.model.predict(data)\n\n# Add one line to join the MAC network\n@mcp_agent(name=\"MLPredictor\")\nclass NetworkEnabledMLAgent(MyMLAgent):\n    pass  # That's it! All methods become available to other agents\n```\n\n### 🤝 Instant Collaboration\n\n```python\n# Your agent can now work with others!\nresults = await my_agent.collaborate({\n    \"task\": \"Analyze this dataset\",\n    \"steps\": [\n        {\"agent\": \"DataCleaner\", \"action\": \"clean\"},\n        {\"agent\": \"MLPredictor\", \"action\": \"predict\"},\n        {\"agent\": \"Analyst\", \"action\": \"interpret\"}\n    ]\n})\n```\n\n## Network API\n\n### 🌐 Global Agent Network (Multi-Agent Collaboration Network aka MAC Network or MacNet)\n\nYour agent automatically joins our hosted network at `https://mcp-server-ixlfhxquwq-ew.a.run.app`\n\n### 🔑 Authentication\n\nAll handled for you! The `@mcp_agent` decorator:\n1. Registers your agent\n2. Gets an access token\n3. Maintains the connection\n\n### 📂 API Methods\n\n```python\n# All of these happen automatically!\n\n# 1. Register your agent\nresponse = await network.register(agent)\n\n# 2. Discover other agents\nagents = await network.list_agents()\n\n# 3. Send messages\nawait network.send_message(target_agent, message)\n\n# 4. Receive messages\nmessages = await network.receive_messages()\n```\n\n### 🚀 Advanced Features\n\n```python\n# Find agents by capability\nanalysts = await network.find_agents(capability=\"analyze\")\n\n# Get agent status\nstatus = await network.get_agent_status(agent_id)\n\n# Update agent info\nawait network.update_agent(agent_id, new_info)\n```\n\nAll of this happens automatically when you use the `@mcp_agent` decorator!\n\n## 🏛 Architecture\n\n### 🌐 The MAC Network\n\n```mermaid\ngraph TD\n    A[Your Agent] --\u003e|@mcp_agent| B[MCP Network]\n    B --\u003e|Discover| C[AI Agents]\n    B --\u003e|Collaborate| D[Tools]\n    B --\u003e|Share| E[Knowledge]\n```\n\n### 3️⃣ Run Your App\nYour agent automatically connects when your application starts.\n\n## Community\nJoin our Discord community for discussions, support, and collaboration: [https://discord.gg/dDTem2P](https://discord.gg/dDTem2P)\n\n## Contributing\nContributions are welcome! Please refer to the CONTRIBUTING.md file for guidelines.\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrupa-ai%2Fagent-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrupa-ai%2Fagent-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrupa-ai%2Fagent-mcp/lists"}