Skip to main content

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.

License: MIT Python 3.10+ MCP Ready Version


🤖 The Multi-Agent Architecture

Unlike basic screeners, this framework decomposes complex trading tasks into specialized roles to ensure robust, scalable decision-making:

  1. 🛠️ Technical Analyst Agent: Evaluates intrinsic price action using Bollinger Bands (proprietary rating from -3 to +3), RSI, and MACD.
  2. 🌊 Sentiment & Momentum Analyst: Analyzes recent price momentum, MACD crossovers, and RSI trends to gauge short-term market mood.
  3. 🛡️ 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

https://github-production-user-asset-6210df.s3.amazonaws.com/67838093/478689497-4a605d98-43e8-49a6-8d3a-559315f6c01d.mp4

✨ 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 atilaahmet/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)

  1. Install UV Package Manager:

    brew install uv  # macOS
    curl -LsSf https://astral.sh/uv/install.sh | sh  # Linux
    
  2. Claude Desktop Configuration:

    {
      "mcpServers": {
        "tradingview-mcp": {
          "command": "uv",
          "args": [
            "tool", "run", "--from",
            "git+https://github.com/atilaahmettaner/tradingview-mcp.git",
            "tradingview-mcp"
          ]
        }
      }
    }
    
  3. 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

tradingview_mcp_server-0.4.0.tar.gz (106.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tradingview_mcp_server-0.4.0-py3-none-any.whl (106.0 kB view details)

Uploaded Python 3

File details

Details for the file tradingview_mcp_server-0.4.0.tar.gz.

File metadata

File hashes

Hashes for tradingview_mcp_server-0.4.0.tar.gz
Algorithm Hash digest
SHA256 450cd3edcc057efe1d2b6ad6beb88240ffcb4bc230b01dc24332d687f6a1b947
MD5 7456cc6b13cda22cbe3471650d4e464b
BLAKE2b-256 19d7915eef0e02afa648219b5bedab54af3f85ef3ffd77e113439d39941aa980

See more details on using hashes here.

File details

Details for the file tradingview_mcp_server-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tradingview_mcp_server-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e573327b7eb90640e0ec03878bc1463486b5a94bd6c9acc6613dec15030cb0a
MD5 9c614830592c3b7f532c0d4d6aeb89f0
BLAKE2b-256 4aa98d4008834bb1d092c7dda4de60b140a87c413a4cbfbc53f0c290fe15f9e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page