Multi-Server Agent2Agent LangGraph

v1.0.0Coding Agentsstable

This project demonstrates a decoupled real-time agent architecture that connects LangGraph agents to remote tools served by custom MCP (Modular Command Protocol) servers. The architecture enables a flexible and scalable multi-agent system where each

agentic-frameworkailangchainlanggraphmcp
Share:
26
Stars
0
Downloads
0
Weekly
0/5

What is Multi-Server Agent2Agent LangGraph?

Multi-Server Agent2Agent LangGraph is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to this project demonstrates a decoupled real-time agent architecture that connects langgraph agents to remote tools served by custom mcp (modular command protocol) servers. the architecture enables a fl...

This project demonstrates a decoupled real-time agent architecture that connects LangGraph agents to remote tools served by custom MCP (Modular Command Protocol) servers. The architecture enables a flexible and scalable multi-agent system where each

This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • This project demonstrates a decoupled real-time agent archit

Use Cases

Multi-agent coordination
Real-time agent architecture
LangGraph integration
junfanz1

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedApr 23, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-multiserver-interoperable-agent2agent-langgraph-ai-system

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Multi-Server Agent2Agent LangGraph

This project demonstrates a decoupled, real-time multi-agent architecture that wires LangGraph agents to remote tools served by custom MCP servers. It shows how to build a flexible, scalable agent system where each specialized agent connects to one or more MCP tool servers — such as a math server or weather server — via stdio or SSE transport, enabling concurrent tool invocation across multiple servers in a single agent turn. Developers building complex agentic pipelines with LangChain and LangGraph will find this a practical reference implementation for multi-server MCP integration.

Prerequisites

  • Python 3.10+ installed along with UV or pip for dependency management
  • An OpenAI API key (OPENAI_API_KEY) for the LLM backend
  • Familiarity with LangGraph and LangChain concepts
  • An MCP-compatible runtime environment (the project runs its own MCP servers)
  • Git to clone the repository
1

Clone the repository

Clone the project from GitHub and navigate into the project directory.

git clone https://github.com/junfanz1/MCP-MultiServer-Interoperable-Agent2Agent-LangGraph-AI-System.git
cd MCP-MultiServer-Interoperable-Agent2Agent-LangGraph-AI-System
2

Create a virtual environment and install dependencies

Create an isolated Python environment and install all required packages including langchain, langgraph, and the MCP SDK.

python -m venv .venv
source .venv/bin/activate
pip install langchain langchain-openai langgraph mcp python-dotenv
3

Configure environment variables

Create a .env file in the project root with your OpenAI API key.

echo 'OPENAI_API_KEY=your_openai_api_key_here' > .env
4

Start the MCP tool servers

Launch the individual MCP tool servers (math and weather) before starting the agent clients. Each server runs as a separate process.

python math_server.py &
python weather_server.py &
5

Run the multi-server agent client

Execute the multi-server client which connects to both tool servers and routes queries to the appropriate agent via LangGraph.

python multiserver_client.py
6

Explore the stdio client variant

Alternatively run the stdio-based client for environments that prefer stdin/stdout communication over network sockets.

python stdio_client.py

Multi-Server Agent2Agent LangGraph Examples

Client configuration

Example environment setup for the multi-agent system showing the required .env configuration.

{
  "note": "This project runs its own MCP servers directly rather than registering with a desktop client.",
  "setup": {
    "OPENAI_API_KEY": "your_openai_api_key_here"
  },
  "servers": {
    "math_server": "python math_server.py",
    "weather_server": "python weather_server.py"
  },
  "client": "python multiserver_client.py"
}

Prompts to try

Example queries that route through the LangGraph agent to the appropriate MCP tool server.

- "What is 1+1?"  (routes to math_server via MCP)
- "What is 15% of 340?"  (math tool invocation)
- "What's the weather in Chicago?"  (routes to weather_server via MCP)
- "Get the weather forecast for New York for the next 3 days"
- "Are there any weather alerts for California?"
- "Calculate the compound interest on $10,000 at 5% for 10 years"

Troubleshooting Multi-Server Agent2Agent LangGraph

Agent returns errors about missing OpenAI API key

Ensure OPENAI_API_KEY is set in your .env file and that python-dotenv is installed. Verify with `python -c "from dotenv import load_dotenv; load_dotenv(); import os; print(os.getenv('OPENAI_API_KEY')[:5])"`.

Client fails to connect to tool servers with connection refused errors

Start math_server.py and weather_server.py before running the client. Each server must be running in a separate terminal or as a background process. Check that the port numbers in the server and client configurations match.

ImportError for langgraph or langchain_openai

Install all dependencies explicitly: `pip install langchain langchain-openai langgraph mcp python-dotenv`. If using UV, run `uv pip install` within the activated virtual environment.

Frequently Asked Questions about Multi-Server Agent2Agent LangGraph

What is Multi-Server Agent2Agent LangGraph?

Multi-Server Agent2Agent LangGraph is a Model Context Protocol (MCP) server that this project demonstrates a decoupled real-time agent architecture that connects langgraph agents to remote tools served by custom mcp (modular command protocol) servers. the architecture enables a flexible and scalable multi-agent system where each It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Multi-Server Agent2Agent LangGraph?

Follow the installation instructions on the Multi-Server Agent2Agent LangGraph GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Multi-Server Agent2Agent LangGraph?

Multi-Server Agent2Agent LangGraph works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Multi-Server Agent2Agent LangGraph free to use?

Yes, Multi-Server Agent2Agent LangGraph is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-multiserver-interoperable-agent2agent-langgraph-ai-system": { "command": "npx", "args": ["-y", "mcp-multiserver-interoperable-agent2agent-langgraph-ai-system"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Multi-Server Agent2Agent LangGraph?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides