TradingView Chrome MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TV_DATA_DIR | No | Logs, backups, screenshots, exports. | %LOCALAPPDATA%\tradingview-chrome-mcp |
| TV_LOG_LEVEL | No | Log level for the server. | info |
| OPENAI_API_KEY | No | Enables autonomous tv_pine_autofix patching using OpenAI. | |
| TV_AUTOFIX_MODEL | No | LLM used by the repair loop. | gpt-4o |
| TV_MCP_HTTP_PORT | No | Optional Streamable HTTP transport; set '0' to disable. | 3940 |
| ANTHROPIC_API_KEY | No | Enables autonomous tv_pine_autofix patching using Anthropic. | |
| TV_BROWSER_DRIVER | No | Browser driver: 'playwright' or 'extension'. | playwright |
| TV_DASHBOARD_PORT | No | Local dashboard port. | 3939 |
| TV_DASHBOARD_TOKEN | No | Bearer token required by dashboard /api/*. | random |
| TV_EXTENSION_TOKEN | No | Shared secret between .exe and extension. | tradingview-chrome-mcp |
| TV_ALLOW_CHROME_KILL | No | Set to '1' to let the launcher close conflicting Chrome instances. | 0 |
| TV_EXTENSION_WS_PORT | No | WebSocket port for extension mode. | 9223 |
| TV_ALLOW_REAL_PROFILE | No | Set to '1' to reuse your real Chrome profile. | 0 |
| TV_ALLOW_CHROME_LAUNCH | No | Set to '1' to let the launcher start Chrome if none is found. | 0 |
| TV_APPROVAL_TIMEOUT_MS | No | How long writes wait for your approval. | 120000 |
| TV_ENABLE_BROWSER_POOL | No | Set to '1' to enable the experimental Playwright browser-pool reuse. | 0 |
| TV_ENABLE_BOTH_BACKENDS | No | Set to '1' to expose market-data API tools alongside the browser backend. | 0 |
| TV_ENABLE_SENTIMENT_NEWS | No | Set to '1' to expose tv_market_sentiment and tv_financial_news. | 0 |
| TV_DEFAULT_TRADINGVIEW_URL | No | Chart URL to open when no tab exists. | https://www.tradingview.com/chart/ |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| pingA | Health check. Returns server version, emergency-stop state, and the detected MCP host client. |
| mcp_client_infoA | Detect and report the LLM/MCP host client that launched this server (Claude, Codex, ChatGPT, Cursor, etc.). Read-only. |
| emergency_stopA | Immediately disable all tools. Use to halt a runaway action chain. |
| emergency_clearA | Re-enable tools after an emergency stop. Use only once the user has confirmed safety. |
| browser_statusA | Report Chrome connection status and the number of open tabs. |
| browser_list_tabsA | List all open Chrome tabs. |
| tv_statusA | Read the current TradingView chart state: symbol, timeframe, login, Pine editor open, dialogs, diagnostics, and detected MCP host client. |
| tv_read_chartA | Alias for tv_status. Returns the current symbol, timeframe, page readiness, diagnostics, and detected MCP host client. |
| tv_get_ohlcvA | Extract OHLCV bars from the active TradingView chart. Best-effort via the widget API, with a DOM fallback. Read-only. |
| tv_screenshotA | Capture a PNG screenshot of the active TradingView tab. Returns either a local file path or an inline base64 markdown image. |
| tv_open_pine_editorA | Open the Pine Editor panel on the chart. Idempotent: returns alreadyOpen=true if already open. |
| tv_read_pine_sourceA | Read the current Pine Script source from the open editor. Returns null if editor is closed. |
| tv_pine_createA | Replace the Pine editor contents with a new v6 indicator source. Does NOT save. Call tv_pine_save afterwards. |
| tv_pine_patchB | Patch the Pine editor with a full replacement source (semantic patch = overwrite editor buffer). Call tv_pine_save afterwards. |
| tv_pine_compile_errorsA | Read compile errors/warnings from the Pine editor. Call after tv_pine_save or before tv_pine_add_to_chart. |
| tv_pine_saveA | Click the Pine editor Save button. DESTRUCTIVE: persists the script to the user's TradingView account. |
| tv_pine_add_to_chartB | Click 'Add to chart' on the current Pine script. DESTRUCTIVE: changes the active chart. |
| tv_rename_scriptA | Rename the current Pine script via the editor title menu (Rename...). DESTRUCTIVE: changes the saved script name. |
| tv_change_symbolA | Change the active chart symbol. DESTRUCTIVE: modifies the user's chart. |
| tv_change_timeframeA | Change the active chart timeframe. DESTRUCTIVE: modifies the user's chart. |
| tv_read_strategy_testerA | Read the Strategy Tester summary if visible. Returns visible:false if the panel is not open. |
| tv_backtest_compareA | Compare a Pine strategy across multiple parameter sets using the Strategy Tester. Pro+ only. DESTRUCTIVE: changes the chart, saves/loads the strategy, and opens the Strategy Tester. |
| tv_dismiss_dialogsA | Close known TradingView upsell/notice dialogs (close/X buttons only; never clicks primary CTAs). Non-destructive. |
| tv_layout_listA | Open the layouts menu and list saved chart layout names. Best-effort selector. |
| tv_layout_switchA | Switch to a saved chart layout by exact name. DESTRUCTIVE: changes the active layout. |
| tv_alert_createA | Create an alert on the current symbol. Supports simple message alerts or template-driven condition alerts (Crossing Up/Down, Greater/Less Than). DESTRUCTIVE: creates a real alert on your account. |
| tv_alert_listB | Open the alerts panel and list existing alert messages. Best-effort. |
| tv_alert_deleteA | Delete the alert at the given zero-based index in the alerts panel. DESTRUCTIVE. |
| tv_watchlist_readA | Read the symbols in the active watchlist panel if visible. |
| tv_watchlist_add_symbolA | Add the current chart symbol to the watchlist via the star button. DESTRUCTIVE: modifies your watchlist. |
| tv_watchlist_syncA | Read the active watchlist and optionally add the current/requested symbol if missing. DESTRUCTIVE when it adds a symbol. |
| tv_chart_metadataA | Read visible chart metadata: symbol, timeframe, indicators, strategies, overlays, and pane count. Read-only. |
| tv_ensure_chartA | Ensure a usable TradingView chart tab is open. If none exists, opens the Pine Editor and navigates to TV_DEFAULT_TRADINGVIEW_URL. Non-destructive navigation only. |
| tv_chart_data_exportA | Export the current chart data to CSV. Saves the download to ./exports. DESTRUCTIVE: triggers a browser download. |
| tv_drawing_add_trendlineB | Experimental: add a vertical trend line via the left drawing toolbar using two clicks on the chart pane. Best-effort. |
| tv_drawing_add_horizontal_lineA | Experimental: add a horizontal line at a chosen Y-position on the chart pane. Best-effort. |
| tv_drawing_add_rectangleB | Experimental: add a rectangle drawing on the chart pane. Best-effort. |
| tv_drawing_add_fib_retracementA | Experimental: add a Fibonacci retracement drawing on the chart pane. Best-effort. |
| tv_layout_saveA | Save the current chart layout. Provide a name to perform 'Save layout as...'. DESTRUCTIVE: overwrites the saved layout in your TradingView account. |
| tv_layout_duplicateA | Duplicate the active chart layout. Optionally provide a new name. DESTRUCTIVE: creates a new layout in your account. |
| tv_layout_renameA | Rename the active chart layout. DESTRUCTIVE: changes the saved layout name. |
| tv_layout_resetA | Reset the active chart layout to its default/empty state. DESTRUCTIVE: removes indicators and drawings. |
| tv_layout_exportA | Export a local snapshot of the current layout (screenshot + metadata JSON) to ./layouts. Non-destructive. |
| tv_indicator_addA | Add an indicator or strategy to the chart by name (e.g. 'RSI', 'MACD'). DESTRUCTIVE: modifies the chart. |
| tv_indicator_removeA | Remove an indicator from the chart by exact legend name or zero-based index. DESTRUCTIVE. |
| tv_indicator_hideA | Hide an indicator by legend name or zero-based index. DESTRUCTIVE: changes chart visibility. |
| tv_indicator_showA | Show a previously hidden indicator by legend name or zero-based index. DESTRUCTIVE: changes chart visibility. |
| tv_indicator_settingsB | Update an indicator's settings by legend name or index. |
| tv_chart_verifyA | Best-effort runtime verification that an indicator is on the chart and expected plots/labels/tables are present. Read-only. |
| tv_pine_backupA | Back up the current Pine editor source to ./backups with a timestamp. Non-destructive. |
| tv_pine_list_backupsA | List available Pine source backups from ./backups, newest first. Read-only. |
| tv_pine_restoreA | Restore a backup into the Pine editor. If backupName is omitted, restores the most recent backup. DESTRUCTIVE: overwrites editor contents (does not auto-save). |
| tv_pine_quick_fixA | Apply deterministic, rule-based Pine Script fixes to the current editor source without calling an LLM. Does NOT save. Returns the patched source if a static rule applied. DESTRUCTIVE: overwrites editor contents (no auto-save). |
| tv_pine_autofixA | Autonomous Pine Script repair loop. Reads source, compiles, applies static rules first, then optionally calls an LLM (OPENAI_API_KEY/ANTHROPIC_API_KEY) to patch remaining errors, saves, adds to chart, and verifies. DESTRUCTIVE: may save and add to chart. Set autoSave/autoAddToChart=false to run read-only diagnostics. |
| licence_statusA | Report the current product edition (Free/Pro/Team/Owner), feature limits, activation status, and device id. Read-only. |
| activate_licenceA | Activate a Pro/Team/Owner licence key locally. Free requires no key. Does not touch the browser or the chart. |
| edition_limitsA | List the feature limits for every edition (Free/Pro/Team/Owner). Read-only. |
| audit_verifyA | Recompute the hash-chained audit log from genesis and report the first broken sequence, plus the latest entries. Read-only. |
| sync_statusA | Report cloud sync configuration and the local sync queue depth. Optionally drain one batch now. Read-only unless drain=true. |
| tv_paper_tradeA | Pro+. Run a SIMULATED strategy backtest over deterministic historical bars. No real money, no broker, no live orders. Requires Pro+ edition. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/firyomaefx/tradingview-chrome-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server