Content
# Tool List
## 🌟 Project Overview
**TradingAgents-MCPmode** is an innovative multi-agent trading analysis system that integrates the Model Context Protocol (MCP) tool, enabling intelligent stock analysis and trading decision-making processes. The system provides comprehensive market analysis, investment suggestions, and risk management through the collaboration of 15 specialized agents.
### 🎯 Core Features
- **🤖 Multi-Agent Collaboration**: 15 specialized agents work together
- **⚡ Parallel Processing**: Analyst team adopts parallel architecture, significantly improving analysis efficiency
- **🔧 MCP Tool Integration**: Supports external data sources and real-time information acquisition
- **📊 Comprehensive Analysis**: Company overview, market, sentiment, news, fundamentals, shareholder structure, and product business seven-dimensional analysis
- **💭 Intelligent Debate**: Bull/bear researcher debate mechanism, configurable debate rounds
- **⚠️ Risk Management**: Three-layer risk analysis and management decision-making, supporting dynamic risk debate
- **🎛️ Agent Control**: Frontend dynamically enables/disables specific agents, flexible workflow customization
- **🌀 Debate Rounds Configuration**: Frontend real-time setting investment and risk debate rounds, precise control of analysis depth
- **🔧 Flexible Configuration**: Control agent MCP permissions through environment variables
- **🌍 Multi-Market Support**: US stocks (US), A-shares (CN), Hong Kong stocks (HK)
- **🗣️ Natural Language**: Supports natural language queries, no need to specify market and date
- **📈 Real-time Decision**: Trading suggestions based on latest data
- **🌐 Web Frontend**: Complete Streamlit web interface, supporting real-time analysis and historical management
## 🏗️ System Architecture
### Agent Organization Structure
```
┌─────────────────────────────────────────────────────────────┐
│ TradingAgents-MCPmode │
├─────────────────────────────────────────────────────────────┤
│ 📊 Analysts Team (Analysts) - Parallel Execution │
│ ├── CompanyOverviewAnalyst (Company Overview Analyst) │
│ ├── MarketAnalyst (Market Analyst) ┐ │
│ ├── SentimentAnalyst (Sentiment Analyst) │ Parallel Processing │
│ ├── NewsAnalyst (News Analyst) │ 6 Analysts │
│ ├── FundamentalsAnalyst(Fundamentals Analyst) │ Simultaneous Execution │
│ ├── ShareholderAnalyst (Shareholder Analyst) │ │
│ └── ProductAnalyst (Product Analyst) ┘ │
├─────────────────────────────────────────────────────────────┤
│ 🔬 Researchers Team (Researchers) │
│ ├── BullResearcher (Bull Researcher) │
│ └── BearResearcher (Bear Researcher) │
├─────────────────────────────────────────────────────────────┤
│ 👔 Managers (Managers) │
│ ├── ResearchManager (Research Manager) │
│ └── Trader (Trader) │
├─────────────────────────────────────────────────────────────┤
│ ⚠️ Risk Management Team (Risk Management) │
│ ├── AggressiveRiskAnalyst (Aggressive Risk Analyst) │
│ ├── SafeRiskAnalyst (Conservative Risk Analyst) │
│ ├── NeutralRiskAnalyst (Neutral Risk Analyst) │
│ └── RiskManager (Risk Manager) │
└─────────────────────────────────────────────────────────────┘
```
### 🚀 Parallelized Workflow
```mermaid
graph TD
%% User Input
USER[👤 User Input<br/>user_query]
%% Stage 0: Company Overview Analyst
A0[🏢 Company Overview Analyst<br/>📥 Input: user_query<br/>📤 Output: company_details + company_overview_report]
%% Stage 1: Analysts Parallel Node
PARALLEL[⚡ Analysts Parallel Node<br/>📥 Input: user_query + company_details<br/>🔄 Concurrent Execution of 6 Analysts<br/>📤 Output: All 6 Analysis Reports]
%% 6 Analysts Executed in Parallel
A1[🔍 Market Analyst]
A2[😊 Sentiment Analyst]
A3[📰 News Analyst]
A4[📊 Fundamentals Analyst]
A5[👥 Shareholder Analyst]
A6[🏭 Product Analyst]
%% Stage 2: Researchers Debate
B1[📈 Bull Researcher<br/>📥 Input: user_query + All 7 Analyst Reports<br/>📤 Output: Bull Argument + Debate History]
B2[📉 Bear Researcher<br/>📥 Input: user_query + All 7 Analyst Reports + Debate History<br/>📤 Output: Bear Argument + Debate History]
%% Stage 3: Managers
C1[🎯 Research Manager<br/>📥 Input: user_query + All 7 Analyst Reports + Complete Debate History<br/>📤 Output: investment_plan]
C2[💰 Trader<br/>📥 Input: user_query + All 7 Analyst Reports + Debate History + investment_plan<br/>📤 Output: trader_investment_plan]
%% Stage 4: Risk Management Team
D1[🔥 Aggressive Risk Analyst<br/>📥 Input: All Information<br/>📤 Output: Aggressive Risk View + Risk Debate History]
D2[🛡️ Conservative Risk Analyst<br/>📥 Input: All Information + Risk Debate History<br/>📤 Output: Conservative Risk View + Risk Debate History]
D3[⚖️ Neutral Risk Analyst<br/>📥 Input: All Information + Risk Debate History<br/>📤 Output: Neutral Risk View + Risk Debate History]
D4[🎯 Risk Manager<br/>📥 Input: All Information + Complete Risk Debate History<br/>📤 Output: final_trade_decision]
%% Main Process Connections
USER --> A0
A0 --> PARALLEL
PARALLEL --> B1
B1 --> B2
B2 -.->|Debate Loop| B1
B1 --> C1
C1 --> C2
C2 --> D1
D1 -.->|Risk Debate Loop| D2
D2 -.->|Risk Debate Loop| D3
D3 -.->|Risk Debate Loop| D1
D1 --> D4
D2 --> D4
D3 --> D4
%% Internal Connections within Parallel Node (Dashed lines indicate concurrency)
PARALLEL -.-> A1
PARALLEL -.-> A2
PARALLEL -.-> A3
PARALLEL -.-> A4
PARALLEL -.-> A5
PARALLEL -.-> A6
%% Style Definitions
style USER fill:#f9f9f9,stroke:#333,stroke-width:2px
style A0 fill:#e1f5fe,stroke:#0277bd
style PARALLEL fill:#fff3e0,stroke:#ff8f00,stroke-width:3px
style A1 fill:#e8f5e8,stroke:#4caf50
style A2 fill:#e8f5e8,stroke:#4caf50
style A3 fill:#e8f5e8,stroke:#4caf50
style A4 fill:#e8f5e8,stroke:#4caf50
style A5 fill:#e8f5e8,stroke:#4caf50
style A6 fill:#e8f5e8,stroke:#4caf50
style B1 fill:#e3f2fd,stroke:#1976d2
style B2 fill:#e3f2fd,stroke:#1976d2
style C1 fill:#fff3e0,stroke:#ef6c00
style C2 fill:#fff3e0,stroke:#ef6c00
style D1 fill:#fce4ec,stroke:#c2185b
style D2 fill:#fce4ec,stroke:#c2185b
style D3 fill:#fce4ec,stroke:#c2185b
style D4 fill:#fce4ec,stroke:#c2185b
```
### ⚡ Parallelization Advantages
1. **Significant Efficiency Improvement**: 6 analysts execute concurrently, total time close to the slowest analyst's execution time
2. **Resource Optimization**: Fully utilize system resources, avoid serial waiting
3. **Data Consistency**: Each analyst uses deep copy state, avoid concurrent conflicts
4. **Result Merging**: Intelligent merge of each analyst's report and execution history
## 🚀 Quick Start
### Environment Requirements
- Python 3.8+
- Supported operating systems: Windows, macOS, Linux
### Installation Steps
1. **Clone Project**
```bash
git clone https://github.com/guangxiangdebizi/TradingAgents-MCPmode.git
cd TradingAgents-MCPmode
```
2. **Install Dependencies**
```bash
pip install -r requirements.txt
```
3. **Configure Environment Variables**
```bash
cp env.example .env
# Edit .env file, configure your API keys and workflow parameters
```
4. **Configure MCP Tool**
```bash
# Edit mcp_config.json file, configure MCP server
```
## 📊 Data Flow Mechanism
### 🎯 Key Design Features
1. **Company Details Placeholder System**
- 🏢 **Company Overview Analyst** first obtains company basic information
- 📥 **Only passed to Analyst Team**: 6 specialized analysts can obtain accurate company background
- 🚫 **Not passed to subsequent agents**: Researchers and subsequent agents focus on comprehensive evaluation of reports
2. **Information Accumulation Effect**
- **Stage 0**: Only user query
- **Stage 1**: User query + company details (parallel processing)
- **Stage 2**: User query + all 7 analyst reports
- **Stage 3**: User query + analyst reports + debate history + investment decision
- **Stage 4**: User query + all information + risk views
3. **Dual Debate Mechanism**
- **Investment Debate**: Bull ↔ bear researcher cycle debate
- **Risk Debate**: Aggressive ↔ conservative ↔ neutral risk analyst cycle debate
## 📈 Performance Optimization
### Parallel Processing Advantages
- **Original Serial Architecture**: 6 analysts execute sequentially, total time = Σ(each analyst's time)
- **New Parallel Architecture**: 6 analysts execute concurrently, total time ≈ max(each analyst's time)
- **Performance Improvement**: Theoretically 5-6 times efficiency improvement, actual improvement depends on each analyst's time distribution
### Resource Management
- Use deep copy to avoid state competition
- Intelligent merge of execution history and tool call records
- Optimize memory usage, avoid redundant state
## 🤝 Contribution Guidelines
Welcome to submit issues and pull requests to improve the project!
## 📄 License
This project is licensed under the MIT License. See [LICENSE](LICENSE) file.
---
**TradingAgents-MCPmode** - Let AI agent teams safeguard your investment decisions! 🚀📈
## 📬 Contact Information
- Email: `guangxiangdebizi@gmail.com`
- LinkedIn: [Xingyu Chen](https://www.linkedin.com/in/xingyu-chen-b5b3b0313/)
- Facebook: [Personal Homepage](https://www.facebook.com/profile.php?id=100072282093932)
- Bilibili: [Personal Space](https://space.bilibili.com/51239486?spm_id_from=333.1007.0.0)
Connection Info
You Might Also Like
valuecell
Valuecell is a Python project for efficient data management.
hexstrike-ai
HexStrike AI is an AI-powered MCP cybersecurity automation platform with 150+ tools.
Vibe-Trading
Vibe-Trading: Your Personal Trading Agent
tradingview-mcp
AI-assisted TradingView chart analysis — connect Claude Code to your...
AP2
AP2 provides code samples and demos for the Agent Payments Protocol.
tradingview-mcp
TradingView MCP Server offers real-time market analysis for crypto and stocks.