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 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)

  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.3.0.tar.gz (73.4 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.3.0-py3-none-any.whl (70.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for tradingview_mcp_server-0.3.0.tar.gz
Algorithm Hash digest
SHA256 e164b2c947ac37ef3eab92974038bae0e52bc6e2476f19a69213e6b8681a5459
MD5 96438734859233c8bacc8fc7137eda87
BLAKE2b-256 9f4e0c02e443b698595527f6c874f3f5056ccf408c7064a253bdb3a76d85b40a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tradingview_mcp_server-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24021be0d7f7d301da7b77622adaead145cf68f5df73f119551643f6ffb2dece
MD5 89299ef985d8429164c8f99706e5181c
BLAKE2b-256 10498ab5e91f40018e34924592d413b4511d852e6c00a1cc7ee697ea6f44d22f

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