MCP server for TradingView indicators using tradingview_scraper
Project description
MCP TradingView Server
FastMCP v2 server that exposes TradingView technical indicators and OHLCV data through the tradingview_scraper library. The mcp-tradingview console entry powers Claude Desktop or any MCP-aware client.
Quick Start
Automated Setup (Recommended)
- Install uv and Python 3.11+
- Run the setup script:
./setup.sh- Installs dependencies and creates virtual environment
- Automatically configures Claude Desktop with the MCP server
- Restart Claude Desktop to load the new configuration
Manual Setup
- Install uv and Python 3.11+
uv venv --python 3.11 && source .venv/bin/activateuv pip install -e .- Configure Claude Desktop (see below)
Running
- Stdio (Claude default):
uv run mcp-tradingview - SSE service:
uv run mcp-tradingview --transport sse --host 0.0.0.0 --port 8000 - HTTP service:
uv run mcp-tradingview --transport http --host 0.0.0.0 --port 8000 --path /mcp
FASTMCP_HOST, FASTMCP_PORT, and FASTMCP_PATH environment variables override the bind settings when present.
Tools
get_indicators(symbol, exchange="BINANCE", timeframe="1h", all_indicators=True, export_result=False)– full TradingView indicator snapshot; returnssuccess,symbol,exchange,timeframe, and anindicatorsmapping.get_specific_indicators(symbol, indicators, exchange="BINANCE", timeframe="1h", export_result=False)– filters the full snapshot to requested keys (case-insensitive) and echoesrequested_indicators.get_historical_data(symbol, exchange="BINANCE", timeframe="1h", max_records=100, export_result=False)– streams OHLCV candles viaStreamer, returningrecords_collected,data, and optionalexport_file.
Resources & Exports
- Resource
indicators/{symbol}emits a formatted indicator report usingget_indicatorsdefaults. - When
export_result=True, JSON payloads are written toexport/; keep large archives out of version control.
Claude Desktop
Add the server to claude_desktop_config.json. Here are the recommended configurations:
Using Claude Code CLI (Easiest)
claude mcp add tradingview -- uvx --from /absolute/path/to/mcp-tradingview-server mcp-tradingview
Or with uv run:
claude mcp add tradingview -- uv run mcp-tradingview --cwd /absolute/path/to/mcp-tradingview-server
Manual Configuration
Stdio Transport (Recommended)
{
"mcpServers": {
"tradingview": {
"command": "uvx",
"args": ["--from", "/absolute/path/to/mcp-tradingview-server", "mcp-tradingview"]
}
}
}
Alternative with uv run:
{
"mcpServers": {
"tradingview": {
"command": "uv",
"args": ["run", "mcp-tradingview"],
"cwd": "/absolute/path/to/mcp-tradingview-server"
}
}
}
HTTP Transport
{
"mcpServers": {
"tradingview": {
"command": "uv",
"args": ["run", "mcp-tradingview", "--transport", "http", "--host", "0.0.0.0", "--port", "8001", "--path", "/mcp"],
"cwd": "/absolute/path/to/mcp-tradingview-server"
}
}
}
Restart Claude Desktop after updating the configuration. The bundled CLAUDE.md provides extra guidance the model can reference while chatting.
Development
uv run pytestexecutes the asynchronous test suite intest_server.py.- Use
logging.getLogger(__name__)for diagnostics; avoid printing secrets. - Refer to
export/for captured fixtures when updating tests or documentation.
License
This project is provided as-is for educational and research purposes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iflow_mcp_bidouilles_mcp_tradingview_server-0.1.0.tar.gz.
File metadata
- Download URL: iflow_mcp_bidouilles_mcp_tradingview_server-0.1.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12ab4a31deea9073f65ae1c7bcb659423ad1a1bbba4bb05795b9bdadc931ebd4
|
|
| MD5 |
a23357930bbcad5c60144ebdb2c0d5fd
|
|
| BLAKE2b-256 |
a6a24c95ad05388d0be5b08ef01a6912fe88ce9eacfeb91e1cccd0d289e30e97
|
File details
Details for the file iflow_mcp_bidouilles_mcp_tradingview_server-0.1.0-py3-none-any.whl.
File metadata
- Download URL: iflow_mcp_bidouilles_mcp_tradingview_server-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f6e477ac240d26fba43ec7de73cc6a76dc590c27d6fdb8f118a18e0e43adabe
|
|
| MD5 |
a1684937fd3228dea6ba88d078e0e226
|
|
| BLAKE2b-256 |
4963ae7cef58651954c566eb1948c1fe7c873b0b573090f6a02fdcc0990e71fd
|