Skip to main content
Glama
gagahkharismanuary

tradingview-mcp-codex

tradingview-mcp-codex

Connect Codex to your TradingView Desktop chart. Control symbols, timeframes, indicators, and screenshots via AI or CLI.

Not affiliated with TradingView Inc. Interacts only with your locally running TradingView Desktop app via Chrome DevTools Protocol.

Requires a valid TradingView subscription. Does not bypass any paywall or access control.

All processing is local. No chart data leaves your machine.


Prerequisites

  • Node.js 18+

  • TradingView Desktop installed (paid subscription)

  • Codex CLI with MCP support


Related MCP server: tradingview-mcp

Install

git clone https://github.com/gagahkharismanuary/tradingview-mcp-codex.git
cd tradingview-mcp-codex
npm install

Step 1: Launch TradingView with debug port

TradingView must run with Chrome DevTools Protocol enabled on port 9222.

Mac (auto):

npm run launch

Mac (manual):

/Applications/TradingView.app/Contents/MacOS/TradingView --remote-debugging-port=9222

Windows:

"%LOCALAPPDATA%\TradingView\TradingView.exe" --remote-debugging-port=9222

Linux:

tradingview --remote-debugging-port=9222

Verify connection:

npm run health

Expected:

{
  "success": true,
  "cdp_connected": true,
  "chart_symbol": "BTCUSD"
}

Step 2: Register with Codex

codex mcp add tradingview-codex -- node /path/to/tradingview-mcp-codex/src/server.js

Replace /path/to/tradingview-mcp-codex with where you cloned. To find it:

pwd  # run inside the repo folder

Verify:

codex mcp list
codex mcp get tradingview-codex

Restart Codex after adding — tools load on session start.


Step 3: Verify in Codex

Ask Codex to call tvx_health_check. Expected:

{
  "success": true,
  "cdp_connected": true,
  "chart_symbol": "BTCUSD",
  "api_available": true
}

MCP Tools

Tool

What it does

tvx_health_check

Check CDP connection and chart status

tvx_launch

Launch TradingView Desktop with debug port

tvx_chart_state

Get symbol, timeframe, chart type, and indicator list

tvx_set_symbol

Change chart symbol

tvx_set_timeframe

Change chart timeframe

tvx_set_chart_type

Change chart type (Candles, Line, HeikinAshi, etc.)

tvx_manage_indicator

Add or remove an indicator

tvx_symbol_search

Search symbols by name or keyword

tvx_screenshot

Capture a screenshot of the chart


CLI

Install tvx globally (optional):

npm link
tvx status                                        # health check
tvx launch                                        # launch TradingView
tvx state                                         # get chart state
tvx symbol AAPL                                   # change symbol
tvx timeframe 15                                  # change timeframe (1, 5, 15, 60, D, W)
tvx charttype HeikinAshi                          # change chart type
tvx indicator add "Relative Strength Index"       # add indicator (full name required)
tvx indicator remove <entity_id>                  # entity_id from tvx state output
tvx search bitcoin                                # search symbols
tvx screenshot chart                              # capture chart (full, chart, strategy_tester)

Without npm link:

node src/cli/index.js symbol AAPL

Troubleshooting

Problem

Fix

cdp_connected: false

Launch TradingView with --remote-debugging-port=9222

ECONNREFUSED

TradingView not running or port 9222 blocked

Tools missing in Codex

Restart Codex after codex mcp add

tvx command not found

Run npm link inside the repo folder

Indicator add fails

Use full name: "Relative Strength Index" not "RSI"


One-liner Codex install prompt

Paste into Codex and it will handle the rest:

Clone https://github.com/gagahkharismanuary/tradingview-mcp-codex.git, run npm install, register with codex mcp add tradingview-codex -- node <path>/src/server.js, then verify with tvx_health_check.


Credits

Built on top of tradesdontlie/tradingview-mcp — a TradingView MCP server for Claude Code that connects AI agents to TradingView Desktop via Chrome DevTools Protocol. Core architecture, CDP connection patterns, chart API bindings, and tool designs are derived from that work. This project adapts and extends it for Codex workflows.

Licensed MIT. Copyright (c) 2026 tradesdontlie.

Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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/gagahkharismanuary/tradingview-mcp-codex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server