TradingViewMCPServer
Professional multi-asset trading & Pine Script development MCP server for Claude. Features: 20+ indicators, Pine Script tools (validator, autocomplete, docs, testing), Forex/Stocks/Crypto support
claude mcp add --transport stdio lev-corrupted-tradingviewmcpserver python tradingview_mcp/server.py stdio \ --env ALPHA_VANTAGE_API_KEY="your_key_here"
How to use
TradingViewMCPServer acts as a Claude Desktop integration layer that provides a multi-asset trading assistant with Pine Script development tooling. It exposes a set of MCP endpoints for health monitoring, market data retrieval, technical analysis, and Pine Script development support. Users can query current prices, run technical indicators, fetch volume and market profile data, and validate or convert Pine Script code directly through Claude Desktop. The server is designed to work with Forex, US stocks, and cryptocurrencies, and includes features like automatic retry logic, an LRU cache, and health statistics to ensure reliability in production environments.
How to install
Prerequisites:
- Python 3.10+ (or Docker as an alternative).
- Claude Desktop installed.
- Alpha Vantage API key (free tier supported).
Option A: Standard installation (Python)
- Clone the repository: git clone https://github.com/lev-corrupted/TradingViewMCPServer.git cd TradingViewMCPServer
- Create and activate a virtual environment: python3 -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate
- Install dependencies in editable mode: pip install -e .
- Create a configuration file with your API key: echo "ALPHA_VANTAGE_API_KEY=your_key_here" > .env
- Run the server locally (example): python tradingview_mcp/server.py stdio
Option B: Docker (recommended for production)
- Clone the repo and navigate to it: git clone https://github.com/lev-corrupted/TradingViewMCPServer.git cd TradingViewMCPServer
- Create a .env file with your API key: echo "ALPHA_VANTAGE_API_KEY=your_key_here" > .env
- Build and run with Docker Compose: docker-compose up -d
- Check server logs: docker-compose logs -f
Note: The MCP config for Claude Desktop should point to the Python server script with the appropriate working path, e.g. tradingview_mcp/server.py with the stdio argument.
Additional notes
Tips & caveats:
- Ensure ALPHA_VANTAGE_API_KEY is set in the environment or in a .env file accessible to the process.
- For Docker deployments, use docker-compose to manage the container and restart policies.
- The integration exposes a broad set of tools; rely on health_check and cache statistics to monitor performance in production.
- When configuring Claude Desktop, provide the absolute path to the python executable and the absolute path to the server script to avoid path resolution issues.
- If you encounter API rate limit messages, leverage the built-in 70% cache reduction to minimize external calls.
Related MCP Servers
mcp -tree-sitter
MCP Server for Tree-sitter
tradememory-protocol
MCP server for AI trading memory — 3-layer memory system with LLM-powered reflection engine.
mcp-crypto-price
A Model Context Protocol (MCP) server that provides real-time cryptocurrency analysis via CoinCap's API. Enables Claude and other MCP clients to fetch crypto prices, analyze market trends, and track historical data.
evernote
Evernote MCP server - allows LLMs that support MCP (like Claude Desktop) to query your notes in Evernote
davinci -professional
An enterprise-grade MCP server that exposes the full functionality of DaVinci Resolve and DaVinci Resolve Studio (through version 20) to either Claude Desktop or Cursor MCP clients. Fully configured and tested as a Claude Desktop Extension making installation as easy as clicking a button. Supports both Windows and Macintosh.
mcp-spotify-player
MCP server to manage Spotify from MCP clients