vishalm/agentic-protocol-demos
If you are the rightful owner of agentic-protocol-demos and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
MESH is a Model Context Protocol (MCP) server designed to enhance AI applications with professional email management, contact management, and networking capabilities.
MESH - Model Exchange Server Handler
A comprehensive multi-protocol AI agent server that transforms any AI application into a sophisticated virtual assistant with email management, contact management, and professional networking capabilities.
๐ฏ Overview
MESH (Model Exchange Server Handler) is a cutting-edge multi-protocol AI agent server that bridges the gap between AI applications and professional workflows. It provides seamless integration with three major AI agent protocols:
- MCP (Model Context Protocol) - Direct AI application integration via STDIO
- A2A (Agent-to-Agent) - Multi-agent collaboration via HTTP/WebSocket
- ACP (Agent Communication Protocol) - Standardized agent interoperability via REST API
๐ Key Features
- ๐ง Professional Email Management - Create, edit, and manage professional emails with AI-powered templates
- ๐ฅ Contact Database Operations - Search and retrieve contact information from comprehensive directories
- ๐ค Strategic Networking - Facilitate professional introductions and relationship building
- ๐ Multi-Agent Collaboration - Coordinate with other AI agents for enhanced capabilities
- โก Three-Protocol Support - MCP, A2A, and ACP protocols in a single server
- ๐ ๏ธ Production Ready - Comprehensive testing, configuration validation, and deployment scripts
๐๏ธ Architecture
MESH implements a sophisticated three-layer architecture that supports multiple AI agent protocols simultaneously:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MESH Server Ecosystem โ
โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ MCP Server โ โ A2A Server โ โ ACP Server โ โ
โ โ (STDIO) โ โ (HTTP/WS) โ โ (REST API) โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Shared Core Services โ โ
โ โ โข Email Management โข Contact Management โ โ
โ โ โข Template System โข Agent Management โ โ
โ โ โข Task Orchestration โข Message Routing โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Protocol Comparison
| Protocol | Transport | Use Case | Primary Clients |
|---|---|---|---|
| MCP | STDIO | AI assistants, coding tools | Claude Desktop, Cursor, MCP Inspector |
| A2A | HTTP/WebSocket | Multi-agent workflows | A2A Inspector, Web applications |
| ACP | REST API | Enterprise integration | Custom clients, third-party systems |
๐ Quick Start
Prerequisites
- Python 3.11+ - Modern Python with async support
- uv - Fast Python package manager (auto-installed)
- Git - For cloning the repository
One-Command Setup
# Clone and setup everything
git clone https://github.com/vishalm/agentic-protocol-demos.git
cd agentic-protocol-demos
./run.sh
This single command will:
- โ Check Python version and install uv if needed
- โ Create virtual environment and install dependencies
- โ Validate configuration and run tests
- โ Start the hybrid server (MCP + A2A)
Manual Setup
# Install uv package manager
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone repository
git clone https://github.com/vishalm/agentic-protocol-demos.git
cd agentic-protocol-demos
# Install dependencies
uv sync
# Run tests
uv run python test-mcp-functions.py
uv run python test-acp-functions.py
# Start servers
./run.sh start # Hybrid server (MCP + A2A)
./run.sh start-acp # ACP server only
./run.sh start-all # All servers
๐ง Server Options
1. Simple MCP Server (Recommended for Testing)
- File:
mcp-server-test.py - Use Case: Testing with MCP Inspector, basic MCP integration
- Features: Clean shutdown, no hanging issues, easy debugging
- Command:
python mcp-server-test.py
2. Enhanced MCP Server (Advanced Features)
- File:
mcp-server-enhanced.py - Use Case: Advanced MCP features with enhanced tools and capabilities
- Features: Enhanced email tools, authentication, logging, sampling, elicitation
- Command:
uv run mcp dev mcp-server-enhanced.py
3. Hybrid Server (Production Ready)
- File:
hybrid_server.py - Use Case: Production deployment with both MCP and A2A protocols
- Features: Multi-protocol support, subprocess management, graceful shutdown
- Command:
python hybrid_server.pyor./run.sh start
4. ACP Server (Enterprise Integration)
- File:
acp_server.py - Use Case: Multi-agent collaboration, standardized agent communication
- Features: RESTful API, agent discovery, task management, message routing
- Command:
python acp_server.pyor./run.sh start-acp - Port: 8081 (http://127.0.0.1:8081)
๐งช Testing & Debugging
Project Status Check
# Check server status
./run.sh status
# Run comprehensive tests
./run.sh test
# Check specific components
./run.sh setup # Full environment setup
MCP Inspector Testing
The MCP Inspector helps debug MCP protocol communication:
# Install MCP Inspector
pip install mcp-inspector
# Start MESH server
python mcp-server-test.py
# Launch MCP Inspector
mcp-inspector
Configuration for MCP Inspector:
- Transport: STDIO
- Command:
python mcp-server-test.py(for basic server) - Command:
uv run mcp dev mcp-server-enhanced.py(for enhanced server) - Working Directory: Your MESH project folder
A2A Inspector Testing
Test A2A protocol communication:
# Start A2A server
./run.sh start
# Access A2A Inspector
# Navigate to: http://127.0.0.1:8080
# Or use online: https://a2aprotocol.ai/inspector
ACP API Testing
Test ACP server functionality:
# Start ACP server
./run.sh start-acp
# Test with client
python acp_client.py
# Access API docs
# Navigate to: http://127.0.0.1:8081/docs
๐ Available Tools & Capabilities
MCP Tools
| Tool | Description | Parameters |
|---|---|---|
write_email_draft | Create professional email drafts | recipient_email, subject, body |
get_contact_info | Search contact database | name (optional) |
suggest_email_template | Get AI-powered email templates | context |
A2A Methods
| Method | Description | Use Case |
|---|---|---|
initialize | Initialize agent connection | Setup and handshake |
capabilities | Get agent capabilities | Discovery and planning |
write_email_draft | Create email drafts | Professional communication |
get_contact_info | Search contacts | Relationship management |
discover_agents | Find other agents | Multi-agent coordination |
delegate_task | Delegate to other agents | Workflow orchestration |
collaborate | Initiate collaboration | Team coordination |
ACP Endpoints
| Endpoint | Method | Description |
|---|---|---|
/agents/register | POST | Register new agents |
/agents | GET | List registered agents |
/messages | POST | Send messages to agents |
/tasks | GET | List and monitor tasks |
/health | GET | Server health check |
๐ Real-World Use Cases
1. Professional Email Management
Scenario: A business professional needs to send follow-up emails after networking events
MESH Solution:
- MCP client requests email composition
- MESH orchestrates with A2A email writing agent
- A2A tone analysis agent ensures appropriate messaging
- A2A grammar check agent validates content
Result: Professionally crafted, contextually appropriate emails
2. Strategic Networking Automation
Scenario: Building and maintaining professional relationships at scale
MESH Solution:
- MCP client requests networking strategy
- MESH coordinates with A2A network analysis agent
- A2A opportunity identification agent finds prospects
- A2A calendar agent schedules follow-ups
Result: Automated networking pipeline with strategic follow-ups
3. Multi-Agent Customer Support
Scenario: Complex customer inquiries requiring multiple specialized agents
MESH Solution:
- MCP client receives customer request
- MESH routes to appropriate A2A agents (technical, billing, product)
- Agents collaborate to provide comprehensive solution
- MESH aggregates responses into unified answer
Result: Seamless customer experience with expert-level support
4. Content Creation Workflow
Scenario: Creating professional content requiring research, writing, and review
MESH Solution:
- MCP client requests content creation
- MESH coordinates research agent for information gathering
- Writing agent creates initial draft
- Review agent provides feedback and improvements
Result: High-quality, well-researched content delivered efficiently
๐ค ACP (Agent Communication Protocol) Integration
What is ACP?
The Agent Communication Protocol (ACP) is an open protocol for agent interoperability that solves the growing challenge of connecting AI agents, applications, and humans. ACP enables agents to communicate through a standardized RESTful API that supports:
- All forms of modality - Text, images, audio, video, and custom formats
- Synchronous and asynchronous communication - Flexible interaction patterns
- Streaming interactions - Real-time communication capabilities
- Both stateful and stateless operation - Adaptable to different use cases
- Online and offline agent discovery - Robust agent management
- Long running tasks - Support for complex workflows
Why ACP with MESH?
ACP addresses key challenges in modern AI systems:
- Integration barriers - Connect different agents without custom solutions
- Duplicated effort - Avoid rebuilding similar functionality
- Scalability challenges - Point-to-point integrations don't scale
- Inconsistent developer experience - Standardized patterns across frameworks
ACP Use Cases Enabled by MESH
1. Flexible Agent Replacement
As AI technology rapidly evolves, the best-performing agent changes frequently. ACP compatibility lets you seamlessly swap agents in production systems, even when built with different frameworks.
Example: Upgrade your translation agent from a custom model to the latest LLM,
or replace your code generation tool with a specialized coding assistant -
all without modifying integration points.
2. Multi-Agent Collaboration
Build sophisticated systems where specialized agents work as coordinated teams.
Example: A content creation workflow might involve:
- Topic research agent gathering information
- Writing agent crafting the draft
- SEO optimization agent refining for search performance
Each agent excels in their domain while seamlessly coordinating through standardized handoffs.
3. Cross-Platform Integration
Connect agents across your technology stack - marketing automation, analytics platforms, development tools, and communication systems.
Example: When your monitoring agent detects a performance issue, it can automatically:
- Trigger your incident response agent to create tickets
- Notify teams through communication agents
- Coordinate with deployment systems to roll back changes
4. Inter-Company Partnerships
Enable secure agent collaboration between organizations.
Example: A logistics company's routing agent could work with a supplier's inventory
agent to optimize delivery schedules, or a marketing agency's campaign agent could
coordinate with a client's approval workflow agent for streamlined content reviews.
ACP Server Features
Core Capabilities
- Agent Registration & Discovery - Register and discover available agents
- Task Management - Send, monitor, and cancel tasks
- Message Routing - Route messages between agents
- State Management - Track task status and progress
- Error Handling - Comprehensive error reporting and recovery
Supported Task Types
- Email Draft Creation - Professional email composition
- Contact Search - Database querying and filtering
- Template Suggestions - AI-powered email templates
- Custom Tasks - Extensible for any agent capability
API Endpoints
GET /health- Server health checkPOST /agents/register- Register new agentsGET /agents- List all registered agentsPOST /messages- Send messages to agentsGET /tasks- List and monitor tasksDELETE /tasks/{id}- Cancel running tasks
Getting Started with ACP
1. Start the ACP Server
# Start the ACP server
python acp_server.py
# Server will be available at http://127.0.0.1:8081
# Interactive docs available at http://127.0.0.1:8081/docs
2. Test ACP Functionality
# Run ACP function tests
python test-acp-functions.py
# Test client-server communication
python acp_client.py
3. Explore the API
- Health Check:
curl http://127.0.0.1:8081/health - List Agents:
curl http://127.0.0.1:8081/agents - API Documentation: Visit http://127.0.0.1:8081/docs
4. Register Your First Agent
import asyncio
from acp_client import ACPClient, EXAMPLE_AGENT_MANIFEST
async def register_agent():
async with ACPClient() as client:
result = await client.register_agent(EXAMPLE_AGENT_MANIFEST)
print(f"Agent registered: {result}")
asyncio.run(register_agent())
ACP Architecture
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ MCP Client โ โ ACP Server โ โ ACP Agents โ
โ โ โ โ โ โ
โ โข Email Tools โโโโโบโ โข Task Router โโโโโบโ โข Email Agent โ
โ โข Contact Mgmt โ โ โข Message Bus โ โ โข Contact Agent โ
โ โข Templates โ โ โข State Mgmt โ โ โข Template Agentโ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
Integration with Existing MCP Tools
ACP seamlessly integrates with your existing MCP tools:
- MCP Tools โ ACP Tasks: Convert MCP tool calls to ACP task messages
- MCP Resources โ ACP Artifacts: Share data and templates between protocols
- MCP Prompts โ ACP Agent Instructions: Use MCP prompts to configure ACP agents
๐ Real-World Use Cases
1. Professional Email Management
Scenario: A business professional needs to send follow-up emails after networking events
MESH Solution:
- MCP client requests email composition
- MESH orchestrates with A2A email writing agent
- A2A tone analysis agent ensures appropriate messaging
- A2A grammar check agent validates content
Result: Professionally crafted, contextually appropriate emails
2. Strategic Networking Automation
Scenario: Building and maintaining professional relationships at scale
MESH Solution:
- MCP client requests networking strategy
- MESH coordinates with A2A network analysis agent
- A2A opportunity identification agent finds prospects
- A2A calendar agent schedules follow-ups
Result: Automated networking pipeline with strategic follow-ups
3. Multi-Agent Customer Support
Scenario: Complex customer inquiries requiring multiple specialized agents
MESH Solution:
- MCP client receives customer request
- MESH routes to appropriate A2A agents (technical, billing, product)
- Agents collaborate to provide comprehensive solution
- MESH aggregates responses into unified answer
Result: Seamless customer experience with expert-level support
4. Content Creation Workflow
Scenario: Creating professional content requiring research, writing, and review
MESH Solution:
- MCP client requests content creation
- MESH coordinates research agent for information gathering
- Writing agent creates initial draft
- Review agent provides feedback and improvements
Result: High-quality, well-researched content delivered efficiently
๐ Communication Flow Diagrams
MCP (Model Context Protocol) Communication Flow
sequenceDiagram
participant AI as AI Application
participant MESH as MESH MCP Server
participant Email as Email Manager
participant Contact as Contact Manager
participant Network as Network Manager
AI->>MESH: MCP Request (tools/list)
MESH->>AI: Available Tools Response
AI->>MESH: MCP Request (tools/call)
Note over MESH: Parse tool call
alt Email Management
MESH->>Email: Execute email operation
Email->>MESH: Email result
else Contact Management
MESH->>Contact: Execute contact operation
Contact->>MESH: Contact result
else Network Management
MESH->>Network: Execute network operation
Network->>MESH: Network result
end
MESH->>AI: MCP Response with result
Note over AI: Process and display result
ACP (Agent Communication Protocol) Communication Flow
sequenceDiagram
participant Client as ACP Client
participant ACPServer as MESH ACP Server
participant AgentManager as Agent Manager
participant TaskProcessor as Task Processor
participant ExternalAgents as External ACP Agents
Client->>ACPServer: POST /agents/register
ACPServer->>AgentManager: Register agent
AgentManager->>ACPServer: Agent registered
ACPServer->>Client: Registration success
Client->>ACPServer: POST /messages (task)
Note over ACPServer: Process task message
ACPServer->>TaskProcessor: Route task
TaskProcessor->>ExternalAgents: Execute task
ExternalAgents->>TaskProcessor: Task result
TaskProcessor->>ACPServer: Process result
ACPServer->>Client: Response message
Note over Client: Handle response
Client->>ACPServer: GET /tasks/{id}
ACPServer->>Client: Task status
A2A (Agent-to-Agent) Communication Flow
sequenceDiagram
participant User as User
participant A2AInspector as A2A Inspector
participant MESH as MESH A2A Server
participant AgentManager as Agent Manager
participant TaskOrchestrator as Task Orchestrator
participant ExternalAgents as External A2A Agents
User->>A2AInspector: Connect to MESH
A2AInspector->>MESH: GET /.well-known/agent-card
MESH->>A2AInspector: Agent Card Response
User->>A2AInspector: Send message
A2AInspector->>MESH: POST / (message/send)
Note over MESH: Process message with JSON-RPC 2.0
MESH->>AgentManager: Discover available agents
AgentManager->>MESH: Agent list
MESH->>TaskOrchestrator: Orchestrate workflow
TaskOrchestrator->>ExternalAgents: Coordinate tasks
ExternalAgents->>TaskOrchestrator: Task results
TaskOrchestrator->>MESH: Workflow completion
MESH->>A2AInspector: SendMessageResponse
Note over A2AInspector: Validate response schema
A2AInspector->>User: Display result
MESH Complete Architecture (MCP + A2A + ACP)
graph TB
subgraph "MESH Server Ecosystem"
subgraph "MCP Layer"
MCP[FastMCP Server]
MCPTools[MCP Tools Registry]
MCPHandler[MCP Handler]
end
subgraph "A2A Layer"
A2AServer[A2A Protocol Server]
A2AHandler[A2A Handler]
JSONRPC[JSON-RPC 2.0]
end
subgraph "ACP Layer"
ACPServer[ACP Server]
ACPHandler[ACP Handler]
RESTAPI[REST API]
end
subgraph "Core Services"
EmailService[Email Service]
ContactService[Contact Service]
NetworkService[Network Service]
TemplateService[Template Service]
end
subgraph "Agent Management"
AgentManager[Agent Manager]
TaskOrchestrator[Task Orchestrator]
MessageRouter[Message Router]
end
end
subgraph "External Systems"
AIApp[AI Application]
A2AInspector[A2A Inspector]
ACPClient[ACP Client]
ExternalAgents[External Agents]
end
%% MCP Connections
AIApp <--> MCP
MCP --> MCPTools
MCPTools --> CoreServices
%% A2A Connections
A2AInspector <--> A2AServer
A2AServer --> AgentManager
A2AServer --> TaskOrchestrator
%% ACP Connections
ACPClient <--> ACPServer
ACPServer --> AgentManager
ACPServer --> TaskOrchestrator
ACPServer --> MessageRouter
%% Cross-Protocol Integration
AgentManager --> ExternalAgents
TaskOrchestrator --> ExternalAgents
MessageRouter --> ExternalAgents
%% Service Integration
AgentManager --> CoreServices
TaskOrchestrator --> CoreServices
MessageRouter --> CoreServices
%% Protocol Handlers
MCPHandler --> MCP
A2AHandler --> A2AServer
ACPHandler --> ACPServer
RESTAPI --> ACPServer
JSONRPC --> A2AServer
Protocol Integration & Data Flow
flowchart LR
subgraph "Client Applications"
MCPClient[MCP Client<br/>AI Applications]
A2AClient[A2A Client<br/>Inspector Tools]
ACPClient[ACP Client<br/>Agent Systems]
end
subgraph "MESH Protocol Layer"
MCP[MCP Server<br/>STDIO Transport]
A2A[A2A Server<br/>HTTP/WebSocket]
ACP[ACP Server<br/>REST API]
end
subgraph "Shared Services"
Email[Email Service]
Contact[Contact Service]
Template[Template Service]
Agent[Agent Manager]
end
subgraph "Data Sources"
Directory[Contact Directory]
Templates[Email Templates]
Prompts[System Prompts]
end
%% Client to Protocol connections
MCPClient --> MCP
A2AClient --> A2A
ACPClient --> ACP
%% Protocol to Services connections
MCP --> Email
MCP --> Contact
MCP --> Template
MCP --> Agent
A2A --> Email
A2A --> Contact
A2A --> Template
A2A --> Agent
ACP --> Email
ACP --> Contact
ACP --> Template
ACP --> Agent
%% Services to Data connections
Email --> Templates
Contact --> Directory
Template --> Templates
Agent --> Prompts
%% Cross-protocol communication
MCP -.-> ACP
A2A -.-> ACP
ACP -.-> A2A
style MCP fill:#e1f5fe
style A2A fill:#f3e5f5
style ACP fill:#e8f5e8
style Email fill:#fff3e0
style Contact fill:#fff3e0
style Template fill:#fff3e0
style Agent fill:#fff3e0
๐๏ธ Architecture Overview
Three-Protocol Architecture
MESH now supports three complementary protocols that work together to provide comprehensive AI agent capabilities:
1. MCP (Model Context Protocol)
- Purpose: Direct AI application integration
- Transport: STDIO (standard input/output)
- Use Case: AI assistants, coding tools, desktop applications
- Features: Tool calling, resource access, prompt management
2. A2A (Agent-to-Agent)
- Purpose: Multi-agent collaboration and orchestration
- Transport: HTTP + WebSocket
- Use Case: Complex workflows, agent coordination, real-time communication
- Features: Agent discovery, message routing, workflow orchestration
3. ACP (Agent Communication Protocol)
- Purpose: Standardized agent interoperability
- Transport: RESTful HTTP API
- Use Case: Cross-platform integration, third-party agents, enterprise systems
- Features: Agent registration, task management, message history
How They Work Together
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ MCP Client โ โ A2A Client โ โ ACP Client โ
โ โ โ โ โ โ
โ โข Claude โ โ โข Inspector โ โ โข Agent System โ
โ โข Cursor โ โ โข Web Tools โ โ โข Enterprise โ
โ โข AI Apps โ โ โข Real-time โ โ โข Integration โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MESH Server Ecosystem โ
โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ MCP Server โ โ A2A Server โ โ ACP Server โ โ
โ โ (STDIO) โ โ (HTTP/WS) โ โ (REST API) โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Shared Core Services โ โ
โ โ โข Email Management โข Contact Management โ โ
โ โ โข Template System โข Agent Management โ โ
โ โ โข Task Orchestration โข Message Routing โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Protocol Benefits
- ๐ Interoperability: Agents built for any protocol can work together
- ๐ Scalability: Add new protocols without changing existing ones
- ๐ ๏ธ Flexibility: Choose the right protocol for your use case
- ๐ Integration: Seamless communication between different systems
- ๐ Monitoring: Unified view of all agent activities
๐ ๏ธ Prerequisites
- Python 3.11+ - Modern Python with async support
- uv - Fast Python package manager
- Git - For cloning the repository
- Web Browser - For accessing inspector tools
๐ฆ Installation & Setup
Step 1: Install uv Package Manager
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Verify installation
uv --version
Step 2: Clone and Setup Project
# Clone the repository
git clone https://github.com/vishalm/agentic-protocol-demos.git
cd agentic-protocol-demos
# Install dependencies
uv sync
# Activate virtual environment
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
๐ Quick Start Guide
Option 1: One-Command Setup (Recommended)
# Start everything with one command
./run.sh start
This will:
- โ Check Python version and dependencies
- โ Install required packages
- โ Start both MCP and A2A servers
- โ Display connection information
Option 2: Manual Setup
# Start hybrid server manually
python hybrid_server.py
# Or start individual servers
python a2a_server.py # A2A server only
python mcp_server.py # MCP server only
๐ง Configuration
MCP Configuration
Create mcp-config.json in your AI application:
{
"mcpServers": {
"MESH": {
"command": "/path/to/uv",
"args": [
"--directory",
"/path/to/agentic-protocol-demos",
"run",
"--with",
"mcp",
"--with",
"fastmcp",
"python",
"hybrid_server.py"
]
}
}
}
A2A Configuration
The A2A server automatically generates its agent card at /.well-known/agent-card:
{
"name": "mesh_agent",
"description": "Professional email management and networking assistant with multi-agent collaboration capabilities.",
"protocolVersion": "0.3.0",
"preferredTransport": "JSONRPC",
"capabilities": {
"streaming": false
},
"skills": [
{
"id": "email_management",
"name": "Email Composition & Management",
"description": "Create professional emails and manage email templates"
}
]
}
๐งช Testing & Debugging
Project Status Check
# Check server status
./run.sh status
# Check specific components
./run.sh check-python
./run.sh check-deps
./run.sh check-structure
Server Management
# Start servers
./run.sh start
# Stop servers
./run.sh stop
# Restart servers
./run.sh restart
# View logs
./run.sh logs
๐ MCP Inspector Testing
MCP Inspector Setup
The MCP Inspector helps debug MCP protocol communication and tool calls.
1. Install MCP Inspector
# Install globally
pip install mcp-inspector
# Or use with uv
uv run mcp-inspector
2. Configure MCP Inspector
When MCP Inspector launches:
- Select Transport: Choose "STDIO" transport
- Set Command: Enter
python mcp-server-test.py - Set Working Directory: Navigate to your MESH project folder
- Connect: Click "Connect" to establish connection
3. Test MCP Tools
- List available tools
- Test individual tool calls
- Monitor tool execution
- Debug tool responses
MCP Inspector in Action
The MCP Inspector provides a comprehensive interface for testing and debugging MCP protocol communication. Here are key screenshots showing the MCP Inspector working with MESH:
1. Initial Connection Setup
MCP Inspector Setup Configuring the MCP Inspector to connect to the MESH server via STDIO transport
2. Resources Management
MESH Resources Viewing available resources including email templates and contact directory
3. Prompts Configuration
MESH Prompts Accessing the MESH assistant prompt template and global instructions
4. Tools and Functions
MESH Tools Exploring available tools: email draft creation, contact management, and template suggestions
5. Server Status and Logs
MESH Server Logs Monitoring server activity and connection status in real-time
MCP Inspector Features
- Tool Discovery: Automatically lists all available MCP tools
- Resource Management: Browse and access MCP resources
- Prompt Configuration: Set up system prompts and instructions
- Real-time Logging: Monitor all MCP communication
- Error Debugging: Identify and fix protocol issues
- Tool Testing: Execute individual tool calls for validation
Running MCP Inspector with MESH
1. Start MESH Server First
# Test the server functions first
python test-mcp-functions.py
# Start the MCP server
python mcp-server-test.py
2. Launch MCP Inspector
# Install and run MCP Inspector
pip install mcp-inspector
mcp-inspector
# Or use uv for faster installation
uv run mcp-inspector
3. Configure MCP Inspector
When MCP Inspector launches:
- Select Transport: Choose "STDIO" transport
- Set Command: Enter
python mcp-server-test.py - Set Working Directory: Navigate to your MESH project folder
- Connect: Click "Connect" to establish connection
4. Verify Connection
Successful connection will show:
- โ MCP Server Connected
- ๐ Available Tools: List of MCP functions
- ๐ Resources: Available data sources
- โ๏ธ Prompts: System configuration templates
5. Test MCP Tools
In MCP Inspector, you can now:
- Browse available tools
- Execute tool calls
- View tool responses
- Monitor server logs
- Test resource access
6. Stop MCP Inspector
- Close the MCP Inspector application
- Use
Ctrl+Cin the terminal running MESH server
๐งช Testing ACP Server
Quick Start Testing
1. Test ACP Functions
# Run comprehensive ACP tests
python test-acp-functions.py
# Expected output: All 6 tests should pass
2. Start ACP Server
# Start the ACP server
python acp_server.py
# Server will be available at http://127.0.0.1:8081
# Interactive API docs at http://127.0.0.1:8081/docs
3. Test Client-Server Communication
# In a new terminal, run the ACP client demo
python acp_client.py
# This will demonstrate:
# - Agent registration
# - Task sending and processing
# - Message routing
# - Status monitoring
4. Manual API Testing
# Health check
curl http://127.0.0.1:8081/health
# List agents
curl http://127.0.0.1:8081/agents
# Send a test task
curl -X POST http://127.0.0.1:8081/messages \
-H "Content-Type: application/json" \
-d '{
"type": "task",
"sender": "test-client",
"task_type": "email_draft",
"parameters": {
"recipient_email": "test@example.com",
"subject": "Test Email",
"body": "This is a test email."
}
}'
ACP Server Features Demonstrated
Agent Management
- โ Agent registration and discovery
- โ Capability and task type specification
- โ Metadata and contact information
Task Processing
- โ Email draft creation
- โ Contact search and filtering
- โ Template suggestions
- โ Priority and timeout handling
Message Routing
- โ Task message handling
- โ Response message generation
- โ Error message creation
- โ Message history tracking
State Management
- โ Task status tracking (pending โ running โ completed/failed)
- โ Task cancellation support
- โ Comprehensive error handling
๐ Inspector Tools Setup
A2A Inspector Setup
The A2A Inspector is a web-based tool for testing and debugging A2A protocol communication.
1. Access A2A Inspector
- Navigate to:
http://127.0.0.1:5001(if running locally) - Or use the online version: A2A Inspector
2. Connect to MESH
- Enter your MESH server URL:
http://127.0.0.1:8080 - Click Connect
- Verify the agent card loads successfully
3. Test Communication
- Use the chat interface to send messages
- Monitor the debug console for raw JSON-RPC communication
- Check validation results for protocol compliance

4. Debug Console Features
- Raw JSON View: See exact protocol messages
- Validation Results: Check for protocol compliance
- Error Details: Identify and fix protocol issues
- Real-time Logging: Monitor all communication
MCP Inspector Setup
The MCP Inspector helps debug MCP protocol communication and tool calls.
1. Install MCP Inspector
# Install globally
pip install mcp-inspector
# Or use with uv
uv run mcp-inspector
2. Configure MCP Inspector
# Create config file
mcp-inspector init
# Edit config to point to MESH
# Add your MESH server configuration
3. Test MCP Tools
- List available tools
- Test individual tool calls
- Monitor tool execution
- Debug tool responses
MCP Inspector in Action
The MCP Inspector provides a comprehensive interface for testing and debugging MCP protocol communication. Here are key screenshots showing the MCP Inspector working with MESH:
1. Initial Connection Setup
Configuring the MCP Inspector to connect to the MESH server via STDIO transport
2. Resources Management
Viewing available resources including email templates and contact directory
3. Prompts Configuration
Accessing the MESH assistant prompt template and global instructions
4. Tools and Functions
Exploring available tools: email draft creation, contact management, and template suggestions
5. Server Status and Logs
Monitoring server activity and connection status in real-time
MCP Inspector Features
- Tool Discovery: Automatically lists all available MCP tools
- Resource Management: Browse and access MCP resources
- Prompt Configuration: Set up system prompts and instructions
- Real-time Logging: Monitor all MCP communication
- Error Debugging: Identify and fix protocol issues
- Tool Testing: Execute individual tool calls for validation
Running MCP Inspector with MESH
1. Start MESH Server First
# Start the hybrid server (MCP + A2A)
./run.sh start
# Or start server only (no tests)
./run.sh start-only
2. Verify MCP Server Status
# Check if servers are running
./run.sh status
# Expected output:
# โ
MESH Hybrid Server is running
# - MCP: STDIO transport (active)
# - A2A: http://127.0.0.1:8080
3. Launch MCP Inspector
# Install and run MCP Inspector
pip install mcp-inspector
mcp-inspector
# Or use uv for faster installation
uv run mcp-inspector
4. Configure MCP Inspector
When MCP Inspector launches:
- Select Transport: Choose "STDIO" transport
- Set Command: Enter
python hybrid_server.py - Set Working Directory: Navigate to your MESH project folder
- Connect: Click "Connect" to establish connection
5. Verify Connection
Successful connection will show:
- โ MCP Server Connected
- ๐ Available Tools: List of MCP functions
- ๐ Resources: Available data sources
- โ๏ธ Prompts: System configuration templates
6. Test MCP Tools
# In MCP Inspector, you can now:
# - Browse available tools
# - Execute tool calls
# - View tool responses
# - Monitor server logs
# - Test resource access
7. Stop MCP Inspector
- Close the MCP Inspector application
- Use
Ctrl+Cin the terminal running MESH server - Or run
./run.sh stopto stop all servers
๐ Project Structure
agentic-protocol-demos/
โโโ mcp-server-test.py # Main MESH MCP server
โโโ test-mcp-functions.py # MCP function testing script
โโโ validate-config.py # MCP configuration generator
โโโ acp_server.py # ACP (Agent Communication Protocol) server
โโโ acp_client.py # ACP client for testing and integration
โโโ test-acp-functions.py # ACP function testing script
โโโ hybrid_server.py # Hybrid server (MCP + A2A) - advanced usage
โโโ a2a_server.py # A2A protocol server
โโโ agent_manager.py # Agent discovery and management
โโโ task_orchestrator.py # Workflow orchestration
โโโ a2a_config.py # A2A configuration
โโโ agent_capabilities.py # Agent skill definitions
โโโ run.sh # One-command setup and management
โโโ mcp-config.json # MCP configuration example
โโโ pyproject.toml # Project dependencies
โโโ requirements.txt # Python requirements
โโโ prompts/ # MESH assistant prompt templates
โ โโโ mesh.md # Main prompt template
โโโ email-examples/ # Email template examples
โ โโโ 3-way-intro.md # 3-way introduction template
โ โโโ call-follow-up.md # Call follow-up template
โโโ directory.csv # Contact directory
โโโ resources/ # Documentation images
โโโ A2A-1.png # A2A Inspector screenshot
โโโ A2A-2.png # Chat interface screenshot
โโโ A2A-3.png # Debug console screenshot
๐จ Troubleshooting
Common Issues
Port Already in Use
# Check what's using the port
lsof -i :8080
# Kill conflicting processes
./run.sh stop
# Or use different port
export A2A_PORT=8081
./run.sh start
A2A Inspector Connection Issues
- Verify MESH server is running:
./run.sh status - Check firewall settings
- Ensure correct port (8080 or 8081)
- Verify agent card endpoint:
curl http://127.0.0.1:8080/.well-known/agent-card
MCP Integration Issues
- Verify MCP configuration path
- Check Python environment activation
- Ensure all dependencies are installed:
uv sync - Test with MCP Inspector tool
Debug Mode
# Enable verbose logging
export LOG_LEVEL=DEBUG
./run.sh start
# View real-time logs
./run.sh logs
# Check server health
curl http://127.0.0.1:8080/health
๐ Integration Examples
Claude Desktop Integration
Add to your Claude Desktop configuration:
Basic MCP Server:
{
"mcpServers": {
"MESH": {
"command": "/path/to/uv",
"args": [
"--directory",
"/path/to/agentic-protocol-demos",
"run",
"--with", "mcp",
"--with", "fastmcp",
"python",
"mcp-server-test.py"
]
}
}
}
Enhanced MCP Server:
{
"mcpServers": {
"MESH-Enhanced": {
"command": "/path/to/uv",
"args": [
"--directory",
"/path/to/agentic-protocol-demos",
"run",
"mcp",
"dev",
"mcp-server-enhanced.py"
]
}
}
}
Cursor Integration
Add to your Cursor MCP configuration:
Basic MCP Server:
{
"mcpServers": {
"MESH": {
"command": "/path/to/uv",
"args": [
"--directory",
"/path/to/agentic-protocol-demos",
"run",
"--with", "mcp",
"--with", "fastmcp",
"python",
"mcp-server-test.py"
]
}
}
}
Enhanced MCP Server:
{
"mcpServers": {
"MESH-Enhanced": {
"command": "/path/to/uv",
"args": [
"--directory",
"/path/to/agentic-protocol-demos",
"run",
"mcp",
"dev",
"mcp-server-enhanced.py"
]
}
}
}
Custom Client Integration
import httpx
# A2A Protocol
async with httpx.AsyncClient() as client:
response = await client.post(
"http://127.0.0.1:8080/",
json={
"jsonrpc": "2.0",
"id": "1",
"method": "write_email_draft",
"params": {
"recipient": "colleague@company.com",
"subject": "Project Update",
"body": "Hi there, here's the latest update..."
}
}
)
# ACP Protocol
async with httpx.AsyncClient() as client:
response = await client.post(
"http://127.0.0.1:8081/messages",
json={
"type": "task",
"sender": "my-client",
"task_type": "email_draft",
"parameters": {
"recipient_email": "colleague@company.com",
"subject": "Project Update",
"body": "Hi there, here's the latest update..."
}
}
)
๐ Project Structure
agentic-protocol-demos/
โโโ ๐ Core Servers
โ โโโ mcp-server-test.py # Simple MCP server (testing)
โ โโโ hybrid_server.py # Hybrid server (MCP + A2A)
โ โโโ a2a_server.py # A2A protocol server
โ โโโ acp_server.py # ACP protocol server
โ
โโโ ๐ง Agent Management
โ โโโ agent_manager.py # Agent discovery and management
โ โโโ task_orchestrator.py # Workflow orchestration
โ โโโ agent_capabilities.py # Agent skill definitions
โ โโโ a2a_config.py # A2A configuration
โ
โโโ ๐งช Testing & Validation
โ โโโ test-mcp-functions.py # MCP function testing
โ โโโ test-acp-functions.py # ACP function testing
โ โโโ acp_client.py # ACP client for testing
โ โโโ validate-config.py # Configuration generator
โ
โโโ ๐ Resources & Templates
โ โโโ prompts/
โ โ โโโ mesh.md # Main prompt template
โ โโโ email-examples/
โ โ โโโ 3-way-intro.md # Introduction template
โ โ โโโ call-follow-up.md # Follow-up template
โ โโโ directory.csv # Contact directory
โ
โโโ โ๏ธ Configuration & Setup
โ โโโ run.sh # One-command setup script
โ โโโ pyproject.toml # Project dependencies
โ โโโ requirements.txt # Python requirements
โ โโโ mcp-config.json # MCP configuration example
โ
โโโ ๐ Documentation
โโโ README.md # This file
โโโ LICENSE # MIT License
โโโ resources/ # Documentation images
๐จ Troubleshooting
Common Issues
Port Already in Use
# Check what's using the port
lsof -i :8080
lsof -i :8081
# Stop conflicting processes
./run.sh stop
# Or use different ports
export A2A_PORT=8082
export ACP_PORT=8083
./run.sh start
Python Version Issues
# Check Python version
python3 --version
# Install Python 3.11+ if needed
# macOS: brew install python@3.11
# Ubuntu: sudo apt install python3.11
Dependency Issues
# Clean install
rm -rf .venv
uv sync
# Or use pip fallback
pip install -r requirements.txt
MCP Integration Issues
# Test MCP functions first
python test-mcp-functions.py
# Generate correct configuration
python validate-config.py
# Test with MCP Inspector
pip install mcp-inspector
mcp-inspector
Debug Mode
# Enable verbose logging
export LOG_LEVEL=DEBUG
./run.sh start
# View real-time logs
./run.sh status
# Check server health
curl http://127.0.0.1:8080/health # A2A
curl http://127.0.0.1:8081/health # ACP
๐ API Reference
A2A Endpoints
| Endpoint | Method | Description |
|---|---|---|
/ | POST | Main A2A protocol endpoint |
/.well-known/agent-card | GET | Agent capabilities and skills |
/health | GET | Server health check |
/ws | WebSocket | Real-time communication |
MCP Tools
| Tool | Description | Parameters |
|---|---|---|
email_compose | Create professional emails | subject, recipient, template |
contact_search | Search contact database | query, filters |
network_analyze | Analyze networking opportunities | context, goals |
๐ค Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
Development Setup
# Clone your fork
git clone https://github.com/yourusername/agentic-protocol-demos.git
cd agentic-protocol-demos
# Setup development environment
./run.sh setup
# Run tests
./run.sh test
# Start development server
./run.sh start
๐ License
This project is licensed under the MIT License - see the file for details.
๐ Acknowledgments
- MCP Community - For the Model Context Protocol specification
- A2A Protocol - For the Agent-to-Agent communication standards
- ACP Protocol - For the Agent Communication Protocol specification
- FastAPI - For the robust web framework
- FastMCP - For the efficient MCP implementation
- uv - For the fast Python package manager
๐ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Project Wiki
Ready to transform your AI applications with MESH? Start with ./run.sh and explore the future of AI collaboration! ๐