mcp-ai-agents-template
A Model Context Protocol (MCP) TypeScript template with multi agents that can send Emails, schedule meetings and answer knowledge-base related questions.
claude mcp add --transport stdio radulepy-mcp-ai-agents-template npx -y mcp-ai-agents-template \ --env CLIENT_ID="your-client-id" \ --env CLIENT_SECRET="your-client-secret" \ --env OPENAI_API_KEY="your-openai-api-key"
How to use
This MCP server template demonstrates a multi-agent orchestration system built around the Model Context Protocol. It coordinates several AI agents (e.g., OpenAI, Gemini) and multiple tools (Gmail, Google Calendar, Knowledge Base, etc.) through a central Hub (WebSocket) and a Routing Agent that decides which agent or tool should handle a given user request. The client UI visualizes the network of agents/tools and lets users chat with the system. To get started, clone the repository, install dependencies, and run the hub first, followed by the routing agent and at least one AI agent. This setup lets you test end-to-end prompts that route to the appropriate tool or LLM, enabling complex automations across multiple services.
How to install
Prerequisites:
- Git
- Node.js and npm (or pnpm/yarn as you prefer)
- Basic terminal/command-line knowledge
Step-by-step:
-
Clone the repository: git clone https://github.com/your-username/multi-agent-ai-playground.git cd multi-agent-ai-playground
-
Install dependencies: npm install
-
Create environment variables file (optional for local testing):
- Create a .env file in the root and add keys such as: OPENAI_API_KEY=sk-... CLIENT_ID=your_client_id_here CLIENT_SECRET=your_client_secret_here
-
Start the system components in separate terminals (as suggested in the README): npm run start-hub # Start the central hub (must be first) npm run start-routing # Start the routing agent (must be second) npm run start-agent-openai # Start at least one agent (OpenAI recommended)
Optionally, start more agents/tools:
npm run start-agent-gemini npm run start-tool-gmail npm run start-tool-gcalendar npm run start-tool-knowledge-base
-
Start the client (UI): npm run client
or from the client folder:
cd client npm run dev
-
Open the UI at http://localhost:5173
Additional notes
Tips and notes:
- The hub runs at ws://localhost:8080 by default; ensure no port conflicts.
- Each agent/tool connects to the hub and appears as a node in the UI; start nodes in separate terminals or use a process manager.
- You can add more agents or tools by duplicating and adjusting existing agent/tool files in /src/agents or /src/tools.
- Environment variables such as OPENAI_API_KEY and Google OAuth secrets should be kept secure; do not commit secrets to source control.
- If you encounter authentication issues with Google tools, ensure /secrets/google-secret.json is properly generated after completing the Google OAuth flow.
Related MCP Servers
Agentfy
🤖 Agentfy is a modular microservices architecture designed to process user requests and execute workflows across multiple social media platforms. ASK ONCE, LET THE AGENT DO THE REST!
AgentCrew
Chat application with multi-agents system supports multi-models and MCP
thoughtbox
Thoughtbox is a Git-inspired workspace for Agent Teams.
mcp-agent
Lightweight, focused utilities to manage connections and execute MCP tools with minimal integration effort. Use it to directly call tools or build simple agents within your current architecture.
asap-protocol
Production-ready standard for agent-to-agent communication. Stateful orchestration, MCP-compatible, with a public marketplace to discover and register agents.
AGENT
Local-first multi-agent platform built on DeepAgents. Gateway, Agent Worker, and Web UI for orchestrating autonomous AI agents.