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.
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
- π§ 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
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 | 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 |
- Python 3.11+ - Modern Python with async support
- uv - Fast Python package manager (auto-installed)
- Git - For cloning the repository
# Clone and setup everything
git clone https://github.com/vishalm/agentic-protocol-demos.git
cd agentic-protocol-demos
./run.shThis 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)
# 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- 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
- 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
- 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
- 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)
# Check server status
./run.sh status
# Run comprehensive tests
./run.sh test
# Check specific components
./run.sh setup # Full environment setupThe 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-inspectorConfiguration 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
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/inspectorTest 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| 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 |
| 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 |
| 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 |
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
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
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
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
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
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
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.
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.
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
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.
- 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
- 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
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
# 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# Run ACP function tests
python test-acp-functions.py
# Test client-server communication
python acp_client.py- 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
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())βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β MCP Client β β ACP Server β β ACP Agents β
β β β β β β
β β’ Email Tools βββββΊβ β’ Task Router βββββΊβ β’ Email Agent β
β β’ Contact Mgmt β β β’ Message Bus β β β’ Contact Agent β
β β’ Templates β β β’ State Mgmt β β β’ Template Agentβ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
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
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
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
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
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
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
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
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
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
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
MESH now supports three complementary protocols that work together to provide comprehensive AI agent capabilities:
- 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
- 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
- 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
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β 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 β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- π 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
- Python 3.11+ - Modern Python with async support
- uv - Fast Python package manager
- Git - For cloning the repository
- Web Browser - For accessing inspector tools
# 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# 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# Start everything with one command
./run.sh startThis will:
- β Check Python version and dependencies
- β Install required packages
- β Start both MCP and A2A servers
- β Display connection information
# 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 onlyCreate 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"
]
}
}
}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"
}
]
}# Check server status
./run.sh status
# Check specific components
./run.sh check-python
./run.sh check-deps
./run.sh check-structure# Start servers
./run.sh start
# Stop servers
./run.sh stop
# Restart servers
./run.sh restart
# View logs
./run.sh logsThe MCP Inspector helps debug MCP protocol communication and tool calls.
# Install globally
pip install mcp-inspector
# Or use with uv
uv run mcp-inspectorWhen 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
- List available tools
- Test individual tool calls
- Monitor tool execution
- Debug tool responses
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:
MCP Inspector Setup Configuring the MCP Inspector to connect to the MESH server via STDIO transport
MESH Resources Viewing available resources including email templates and contact directory
MESH Prompts Accessing the MESH assistant prompt template and global instructions
MESH Tools Exploring available tools: email draft creation, contact management, and template suggestions
MESH Server Logs Monitoring server activity and connection status in real-time
- 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
# Test the server functions first
python test-mcp-functions.py
# Start the MCP server
python mcp-server-test.py# Install and run MCP Inspector
pip install mcp-inspector
mcp-inspector
# Or use uv for faster installation
uv run mcp-inspectorWhen 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
Successful connection will show:
- β MCP Server Connected
- π Available Tools: List of MCP functions
- π Resources: Available data sources
- βοΈ Prompts: System configuration templates
- Browse available tools
- Execute tool calls
- View tool responses
- Monitor server logs
- Test resource access
- Close the MCP Inspector application
- Use
Ctrl+Cin the terminal running MESH server
# Run comprehensive ACP tests
python test-acp-functions.py
# Expected output: All 6 tests should pass# 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# 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# 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."
}
}'- β Agent registration and discovery
- β Capability and task type specification
- β Metadata and contact information
- β Email draft creation
- β Contact search and filtering
- β Template suggestions
- β Priority and timeout handling
- β Task message handling
- β Response message generation
- β Error message creation
- β Message history tracking
- β Task status tracking (pending β running β completed/failed)
- β Task cancellation support
- β Comprehensive error handling
The A2A Inspector is a web-based tool for testing and debugging A2A protocol communication.
- Navigate to:
http://127.0.0.1:5001(if running locally) - Or use the online version: A2A Inspector
- Enter your MESH server URL:
http://127.0.0.1:8080 - Click Connect
- Verify the agent card loads successfully
- Use the chat interface to send messages
- Monitor the debug console for raw JSON-RPC communication
- Check validation results for protocol compliance
- 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
The MCP Inspector helps debug MCP protocol communication and tool calls.
# Install globally
pip install mcp-inspector
# Or use with uv
uv run mcp-inspector# Create config file
mcp-inspector init
# Edit config to point to MESH
# Add your MESH server configuration- List available tools
- Test individual tool calls
- Monitor tool execution
- Debug tool responses
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:
Configuring the MCP Inspector to connect to the MESH server via STDIO transport
Viewing available resources including email templates and contact directory
Accessing the MESH assistant prompt template and global instructions
Exploring available tools: email draft creation, contact management, and template suggestions
Monitoring server activity and connection status in real-time
- 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
# Start the hybrid server (MCP + A2A)
./run.sh start
# Or start server only (no tests)
./run.sh start-only# 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# Install and run MCP Inspector
pip install mcp-inspector
mcp-inspector
# Or use uv for faster installation
uv run mcp-inspectorWhen 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
Successful connection will show:
- β MCP Server Connected
- π Available Tools: List of MCP functions
- π Resources: Available data sources
- βοΈ Prompts: System configuration templates
# In MCP Inspector, you can now:
# - Browse available tools
# - Execute tool calls
# - View tool responses
# - Monitor server logs
# - Test resource access- Close the MCP Inspector application
- Use
Ctrl+Cin the terminal running MESH server - Or run
./run.sh stopto stop all servers
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
# 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- 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
- Verify MCP configuration path
- Check Python environment activation
- Ensure all dependencies are installed:
uv sync - Test with MCP Inspector tool
# 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/healthAdd 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"
]
}
}
}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"
]
}
}
}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..."
}
}
)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
# 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# Check Python version
python3 --version
# Install Python 3.11+ if needed
# macOS: brew install python@3.11
# Ubuntu: sudo apt install python3.11# Clean install
rm -rf .venv
uv sync
# Or use pip fallback
pip install -r requirements.txt# 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# 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| 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 |
| 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 |
- 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
# 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 startThis project is licensed under the MIT License - see the LICENSE file for details.
- 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
- 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! π
