Skip to main content

Agent-to-Agent Model Context Protocol Server with Redis Backend

Project description

A2AMCP - Agent-to-Agent Model Context Protocol

License: MIT Docker Redis Status

Enabling Seamless Multi-Agent Collaboration for AI-Powered Development

A2AMCP brings Google's Agent-to-Agent (A2A) communication concepts to the Model Context Protocol (MCP) ecosystem, enabling AI agents to communicate, coordinate, and collaborate in real-time while working on parallel development tasks.

Originally created for SplitMind, A2AMCP solves the critical problem of isolated AI agents working on the same codebase without awareness of each other's changes.

โœ… Server Status: WORKING! All 17 tools implemented and tested. Uses modern MCP SDK 1.9.3.

๐Ÿš€ Quick Start

Using Docker (Recommended)

# Clone the repository
git clone https://github.com/webdevtodayjason/A2AMCP
cd A2AMCP

# Start the server
docker-compose up -d

# Verify it's running
docker ps | grep splitmind

# Test the connection
python verify_mcp.py

Configure Your Agents

Claude Code (CLI)

# Add the MCP server using Claude Code CLI
claude mcp add splitmind-a2amcp \
  -e REDIS_URL=redis://localhost:6379 \
  -- docker exec -i splitmind-mcp-server python /app/mcp-server-redis.py

Claude Desktop

Add to your configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "splitmind-a2amcp": {
      "command": "docker",
      "args": ["exec", "-i", "splitmind-mcp-server", "python", "/app/mcp-server-redis.py"],
      "env": {
        "REDIS_URL": "redis://redis:6379"
      }
    }
  }
}

๐ŸŽฏ What Problem Does A2AMCP Solve?

When multiple AI agents work on the same codebase:

  • Without A2AMCP: Agents create conflicting code, duplicate efforts, and cause merge conflicts
  • With A2AMCP: Agents coordinate, share interfaces, prevent conflicts, and work as a team

Generic Use Cases Beyond SplitMind

A2AMCP can coordinate any multi-agent scenario:

  • Microservices: Different agents building separate services
  • Full-Stack Apps: Frontend and backend agents collaborating
  • Documentation: Multiple agents creating interconnected docs
  • Testing: Test writers coordinating with feature developers
  • Refactoring: Agents working on different modules simultaneously

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   A2AMCP Server โ”‚ โ† Persistent Redis-backed MCP server
โ”‚   (Port 5050)   โ”‚   handling all agent communication
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚ STDIO Protocol (MCP)
    โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ–ผ         โ–ผ         โ–ผ         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚Agent 1 โ”‚โ”‚Agent 2 โ”‚โ”‚Agent 3 โ”‚โ”‚Agent N โ”‚
โ”‚Auth    โ”‚โ”‚Profile โ”‚โ”‚API     โ”‚โ”‚Frontendโ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”ง Core Features

1. Real-time Agent Communication

  • Direct queries between agents
  • Broadcast messaging
  • Async message queues

2. File Conflict Prevention

  • Automatic file locking
  • Conflict detection
  • Negotiation strategies

3. Shared Context Management

  • Interface/type registry
  • API contract sharing
  • Dependency tracking

4. Task Transparency

  • Todo list management
  • Progress visibility
  • Completion tracking
  • Task completion signaling

5. Multi-Project Support

  • Isolated project namespaces
  • Redis-backed persistence
  • Automatic cleanup

6. Modern MCP Integration

  • Uses MCP SDK 1.9.3 with proper decorators
  • @server.list_tools() and @server.call_tool() patterns
  • STDIO-based communication protocol
  • Full A2AMCP API compliance with 17 tools implemented

๐Ÿ“ฆ Installation Options

Docker Compose (Production)

services:
  mcp-server:
    build: .
    container_name: splitmind-mcp-server
    ports:
      - "5050:5000"  # Changed from 5000 to avoid conflicts
    environment:
      - REDIS_URL=redis://redis:6379
      - LOG_LEVEL=INFO
    depends_on:
      redis:
        condition: service_healthy
    restart: unless-stopped
  
  redis:
    image: redis:7-alpine
    container_name: splitmind-redis
    ports:
      - "6379:6379"
    volumes:
      - redis-data:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  redis-data:
    driver: local

Python SDK

pip install a2amcp-sdk

JavaScript/TypeScript SDK (Coming Soon)

npm install @a2amcp/sdk

๐Ÿšฆ Usage Example

Python SDK

from a2amcp import A2AMCPClient, Project, Agent

async def run_agent():
    client = A2AMCPClient("localhost:5000")
    project = Project(client, "my-app")
    
    async with Agent(project, "001", "feature/auth", "Build authentication") as agent:
        # Agent automatically registers and maintains heartbeat
        
        # Coordinate file access
        async with agent.files.coordinate("src/models/user.ts") as file:
            # File is locked, safe to modify
            pass
        # File automatically released
        
        # Share interfaces
        await project.interfaces.register(
            agent.session_name,
            "User",
            "interface User { id: string; email: string; }"
        )

Direct MCP Tool Usage

# Register agent
register_agent("my-project", "task-001", "001", "feature/auth", "Building authentication")

# Query another agent
query_agent("my-project", "task-001", "task-002", "interface", "What's the User schema?")

# Share interface
register_interface("my-project", "task-001", "User", "interface User {...}")

๐Ÿ“š Documentation

๐Ÿ› ๏ธ SDKs and Tools

Available Now

  • Python SDK: Full-featured SDK with async support
  • Docker Deployment: Production-ready containers

In Development

  • JavaScript/TypeScript SDK: For Node.js and browser
  • CLI Tools: Command-line interface for monitoring
  • Go SDK: High-performance orchestration
  • Testing Framework: Mock servers and test utilities

See SDK Development Progress for details.

๐Ÿค Integration with AI Frameworks

A2AMCP is designed to work with:

  • SplitMind - Original use case
  • Claude Code (via MCP)
  • Any MCP-compatible AI agent
  • Future: LangChain, CrewAI, AutoGen

๐Ÿ” How It Differs from A2A

While inspired by Google's A2A protocol, A2AMCP makes specific design choices for AI code development:

Feature Google A2A A2AMCP
Protocol HTTP-based MCP tools
State Stateless Redis persistence
Focus Generic tasks Code development
Deployment Per-agent servers Single shared server

๐Ÿš€ Roadmap

  • Core MCP server with Redis
  • Modern MCP SDK 1.9.3 integration
  • Fixed decorator patterns (@server.list_tools(), @server.call_tool())
  • Python SDK
  • Docker deployment
  • All 17 A2AMCP API tools implemented and tested
  • Health check endpoint for monitoring
  • Verification script for testing connectivity
  • JavaScript/TypeScript SDK
  • CLI monitoring tools
  • SplitMind native integration
  • Framework adapters (LangChain, CrewAI)
  • Enterprise features

๐Ÿ› ๏ธ Troubleshooting

Agents can't see mcp__splitmind-a2amcp__ tools

  1. Restart Claude Desktop - MCP connections are established at startup
  2. Verify server is running: docker ps | grep splitmind
  3. Check health endpoint: curl http://localhost:5050/health
  4. Run verification script: python verify_mcp.py
  5. Check configuration: Ensure ~/Library/Application Support/Claude/claude_desktop_config.json contains the A2AMCP server configuration

Common Issues

  • "Tool 'X' not yet implemented" - Fixed in latest version, pull latest changes
  • Connection failed - Ensure Docker is running and ports 5050/6379 are free
  • Redis connection errors - Wait for Redis to be ready (takes ~5-10 seconds on startup)

๐Ÿค Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

Development Setup

# Clone repository
git clone https://github.com/webdevtodayjason/A2AMCP
cd A2AMCP

# Install dependencies
pip install -r requirements.txt

# Run tests
pytest

# Start development server
docker-compose -f docker-compose.dev.yml up

๐Ÿ“Š Performance

  • Handles 100+ concurrent agents
  • Sub-second message delivery
  • Automatic cleanup of dead agents
  • Horizontal scaling ready

๐Ÿ”’ Security

  • Project isolation
  • Optional authentication (coming soon)
  • Encrypted communication (roadmap)
  • Audit logging

๐Ÿ“„ License

MIT License - see LICENSE file.

๐Ÿ™ Acknowledgments

๐Ÿ“ž Support


A2AMCP - Turning isolated AI agents into coordinated development teams

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_webdevtodayjason_a2amcp-0.1.0.tar.gz (71.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_webdevtodayjason_a2amcp-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_webdevtodayjason_a2amcp-0.1.0.tar.gz
  • Upload date:
  • Size: 71.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_webdevtodayjason_a2amcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a8a7348f567a61132d4417149aefde5643f5f03d0006b3ccf641e483564af9c8
MD5 7d7430b48df9a2e11d21ee1bf942203a
BLAKE2b-256 6e34f49f99503dc3f1a6a63c12d865e3b0e43b97c028be4f20ee978cbf731f63

See more details on using hashes here.

File details

Details for the file iflow_mcp_webdevtodayjason_a2amcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_webdevtodayjason_a2amcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_webdevtodayjason_a2amcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce5b49d76a3bcc4d0be3d65a5517532e9d74cfb79c1f62b9060913c4e9a0ee52
MD5 6ea210aa70c355270c00f86f77bb761f
BLAKE2b-256 cbc6ed4664f9d5cb835cd412aa1dd68378e80f0af694c5b4894e13a0051426c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page