About Tradingview MCP
Tradingview MCP is an MCP server published by tradesdontlie in the Finance category: aI-assisted TradingView chart analysis — connect Claude Code to your TradingView Desktop for personal workflow automation. Conduid read 84 tools from its source: alert_create, alert_delete, alert_list, batch_run, capture_screenshot, chart_get_state and 78 more. No package is published for it, so it installs from a source checkout.
The repository has 7.4K stars and 2.9K forks, and its last commit was on 21 Oct 2026. Conduid has no tagged release on record for it. It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. Its topics include finance.
Install
git clone https://github.com/tradesdontlie/tradingview-mcpTools (84)
alert_createManage price alerts| Parameter | Type | Description |
|---|---|---|
| condition * | string | Alert condition: "crossing", "greater_than", or "less_than" |
| message | string | Alert message |
| price * | number | Price level for the alert |
alert_deleteManage price alerts| Parameter | Type | Description |
|---|---|---|
| alert_id | number | Alert id to delete (from alert_list) |
| delete_all | boolean | Delete all active alerts |
alert_listManage price alertsbatch_runRun action across multiple symbols/timeframes| Parameter | Type | Description |
|---|---|---|
| action * | string | Action to run: screenshot, get_ohlcv, get_strategy_results |
| delay_ms | number | Delay between iterations in ms (default 2000) |
| ohlcv_count | number | Bar count for get_ohlcv action (default 100) |
| symbols * | array | Array of symbols to iterate (e.g., ["BTCUSD", "ETHUSD", "AAPL"]) |
| timeframes | array | Array of timeframes (e.g., ["D", "60", "15"]) |
capture_screenshotScreenshot (regions: full, chart, strategy_tester)| Parameter | Type | Description |
|---|---|---|
| filename | string | Custom filename (without extension) |
| method | string | Capture method: cdp (Page.captureScreenshot) or api (chartWidgetCollection.takeScreenshot) (default cdp) |
| region | string | Region to capture: full, chart, strategy_tester (default full) |
| wait_for_render | boolean | Wait for the chart canvas to stabilize before capturing. Use after chart_set_symbol or chart_set_timeframe to avoid stale frames. |
chart_get_stateFirst call — get symbol, timeframe, all indicator names + IDschart_get_visible_rangeGet the visible date range (unix timestamps) and bars range on the chartchart_manage_indicatorAdd/remove indicators. Use full names: "Relative Strength Index" not "RSI"| Parameter | Type | Description |
|---|---|---|
| action * | string | Action: add or remove |
| entity_id | string | Entity ID (from chart_get_state). Required for remove. |
| indicator | string | Full indicator name (required for add): "Relative Strength Index", "MACD", "Volume", "Moving Average", "Bollinger Bands", "Moving Average Exponential". Short names like RSI/EMA do NOT work. Not needed for remove. |
| inputs | string | JSON string of input overrides for the indicator (e.g., '{"length": 20}') |
chart_scroll_to_dateJump to a date (ISO: "2025-01-15")| Parameter | Type | Description |
|---|---|---|
| date * | string | ISO date string (e.g., "2024-01-15") or unix timestamp as a string |
chart_set_symbolChange ticker (BTCUSD, AAPL, ES1!, NYMEX:CL1!)| Parameter | Type | Description |
|---|---|---|
| symbol * | string | Symbol to set (e.g., BTCUSD, AAPL, ES1!, NYMEX:CL1!) |
chart_set_timeframeChange resolution (1, 5, 15, 60, D, W, M)| Parameter | Type | Description |
|---|---|---|
| timeframe * | string | Timeframe (e.g., 1, 5, 15, 60, D, W, M) |
chart_set_typeChange style (Candles, HeikinAshi, Line, Area, Renko)| Parameter | Type | Description |
|---|---|---|
| chart_type * | string | Chart type: Bars(0), Candles(1), Line(2), Area(3), Renko(4), Kagi(5), PointAndFigure(6), LineBreak(7), HeikinAshi(8), HollowCandles(9) — pass name or number |
chart_set_visible_rangeZoom to exact range (unix timestamps)| Parameter | Type | Description |
|---|---|---|
| from * | number | Start of range (unix timestamp in seconds) |
| to * | number | End of range (unix timestamp in seconds) |
data_get_equityGet equity curve data from Strategy Testerdata_get_indicatorGet indicator/study info and input values| Parameter | Type | Description |
|---|---|---|
| entity_id * | string | Study entity ID (from chart_get_state) |
data_get_ohlcvGet price bars. Use `summary: true` for compact stats| Parameter | Type | Description |
|---|---|---|
| count | number | Number of bars to retrieve (max 500, default 100) |
| summary | boolean | Return summary stats (high, low, open, close, avg volume, range) instead of all bars — much smaller output |
data_get_pine_boxesRead box/zone boundaries drawn by Pine Script indicators (box.new). Returns deduplicated {high, low} price zones. Use study_filter to target a specific indicator.| Parameter | Type | Description |
|---|---|---|
| study_filter | string | Substring to match study name. Omit for all. |
| verbose | boolean | Return all boxes with IDs and coordinates (default false — returns unique price zones) |
data_get_pine_labelsRead text labels drawn by Pine Script indicators (label.new). Returns text and price pairs. Use study_filter to target a specific indicator.| Parameter | Type | Description |
|---|---|---|
| max_labels | number | Max labels per study (default 50). Set higher if you need all. |
| study_filter | string | Substring to match study name. Omit for all. |
| verbose | boolean | Return raw label data with IDs, colors, positions (default false — returns only text + price) |
data_get_pine_linesRead horizontal price levels drawn by Pine Script indicators (line.new). Returns deduplicated price levels per study. Use study_filter to target a specific indicator.| Parameter | Type | Description |
|---|---|---|
| study_filter | string | Substring to match study name (e.g., "Profiler", "NY Levels"). Omit for all. |
| verbose | boolean | Return raw line data with IDs, coordinates, colors (default false — returns only unique price levels) |
data_get_pine_tablesRead table data drawn by Pine Script indicators (table.new). Returns formatted text rows per table. Use study_filter to target a specific indicator.| Parameter | Type | Description |
|---|---|---|
| study_filter | string | Substring to match study name. Omit for all. |
data_get_strategy_resultsGet strategy performance metrics from Strategy Tester. Auto-opens the panel and auto-unhides a hidden strategy (TradingView never computes reports for hidden strategies); result includes unhidden_strategies when that happened.data_get_study_valuesRead current RSI, MACD, BB, EMA values from all indicatorsdata_get_tradesGet trade list from Strategy Tester. Auto-opens the panel and auto-unhides a hidden strategy.| Parameter | Type | Description |
|---|---|---|
| max_trades | number | Maximum trades to return |
depth_getGet order book / DOM (Depth of Market) data from the chartdraw_clearManage drawingsdraw_get_propertiesGet properties and points of a specific drawing| Parameter | Type | Description |
|---|---|---|
| entity_id * | string | Entity ID of the drawing (from draw_list) |
draw_listManage drawingsdraw_remove_oneManage drawings| Parameter | Type | Description |
|---|---|---|
| entity_id * | string | Entity ID of the drawing to remove (from draw_list) |
draw_shapeDraw horizontal_line, trend_line, rectangle, text| Parameter | Type | Description |
|---|---|---|
| overrides | string | JSON string of style overrides (e.g., '{"linecolor": "#ff0000", "linewidth": 2}') |
| point * | object | { time: unix_timestamp, price: number } |
| point2 | object | Second point for two-point shapes (trend_line, rectangle) |
| shape * | string | Shape type: horizontal_line, vertical_line, trend_line, rectangle, text |
| text | string | Text content for text shapes |
indicator_addSearch the Indicators dialog and add a result to the chart by name. Works for strategies and community scripts, not just built-ins. Returns the new study entity_id.| Parameter | Type | Description |
|---|---|---|
| match | string | Exact title to add (default: the query). Case-insensitive; falls back to first title containing it. |
| query * | string | Search keyword to find the indicator/strategy |
| section | string | Restrict to a section: "Technicals", "Community", "My scripts", etc. |
indicator_searchSearch TradingView's Indicators dialog for indicators, strategies, and community/public scripts by keyword. Returns matching titles grouped by section (Technicals, Community, My scripts, etc.).| Parameter | Type | Description |
|---|---|---|
| limit | number | Max results to return (default 25) |
| query * | string | Search keyword, e.g. "RSI", "supertrend", "order block" |
indicator_set_inputsChange indicator settings, show/hide| Parameter | Type | Description |
|---|---|---|
| entity_id * | string | Entity ID of the study (from chart_get_state) |
| inputs * | string | JSON string of input overrides, e.g. '{"length": 50, "source": "close"}'. Keys are input IDs, values are the new values. |
indicator_toggle_visibilityChange indicator settings, show/hide| Parameter | Type | Description |
|---|---|---|
| entity_id * | string | Entity ID of the study (from chart_get_state) |
| visible * | boolean | true to show, false to hide |
layout_listManage saved layoutslayout_newCreate a new named blank chart layout (opens in a new tab)| Parameter | Type | Description |
|---|---|---|
| name | string | Layout name (default "New layout") |
layout_switchManage saved layouts| Parameter | Type | Description |
|---|---|---|
| name * | string | Name or ID of the layout to switch to |
pane_focusFocus a specific pane by index| Parameter | Type | Description |
|---|---|---|
| index * | number | Pane index (0-based, from pane_list) |
pane_listList all panes with symbols and active statepane_set_layoutChange grid: `s`, `2h`, `2v`, `2x2`, `4`, `6`, `8`| Parameter | Type | Description |
|---|---|---|
| layout * | string | Layout code: s (single), 2h, 2v, 2-1, 1-2, 3h, 3v, 4 (2x2), 6, 8. Also accepts: single, 2x1, 1x2, 2x2, quad |
pane_set_symbolSet symbol on any pane| Parameter | Type | Description |
|---|---|---|
| index * | number | Pane index (0-based) |
| symbol * | string | Symbol to set (e.g., NQ1!, ES1!, AAPL) |
pine_analyzeRun static analysis on Pine Script code WITHOUT compiling — catches array out-of-bounds, unguarded array.first()/last(), bad loop bounds, and implicit bool casts. Works offline, no TradingView connection needed.| Parameter | Type | Description |
|---|---|---|
| source * | string | Pine Script source code to analyze |
pine_checkCompile Pine Script via TradingView's server API without needing the chart open. Returns compilation errors/warnings. Useful for validating code before injecting into the chart.| Parameter | Type | Description |
|---|---|---|
| source * | string | Pine Script source code to compile/validate |
pine_compileCompile / add the current Pine Script to the chartpine_get_consoleRead Pine Script console/log output (compile messages, log.info(), errors)pine_get_errorsGet Pine Script compilation errors from Monaco markerspine_get_sourceGet current Pine Script source code from the editorpine_list_scriptsList saved Pine Scriptspine_newCreate a new blank Pine Script| Parameter | Type | Description |
|---|---|---|
| type * | string | Type of script to create |
pine_openOpen a saved Pine Script by name| Parameter | Type | Description |
|---|---|---|
| name * | string | Name of the saved script to open (case-insensitive match) |
pine_saveSave the current Pine Script (Ctrl+S)pine_set_sourceSet Pine Script source code in the editor| Parameter | Type | Description |
|---|---|---|
| source * | string | Pine Script source code to inject |
pine_smart_compileIntelligent compile: detects button, compiles, checks errors, reports study changesquote_getGet latest price, OHLC, volume| Parameter | Type | Description |
|---|---|---|
| symbol | string | Symbol to quote (blank = current chart symbol). Non-blank values cause a chart switch + restore. |
replay_autoplayToggle autoplay in replay mode, optionally set speed| Parameter | Type | Description |
|---|---|---|
| speed | number | Autoplay delay in ms (lower = faster). Valid values: 100, 143, 200, 300, 1000, 2000, 3000, 5000, 10000. Leave empty to just toggle. |
replay_startStart bar replay mode, optionally at a specific date| Parameter | Type | Description |
|---|---|---|
| date | string | Date to start replay from (YYYY-MM-DD format). If omitted, selects first available date. |
replay_statusGet current replay mode statusreplay_stepAdvance one bar in replay modereplay_stopStop replay and return to realtimereplay_tradeExecute a trade action in replay mode (buy, sell, or close position)| Parameter | Type | Description |
|---|---|---|
| action * | string | Trade action: buy, sell, or close |
symbol_infoSymbol metadata and searchsymbol_searchSymbol metadata and search| Parameter | Type | Description |
|---|---|---|
| query * | string | Search query (e.g., "AAPL", "crude oil", "ES") |
| type | string | Filter by type (e.g., "stock", "futures", "crypto", "forex") |
tab_closeOpen/close tabstab_listList open chart tabstab_newOpen/close tabs| Parameter | Type | Description |
|---|---|---|
| layout | string | "new" for a blank new layout, or a saved layout name (substring match). Omit to leave the tab on the layout picker. |
| name | string | Name for the new layout (used with layout: "new"; default "New layout") |
tab_switchSwitch to a tab by index| Parameter | Type | Description |
|---|---|---|
| index * | number | Tab index (0-based, from tab_list) |
tv_discoverConnection managementtv_health_checkConnection managementtv_launchConnection management| Parameter | Type | Description |
|---|---|---|
| kill_existing | boolean | Kill existing TradingView instances first (default true) |
| port | number | CDP port (default 9222) |
tv_ui_stateGet current UI state: which panels are open, what buttons are visible/enabled/disabledtv_updateUpdate this MCP server to the latest version: git fast-forward of origin/main + npm ci when dependencies changed. Safe by design — refuses on non-git installs, dirty working trees, non-main branches, or diverged history. After a successful update the MCP server must be restarted to load the new code.ui_clickUI automation| Parameter | Type | Description |
|---|---|---|
| by * | string | Selector strategy |
| value * | string | Value to match against the chosen selector strategy |
ui_evaluateUI automation| Parameter | Type | Description |
|---|---|---|
| expression * | string | JavaScript expression to evaluate in the page context. Wrap in IIFE for complex logic. |
ui_find_elementFind UI elements by text, aria-label, or CSS selector and return their positions| Parameter | Type | Description |
|---|---|---|
| query * | string | Text content, aria-label value, or CSS selector to search for |
| strategy | string | Search strategy (default: text) |
ui_fullscreenToggle TradingView fullscreen modeui_hoverHover over a UI element by aria-label, data-name, or text content| Parameter | Type | Description |
|---|---|---|
| by * | string | Selector strategy |
| value * | string | Value to match |
ui_keyboardPress keyboard keys or shortcuts (e.g., Enter, Escape, Alt+S, Ctrl+Z)| Parameter | Type | Description |
|---|---|---|
| key * | string | Key to press (e.g., "Enter", "Escape", "Tab", "a", "ArrowUp") |
| modifiers | array | Modifier keys to hold (e.g., ["ctrl", "shift"]) |
ui_mouse_clickClick at specific x,y coordinates on the TradingView window| Parameter | Type | Description |
|---|---|---|
| button | string | Mouse button (default left) |
| double_click | boolean | Double click (default false) |
| x * | number | X coordinate (pixels from left) |
| y * | number | Y coordinate (pixels from top) |
ui_open_panelUI automation| Parameter | Type | Description |
|---|---|---|
| action * | string | Action to perform |
| panel * | string | Panel name |
ui_scrollScroll the chart or page up/down/left/right| Parameter | Type | Description |
|---|---|---|
| amount | number | Scroll amount in pixels (default 300) |
| direction * | string | Scroll direction |
ui_type_textType text into the currently focused input/textarea element| Parameter | Type | Description |
|---|---|---|
| text * | string | Text to type into the focused element |
watchlist_addRead/modify watchlist| Parameter | Type | Description |
|---|---|---|
| symbol * | string | Symbol to add (e.g., AAPL, BTCUSD, ES1!, NYMEX:CL1!) |
watchlist_add_bulkAdd multiple symbols to the TradingView watchlist| Parameter | Type | Description |
|---|---|---|
| symbols * | array | Symbols to add (e.g., ["AAPL", "ES1!", "NYMEX:CL1!"]) |
watchlist_getRead/modify watchlistwatchlist_removeRemove one or more symbols from the active TradingView watchlist| Parameter | Type | Description |
|---|---|---|
| symbols * | array | Symbols to remove — bare (AAPL) or full (NASDAQ:AAPL) |
Security checks
Static checks derived from the repository 7 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 2.6K words.
- ✓License declaredUsable under a stated license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by package-lock.json.
- !No dynamic code executionScanned 53 source files and found 4 calls to eval or shell execution, in src/core/health.js:17, src/core/health.js:18 and src/core/update.js:26 among others. Review how tool inputs reach them before granting credentials.
1 check has not been run yet.
What the source scan found
- Transport
- stdiosrc/server.js:2
- Starts other programs
- 4 callssrc/core/health.js:17, src/core/health.js:18, src/core/update.js:26
- Outbound network calls
- 16 callssrc/connection.js:111, src/connection.js:120, src/core/alerts.js:69
- Writes or deletes files
- No file writes or deletes
- Lockfile
- package-lock.json
Pattern matches on the source text of 53 files: places to read, not proof of what the code does at run time.
README
The repository's README runs to about 2.6K words, fetched 7 days ago. The original in the repository is authoritative.
Read full README