VM

vishalmysore/mcp-agentic-mesh

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 4 forks 质量 51 趋势 14

use agentic Mesh across 4 different servers for MCP and A2A protocols

概览

This project demonstrates how to use agentic Mesh across 4 different servers for MCP and A2A protocols. Each server is responsible for a specific domain and can be queried independently or in combination with others. It has a multi-server architecture using the Model Context Protocol (MCP) and Agent-to-Agent (A2A) communication protocols. It is designed to handle various domains such as dessert, gym, restaurant, and yoga services. Implements four separate servers: 1. Dessert Server (Port 7863) 2. Gym Server (Port 7864) 3. Restaurant Server (Port 7865) 4. Yoga Server (Port 7866) The Dessert server's application properties: The Dessert server will start on port 7863: http://localhost:7863 The Gym server's application properties: The Gym server will start on port 7864: http://localhost:7864 The Restaurant server's application properties: The Restaurant server will start on port 7865: http://localhost:7865

README

以下为原文 README 节选,完整内容请查看原文。

Multi-Server MCP and A2A Implementation

This project demonstrates how to use agentic Mesh across 4 different servers for MCP and A2A protocols. Each server is responsible for a specific domain and can be queried independently or in combination with others. It has a multi-server architecture using the Model Context Protocol (MCP) and Agent-to-Agent (A2A) communication protocols. It is designed to handle various domains such as dessert, gym, restaurant, and yoga services.

Implements four separate servers:

  1. Dessert Server (Port 7863)
  2. Gym Server (Port 7864)
  3. Restaurant Server (Port 7865)
  4. Yoga Server (Port 7866)

Starting the Servers

Dessert Server

To start the Dessert server, run:

mvn spring-boot:run -Pdessert 

The Dessert server’s application properties:

spring.application.name=dessert-server
server.port=7863
a2a.persistence=cache
tools4ai.properties.path=tools4ai_dessert.properties

The Dessert server will start on port 7863: http://localhost:7863

Gym Server

To start the Gym server, run:

mvn spring-boot:run -Pgym 

The Gym server’s application properties:

spring.application.name=gym-server
server.port=7864
a2a.persistence=cache
tools4ai.properties.path=tools4ai_gym.properties

The Gym server will start on port 7864: http://localhost:7864

Restaurant Server

To start the Restaurant server, run:

mvn spring-boot:run -Prestaurant

The Restaurant server’s application properties:

spring.application.name=restaurant-server
server.port=7865
a2a.persistence=cache
tools4ai.properties.path=tools4ai_restaurant.properties

The Restaurant server will start on port 7865: http://localhost:7865

Yoga Server

To start the Yoga server, run:

mvn spring-boot:run -Pyoga 

The Yoga server’s application properties:

spring.application.name=yoga-server
server.port=7866
a2a.persistence=cache
tools4ai.properties.path=tools4ai_yoga.properties

The Yoga server will start on port 7866: http://localhost:7866

Each server has its own tools4ai properties file with a separate action.packages.to.scan:

# Dessert Server
action.packages.to.scan=org.example.desert

# Gym Server
action.packages.to.scan=org.example.gym

# Restaurant Server
action.packages.to.scan=org.example.restaurant

# Yoga Server
action.packages.to.scan=org.example.yoga

MCP Server and Client Example

This server is designed to work as both an A2A (Agent-to-Agent) and MCP (Model Context Protocol) server:

  • A2A: Google’s Agent-to-Agent protocol for communication between AI agents
  • MCP: Model Context Protocol for interaction with AI models and tools

Testing with curl commands

You can use curl commands to test all servers. Each server has its own set of services and runs on different ports:

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "yogaserver": { "command": "java", "args": [ "-jar", "PATH_TO_YOUR_JAR/mcp-connector-full.jar", "http://localhost:7866" ], "timeout": 30000 } } }