Advanced multi-agent AI trading framework and real-time market analysis MCP server
Project description
📈 AI Trading Intelligence Framework (MCP Server)
A powerful, multi-agent Model Context Protocol (MCP) server that transforms Claude (or any MCP client) into an autonomous financial analysis firm. By deploying specialized AI agents—Technical Analyst, Sentiment Analyst, and Risk Manager—the framework collaboratively evaluates real-time market conditions and delivers consensus-driven trading decisions.
🤖 The Multi-Agent Architecture
Unlike basic screeners, this framework decomposes complex trading tasks into specialized roles to ensure robust, scalable decision-making:
- 🛠️ Technical Analyst Agent: Evaluates intrinsic price action using Bollinger Bands (proprietary rating from -3 to +3), RSI, and MACD.
- 🌊 Sentiment & Momentum Analyst: Analyzes recent price momentum, MACD crossovers, and RSI trends to gauge short-term market mood.
- 🛡️ Risk Manager: Continuously evaluates portfolio risk by assessing market volatility (Bollinger Band Width) and mean reversion risk against major moving averages (SMA20, EMA200).
Agents debate their findings in real-time to output a single logical framework decision: STRONG BUY, BUY, HOLD, SELL, or STRONG SELL with calculated confidence levels.
🎥 Framework Demo
Quick 19-second demo showing the underlying data retrieval in action
✨ Why this Framework? (vs Traditional Setups)
| Feature | tradingview-mcp |
Traditional Trading Agents | Bloomberg Terminal |
|---|---|---|---|
| Setup Time | 5 minutes | Hours (Docker, Conda...) | Weeks (Contracts) |
| Cost | Free (Open Source) | Free | $30k+/year |
| Market Data | Live / Real-Time | Historical / Delayed | Live |
| API Keys Needed | None | Multiple (OpenAI, AlphaVantage) | N/A |
| Architecture | MCP integrated Agents | Complex Graph Networks | Proprietary UI |
🚀 Quick Start (5-Minute Setup)
Option 1: Docker (Fastest)
Run the framework immediately on port 8080:
docker run -p 8080:8000 atilaahmettaner/tradingview-mcp:latest
Claude Desktop Configuration:
{
"mcpServers": {
"tradingview-mcp": {
"command": "curl",
"args": ["-s", "http://localhost:8080/sse"]
}
}
}
(For Cursor/Windsurf, just use the SSE URL: http://localhost:8080/sse)
Option 2: Python / PyPI
Install the package directly:
uv tool install tradingview-mcp-server
# or standard pip:
pip install tradingview-mcp-server
Claude Desktop Configuration:
{
"mcpServers": {
"tradingview-mcp": {
"command": "tradingview-mcp",
"args": []
}
}
}
Option 3: Direct Git Execution (No Installation)
-
Install UV Package Manager:
brew install uv # macOS curl -LsSf https://astral.sh/uv/install.sh | sh # Linux
-
Claude Desktop Configuration:
{ "mcpServers": { "tradingview-mcp": { "command": "uv", "args": [ "tool", "run", "--from", "git+https://github.com/atilaahmettaner/tradingview-mcp.git", "tradingview-mcp" ] } } }
-
Restart Claude Desktop - The framework is now loaded and your AI Analyst firm is ready!
📋 For detailed Windows or Manual Local Installation instructions, see INSTALLATION.md
🛠️ Framework Capabilities
🧠 Multi-Agent Analysis
| Tool | Description | Example Usage |
|---|---|---|
multi_agent_analysis |
Runs the full 3-agent debate for a final trading decision | "Run a multi-agent analysis on BTC on Binance" |
coin_analysis |
Raw deep-dive for manual technical analysis | "Analyze IBM stock on NYSE with technical indicators" |
📈 Real-Time Market Screening
| Tool | Description | Example Usage |
|---|---|---|
top_gainers |
Find highest performing assets | "Top crypto gainers in 15m" |
top_losers |
Find biggest declining assets | "Worst performing stocks today" |
bollinger_scan |
Find assets with tight Bollinger Bands (breakout prep) | "Coins ready for breakout" |
rating_filter |
Filter by Bollinger Band rating (-3 to +3) | "Strong buy signals (rating +2)" |
🕯️ Pattern Recognition
| Tool | Description | Example Usage |
|---|---|---|
consecutive_candles_scan |
Find consecutive bullish/bearish patterns | "Scan for 3+ consecutive green candles" |
advanced_candle_pattern |
Multi-timeframe pattern analysis | "Complex pattern detection" |
📝 Talk to Your AI Like a Portfolio Manager
Run the Agent Debate:
"Run a multi-agent analysis on ETH with a 4h timeframe on KuCoin and tell me the final decision"
"Deploy the analyst team to check AAPL stock. I need the Technical, Sentiment, and Risk breakdown."
Advanced Market Queries:
"Show me the top 10 crypto gainers on Binance in the last 15 minutes that have a low risk profile"
"Which Turkish stocks (BIST) are down more than 5% today?"
"Find crypto coins with a Bollinger Band squeeze (BBW < 0.05) ready to break out"
🏢 Supported Markets & Exchanges
💰 Cryptocurrency
Supports global leaders: KuCoin (Primary), Binance, Bybit, Bitget, OKX, Coinbase, Gate.io, Huobi, Bitfinex.
📊 Traditional Markets
Supports standard equities: NASDAQ (Tech), NYSE (Traditional), BIST (Turkey).
Timeframes: 5m, 15m, 1h, 4h, 1D, 1W, 1M
🚨 Troubleshooting
1. "No data found" errors / Empty Arrays:
- Try different exchanges (KuCoin usually works best for Crypto).
- Standardise timeframes (15m, 1h, 1D).
- You may have hit TradingView's rate limits. Wait 5-10 minutes.
2. Claude Desktop not detecting the server:
- Restart Claude Desktop after adding configuration.
- Check that UV is installed:
uv --version. - Verify the configuration JSON syntax.
🤝 Contributing & Development
We welcome contributions from researchers, traders, and engineers to expand our analytical models!
git clone https://github.com/atilaahmettaner/tradingview-mcp.git
cd tradingview-mcp
uv sync
# Run with MCP Inspector for debugging
uv run mcp dev src/tradingview_mcp/server.py
- Ideas: Implementing more advanced Risk models, integrating alternative data (News APIs) for the Sentiment Analyst, backtesting capabilities.
📄 License & Support
This project is licensed under the MIT License.
- Report bugs: GitHub Issues
- Disclaimer: This framework is designed for research purposes. Trading performance varies based on LLMs, market conditions, and parameters. It is not intended as financial, investment, or trading advice.
🌟 Support the Framework
If this tool improves your trading workflow, please ⭐ star the repository to help others discover it!
Empowering intelligent trading decisions through multi-agent market analysis.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tradingview_mcp_server-0.3.0.tar.gz.
File metadata
- Download URL: tradingview_mcp_server-0.3.0.tar.gz
- Upload date:
- Size: 73.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e164b2c947ac37ef3eab92974038bae0e52bc6e2476f19a69213e6b8681a5459
|
|
| MD5 |
96438734859233c8bacc8fc7137eda87
|
|
| BLAKE2b-256 |
9f4e0c02e443b698595527f6c874f3f5056ccf408c7064a253bdb3a76d85b40a
|
File details
Details for the file tradingview_mcp_server-0.3.0-py3-none-any.whl.
File metadata
- Download URL: tradingview_mcp_server-0.3.0-py3-none-any.whl
- Upload date:
- Size: 70.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24021be0d7f7d301da7b77622adaead145cf68f5df73f119551643f6ffb2dece
|
|
| MD5 |
89299ef985d8429164c8f99706e5181c
|
|
| BLAKE2b-256 |
10498ab5e91f40018e34924592d413b4511d852e6c00a1cc7ee697ea6f44d22f
|