Get the FREE Ultimate OpenClaw Setup Guide →

agent

MCPAgent for Grupa.AI Multi-agent Collaboration Network (MACNET) with Model Context Protocol (MCP) capabilities baked in

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio grupa-ai-agent-mcp python -m agent_mcp \
  --env MCP_DEBUG="true or false" \
  --env MCP_NETWORK="MACNet network name or identifier"

How to use

AgentMCP is the universal system for AI agent collaboration. It provides a decorator-based approach that lets any existing AI agent register to the MACNet, enabling seamless cross-framework communication, discovery, and coordination with other agents. By using the @mcp_agent decorator, your agent becomes instantly available on the global network, handles context sharing, and can leverage specialized capabilities from agents across different frameworks and providers. This setup abstracts networking and translation work, letting you focus on your agent's core logic while still enabling robust, scalable collaboration across the ecosystem.

Using the server involves installing the AgentMCP package in your Python environment and launching the MCP server entrypoint, which exposes the networking and coordination services the agents connect to. Once connected, agents can be discovered, routed to for tasks, and paired with other agents for collaborative workflows. The examples demonstrate simple cross-framework chats, multi-provider cost-aware routing, and advanced features like Auto-Prompt Optimization and Reinforcement Learning, all under the same unified network. This means you can work with agents built on vastly different frameworks without rewriting integration code; AgentMCP handles the translation and orchestration for you.

How to install

Prerequisites:

  • Python 3.8+ (recommended 3.9+)
  • pip installed and available in PATH

Installation steps:

  1. Create and activate a virtual environment (optional but recommended): python -m venv venv source venv/bin/activate # Linux/macOS .\venv\Scripts\activate # Windows

  2. Install the AgentMCP package from PyPI: pip install agent-mcp

  3. Run the MCP server (example): python -m agent_mcp

  4. Verify connectivity from a client agent that uses the @mcp_agent decorator to register with MACNet. If you are coordinating multiple agents, ensure they share the same MCP_NETWORK configuration as described in the mcp_config.

Note: If you are deploying in a containerized environment, you can adapt the run command to your orchestration tooling, ensuring the same Python entrypoint and environment variables are provided.

Additional notes

Tips and common issues:

  • Ensure Python 3.8+ is used; older Python versions may lack required dependencies.
  • When running in containers or CI, set MCP_NETWORK to a stable identifier for your MACNet instance to avoid cross-network collisions.
  • If you encounter import errors, verify that the agent-mcp package is correctly installed in the active environment and that the entrypoint -m agent_mcp is discoverable.
  • The @mcp_agent decorator is framework-agnostic; it enables cross-framework interoperability, but your agent's methods should be compatible with the translation layer provided by AgentMCP.
  • Review environment variable options such as MCP_DEBUG to troubleshoot connectivity and task routing during development.
  • For production deployments, consider configuring authentication, secure transport, and scalable orchestration with your existing infrastructure.

Related MCP Servers

Sponsor this space

Reach thousands of developers