- Home
- MCP servers
- TradingViewMCPServer
TradingViewMCPServer
- typescript
4
GitHub Stars
typescript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"lev-corrupted-tradingviewmcpserver": {
"command": "/absolute/path/to/TradingViewMCPServer/.venv/bin/python",
"args": [
"/absolute/path/to/TradingViewMCPServer/tradingview_mcp/server.py",
"stdio"
],
"env": {
"ALPHA_VANTAGE_API_KEY": "YOUR_API_KEY"
}
}
}
}TradingViewMCPServer is a production-ready MCP server that powers multi-asset market analysis, backtests, and Pine Script development tools. It provides real-time quotes, historical data, a suite of technical indicators, and seamless Claude Desktop integration to let you analyze assets, generate signals, and develop Pine Script strategies within a single environment.
How to use
Start by configuring the MCP server in Claude Desktop so it can spawn the local MCP process. You will interact with the server through Claude Desktop prompts to get prices, run analyses, and develop Pine Script code.
How to install
Prerequisites include Python 3.10+ or Docker, Claude Desktop installed, and an Alpha Vantage API key.
Option 1: Docker (Recommended)
# 1. Clone repository
git clone https://github.com/lev-corrupted/TradingViewMCPServer.git
cd TradingViewMCPServer
# 2. Create .env file
echo "ALPHA_VANTAGE_API_KEY=your_key_here" > .env
# 3. Run with Docker Compose
docker-compose up -d
# 4. Check server health
docker-compose logs -f
Option 2: Standard Installation
# 1. Clone repository
git clone https://github.com/lev-corrupted/TradingViewMCPServer.git
cd TradingViewMCPServer
# 2. Create virtual environment
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# 3. Install dependencies
pip install -e .
# 4. Create .env file
echo "ALPHA_VANTAGE_API_KEY=your_key_here" > .env
Claude Desktop configuration
To enable MCP communication from Claude Desktop, configure the local Python runtime to start the MCP server as a stdio process.
{
"mcpServers": {
"tradingview": {
"type": "stdio",
"name": "tradingview",
"command": "/absolute/path/to/TradingViewMCPServer/.venv/bin/python",
"args": [
"/absolute/path/to/TradingViewMCPServer/tradingview_mcp/server.py",
"stdio"
],
"env": [
{"name": "ALPHA_VANTAGE_API_KEY", "value": "YOUR_API_KEY"}
]
}
}
}
Configure environment variables
Set your Alpha Vantage API key in a local environment file or directly in the MCP configuration as shown.
ALPHA_VANTAGE_API_KEY=your_key_here
Starting and health checks
Start the local MCP server via the configured stdio command and monitor health from Claude Desktop or logs.
Available tools
health_check
Server health and cache statistics tool to monitor API usage, health status, and performance.
get_price
Get current price for a specified asset across Forex, Stocks, and Crypto.
get_multiple_prices
Fetch batch quotes for multiple assets in a single call.
analyze_pair
Perform comprehensive technical analysis on a given asset pair.
get_rsi
Compute RSI values for momentum analysis (NEW).
get_cci
Compute Commodity Channel Index values (NEW).
get_williams_r
Compute Williams %R values (NEW).
get_bollinger_bands
Compute Bollinger Bands for volatility and trend context.
get_moving_averages
Calculate SMAs/EMAs across timeframes.
validate_pine_script
Real-time Pine Script syntax validation with detailed error reporting (v1-v6 support).
convert_pine_version
Automatic Pine Script version conversion (v3→v4→v5→v6).