Multi-agent MCP Network
MCP server exposing specialized AI agents (CEO, CTO, Designer, Sales, Marketing, QA) that collaborate through an intelligent orchestrator for business strategy, technology, design, sales, marketing, and quality tasks.
README
Multi-Agent MCP Network
A production-ready Model Context Protocol (MCP) server that exposes multiple specialized AI agents through a unified interface. Each agent is an expert in its domain and they collaborate through an intelligent orchestrator.
Architecture
┌─────────────────────┐
│ Client / MCP Host │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ REST API (Express) │
│ MCP Server (SDK) │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ Orchestrator │
│ ┌─────┴─────┐ │
│ │ Router │ │
│ │ Workflow │ │
│ └─────┬─────┘ │
└──────────┬──────────┘
│
┌────────────────────┼────────────────────┐
▼ ▼ ▼ ▼ ▼
┌────┐ ┌────┐ ┌────┐ ┌────┐ ┌────┐
│CEO │ │CTO │ ... │Mktg│ │ QA │ │ ...│
└────┘ └────┘ └────┘ └────┘ └────┘
│ │ │ │
└────────┴──────────┴──────────┘
│
┌──────────▼──────────┐
│ Memory Layer │
│ PostgreSQL + Qdrant│
└─────────────────────┘
Agents
| Agent | Role | Expertise |
|---|---|---|
| CEO | Business Strategy | Market analysis, product roadmap, pricing, investment, startup advice |
| CTO | Technology | Software architecture, backend, frontend, databases, AI/ML, DevOps, cloud |
| Designer | Design | UI/UX, brand identity, logos, color palettes, design systems |
| Sales | Revenue | Lead generation, cold emails, CRM, sales funnels, outreach |
| Marketing | Growth | SEO, content, ads, social media, email campaigns, competitor analysis |
| QA | Quality | Code review, bug finding, testing, security, performance |
Tech Stack
- Runtime: Node.js 20+, TypeScript
- Framework: Express, FastMCP SDK (
@modelcontextprotocol/sdk) - Databases: PostgreSQL (pgvector), Qdrant (vector), Redis (cache)
- AI: OpenAI, Anthropic Claude, Google Gemini
- Infrastructure: Docker, Docker Compose
Quick Start
Prerequisites
- Node.js 20+
- Docker & Docker Compose
- At least one AI provider API key (OpenAI, Anthropic, or Gemini)
1. Clone & Install
cd multi-agent-mcp
npm install
2. Configure Environment
cp .env.example .env
Edit .env and add your API keys:
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GEMINI_API_KEY=...
API_KEY=sk-mcp-your-secret-key
JWT_SECRET=your-random-secret
3. Start Infrastructure
docker compose up -d postgres qdrant redis
4. Run Database Migrations
npm run db:migrate
5. Start the Server
Development mode:
npm run dev
Production mode:
npm run build
npm start
6. Start MCP Server (for MCP clients)
npm run mcp
API Endpoints
All endpoints require x-api-key header matching your API_KEY env var.
| Method | Endpoint | Description |
|---|---|---|
| POST | /chat |
Send query to orchestrator (auto-routes to agents) |
| POST | /agent/ceo |
Ask CEO directly |
| POST | /agent/cto |
Ask CTO directly |
| POST | /agent/designer |
Ask Designer directly |
| POST | /agent/sales |
Ask Sales directly |
| POST | /agent/marketing |
Ask Marketing directly |
| POST | /agent/qa |
Ask QA directly |
| POST | /memory |
Save or search memory |
| GET | /projects |
List all projects |
| GET | /projects/:id |
Get project details |
| GET | /tasks |
List tasks |
| GET | /health |
Health check |
Chat Example
curl -X POST http://localhost:3001/chat \
-H "Content-Type: application/json" \
-H "x-api-key: sk-mcp-your-secret-key" \
-d '{"query": "I want to launch an AI SaaS for small businesses"}'
MCP Tools
When running as an MCP server (via npm run mcp), the following tools are exposed:
| Tool | Description |
|---|---|
ask_ceo |
Business strategy advice |
ask_cto |
Technical architecture guidance |
ask_designer |
UI/UX and brand design |
ask_sales |
Sales and lead generation |
ask_marketing |
Marketing and growth |
ask_qa |
Code review and quality |
ask_all_agents |
Multi-agent collaboration |
create_project |
Create a new project |
save_memory |
Store long-term memory |
load_memory |
Retrieve memories |
search_documents |
Semantic document search |
generate_strategy |
Business strategy generation |
generate_ui |
UI design generation |
generate_architecture |
System architecture design |
generate_marketing_plan |
Marketing plan generation |
generate_sales_plan |
Sales plan generation |
review_project |
Full project review |
Docker Deployment
Start everything with one command:
docker compose up --build
This starts:
app- The Multi-Agent MCP serverpostgres- PostgreSQL with pgvectorqdrant- Vector database for embeddingsredis- Cache layer
Environment Variables
| Variable | Required | Description |
|---|---|---|
API_KEY |
Yes | API authentication key |
JWT_SECRET |
Yes | JWT signing secret |
OPENAI_API_KEY |
No* | OpenAI API key |
ANTHROPIC_API_KEY |
No* | Anthropic API key |
GEMINI_API_KEY |
No* | Google Gemini API key |
DATABASE_URL |
No | PostgreSQL connection string |
QDRANT_URL |
No | Qdrant endpoint |
REDIS_URL |
No | Redis connection string |
*At least one AI provider API key is required.
Project Structure
src/
├── agents/ # Agent implementations
│ ├── BaseAgent.ts # Abstract base class
│ ├── CEOAgent.ts
│ ├── CTOAgent.ts
│ ├── DesignerAgent.ts
│ ├── SalesAgent.ts
│ ├── MarketingAgent.ts
│ └── QAAgent.ts
├── orchestrator/ # Routing & workflow
│ ├── Router.ts # Intent detection, agent selection
│ └── Workflow.ts # Multi-agent execution, response merging
├── memory/ # Persistence layer
│ ├── postgres.ts # PostgreSQL client
│ ├── qdrant.ts # Qdrant vector client
│ ├── logger.ts # Winston logger
│ └── migrate.ts # DB migration runner
├── tools/ # MCP server
│ └── server.ts # FastMCP SDK server with tool registration
├── config/ # Configuration
│ └── index.ts # Env var loading
├── types/ # TypeScript types
│ └── index.ts # All type definitions
└── index.ts # Express REST API entry point
Adding a New Agent
- Create
src/agents/YourAgent.tsextendingBaseAgent - Add your agent role to
AgentRoleenum insrc/types/index.ts - Add a system prompt in
SYSTEM_PROMPTSinsrc/types/index.ts - Register the agent in
Router.tsconstructor - Add MCP tool in
src/tools/server.ts - Add REST endpoint in
src/index.ts - Add SQL seed in
sql/schema.sql
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。