Skip to main content
Glama
niketbiyani

TradingView MCP Server

by niketbiyani

TradingView MCP Server

License: MIT Python 3.10+ MCP Standard

A standalone, lightweight Model Context Protocol (MCP) Server powered by TradingView Technical Analysis (tradingview_ta).

It provides AI agents (Claude Desktop, Cursor, Custom Agents) and trading microservices with real-time technical indicators, market regime classification (CHOP vs TRENDING), moving average summaries, and oscillator signatures for global stocks, indices, crypto, and forex.


🌟 Key Features

  • 📊 Real-Time Technical Indicators: Instant access to RSI, ADX, MACD, Bollinger Bands, EMAs, and Moving Average summaries.

  • 🎯 Market Regime Classification: Calculates market condition (CHOP vs TRENDING) using ADX trend strength, oscillator divergence, and Bollinger Band squeeze signatures.

  • 🌐 Multi-Asset & Multi-Exchange: Supports Indian stock market (NSE, BSE), US equities (NASDAQ, NYSE), Crypto (BINANCE), and Forex.

  • Dual Transport Support:

    • stdio mode: Standard input/output for LLM desktop integration (Claude Desktop, Cursor, etc.).

    • SSE HTTP mode (Port 5560): Background streaming event server for microservices.

    • REST API Bridge (Port 5559): Instant HTTP curl queries for trading bots.


Related MCP server: AI Quant Trading MCP Server

🚀 Quick Start

1. Installation

# Clone the repository
git clone https://github.com/niketbiyani/tradingview-mcp-server.git
cd tradingview-mcp-server

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

2. Run the MCP Server

# Interactive mode (stdio transport for MCP clients)
python tv_mcp_server.py

💻 Claude Desktop / MCP Client Integration

Add the server config to your Claude Desktop configuration file (claude_desktop_config.json):

{
  "mcpServers": {
    "tradingview": {
      "command": "/path/to/tradingview-mcp-server/venv/bin/python",
      "args": [
        "/path/to/tradingview-mcp-server/tv_mcp_server.py"
      ]
    }
  }
}

🛠 VPS Systemd Deployment

To run the server as a background service on your VPS (Ubuntu/Debian):

cd tradingview-mcp-server
sudo bash install_vps_service.sh

Service Control Commands:

  • Check Status: sudo systemctl status tradingview-mcp

  • Restart Service: sudo systemctl restart tradingview-mcp

  • View Live Logs: tail -f tv_mcp.log


🧰 Available Tools & REST Endpoints

MCP Tools

  1. get_technical_analysis(symbol, exchange, screener, interval)

    • Fetches TradingView recommendation summary, oscillators, moving averages, and detailed indicators.

    • Example: symbol="NIFTY", exchange="NSE", interval="1m"

  2. get_market_regime(symbol, exchange, screener, interval)

    • Calculates market condition (CHOP vs TRENDING) and returns ADX, BBW, RSI, and detailed reason strings.


REST API Endpoints (Port 5559)

  • Get Market Regime:

    curl "http://127.0.0.1:5559/get_market_regime?symbol=NIFTY&exchange=NSE&interval=1m"
  • Get Full TA Analysis:

    curl "http://127.0.0.1:5559/get_technical_analysis?symbol=NIFTY&exchange=NSE&interval=1m"

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Developed with ❤️ by Niket Biyani.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    D
    maintenance
    Provides technical analysis indicators like SMA, EMA, RSI, MACD, Bollinger Bands, and Stochastic through MCP, enabling AI assistants to perform financial market analysis and calculations on price data.
    18
    7
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Provides real-time and historical crypto market data via WebSocket and REST for MCP clients, supporting multiple exchanges, 73 technical indicators, and advanced chart analysis tools.
    19
    1
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Provides real-time market data, technical analysis, screeners, and backtesting for stocks, crypto, forex, and futures to AI assistants via MCP.
    37
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/niketbiyani/tradingview-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server