Model Context Protocol

TradingView MCP Server Integration

Connect the TradingView MCP server to Cursor, VS Code, Claude, Codex, and Gemini so AI assistants can query market search, quotes, candles, technical analysis, news, and screeners across stocks, crypto, and forex — without building a custom tool layer.

Install with one click or one command, then sign in with Console. Keep a JWT, or a local RapidAPI OpenAPI MCP, only when the client cannot complete OAuth.

Why Use TradingView MCP?

Let Claude and Cursor call stock, crypto, and forex tools over MCP

StreamableHTTP Transport

Real-time streaming with Server-Sent Events (SSE) for efficient data delivery

  • GET establishes SSE connection for streaming
  • POST sends JSON-RPC 2.0 requests
  • Low latency with persistent connections
  • Automatic reconnection handling
  • Efficient for real-time market data

Comprehensive Tools

Access 27 tools for market data, analysis, screeners, ideas, and research

  • Market search, quotes, and OHLCV
  • Screener, leaderboards, and fundamentals
  • Technical analysis and chart events
  • News, calendars, and world economy
  • Community ideas and minds
  • Metadata for valid parameter values

OAuth Sign-In

One-click for Cursor and VS Code, one command for Claude Code / Codex / Gemini, then sign in with Console. No token in your config file.

  • Browser login through Console
  • Automatic token refresh after sign-in
  • JWT fallback for RapidAPI and MCP testers
  • Local npx bridge for RapidAPI OpenAPI tools
  • Pro plan does not include MCP

Multi-Client Support

Works seamlessly with popular AI assistants and MCP clients

  • Cursor and VS Code one-click install
  • Claude Code, Codex, and Gemini CLI
  • Claude Desktop and claude.ai connectors
  • Custom MCP clients via JSON
  • Standard JSON-RPC 2.0 protocol

Global Market Coverage

Access data from 353+ exchanges across all major asset classes

  • Stocks from 250+ global exchanges
  • Cryptocurrency markets (Binance, Coinbase, etc.)
  • Forex pairs and currency data
  • Futures and commodities
  • ETFs and indices

High Performance

Optimized for speed and reliability with enterprise-grade infrastructure

  • 99.9% uptime guarantee
  • Low-latency data delivery
  • Scalable architecture
  • CDN-accelerated endpoints
  • Real-time data synchronization

Available MCP Tools

27 tools covering quotes, candles, options, ETFs, screeners, fundamentals, ideas, and world economy

Search & Discovery

tradingview_search_market

Search for symbols across 353+ exchanges

Metadata

tradingview_get_metadata

Get markets, tabs, columnsets, languages, and exchanges

Quotes

tradingview_get_quote

Get a real-time quote for a single symbol

Quotes

tradingview_get_quote_batch

Get real-time quotes for up to 10 symbols

Quotes

tradingview_get_options

Get the option chain for an underlying symbol

Fundamentals

tradingview_get_etf

Get ETF AUM, NAV, expense ratio, and top holdings

Historical Data

tradingview_get_price

Get OHLCV candles (Japanese, Heikin-Ashi, or Range)

Historical Data

tradingview_get_price_batch

Get OHLCV candles for up to 10 symbols

Historical Data

tradingview_get_ohlcv

Get standard Japanese OHLCV for backtests and indicators

Historical Data

tradingview_get_ohlcv_batch

Get standard Japanese OHLCV for up to 10 symbols

Historical Data

tradingview_get_price_events

Get chart event markers such as earnings, dividends, and splits

Technical Analysis

tradingview_get_ta

Get technical analysis signals and optional indicator detail

News

tradingview_get_news

Get financial news filtered by symbol, market, language, or region

News

tradingview_get_news_detail

Get full article content by news ID

Calendar

tradingview_get_calendar

Get economic, earnings, dividend, and IPO calendars

Rankings

tradingview_get_leaderboard

Get gainers, losers, and other ranked lists by asset type

Fundamentals

tradingview_get_market_data

Get company, financials, forecasts, dividends, and analyst data

Screener

tradingview_screen_assets

Run a configurable screener for stocks, crypto, ETFs, bonds, CEX, or DEX

Screener

tradingview_get_screener_presets

List screener preset field groups for an asset type

Screener

tradingview_get_screener_filter_options

List valid screener filter IDs, operations, and enum values

Community

tradingview_get_ideas_hot

Get trending TradingView community ideas

Community

tradingview_get_ideas_editors_picks

Get editor-picked trading ideas

Community

tradingview_get_ideas_by_symbol

Get community ideas for a specific symbol

Community

tradingview_get_idea_detail

Get the full write-up for a community idea

Community

tradingview_get_minds

Get short community opinions (minds) for a symbol

World Economy

tradingview_get_world_economy_indicator_metadata

List world-economy indicator slugs and categories

World Economy

tradingview_get_world_economy_indicators

Get GDP, unemployment, and other country indicator rankings

Quick Start Guide

Use a Console account on a plan that includes MCP (Basic for testing, Ultra or Mega for production). Pro does not include MCP.

1
Recommended

Install the hosted MCP

Skip the config file unless your client is listed under Other clients. After install, the first connection opens Console in the browser.

One click

Cursor

Opens Cursor and adds the hosted server. Sign in with Console when prompted.

Add to Cursor

Paste URL

Claude Desktop / claude.ai

Customize → Connectors → Add custom connector. Paste the hosted URL, then sign in.

Open Claude Connectors →
MCP URL
https://mcp.tradingviewapi.com/mcp

CLI clients

Copy the command, then complete Console sign-in in the client.

Claude Code
claude mcp add --transport http tradingview https://mcp.tradingviewapi.com/mcp

Then run /mcp in the session and finish the browser login.

Codex
codex mcp add tradingview --url https://mcp.tradingviewapi.com/mcp
codex mcp login tradingview

The second line opens Console in the browser.

Gemini CLI
gemini mcp add --transport http tradingview https://mcp.tradingviewapi.com/mcp

If Gemini asks to authenticate, run /mcp auth tradingview.

Other clients and JSON configs

Use these when the client has no install link or CLI. Older clients may use streamable-http instead of http. The URL is the same.

Cursor / Claude Desktop · mcpServers
{
  "mcpServers": {
    "tradingview": {
      "type": "http",
      "url": "https://mcp.tradingviewapi.com/mcp"
    }
  }
}

Cursor: ~/.cursor/mcp.json. Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json.

VS Code · servers
{
  "servers": {
    "tradingview": {
      "type": "http",
      "url": "https://mcp.tradingviewapi.com/mcp"
    }
  }
}

Workspace: .vscode/mcp.json. VS Code uses servers, not mcpServers.

VS Code CLI
code --add-mcp '{"name":"tradingview","type":"http","url":"https://mcp.tradingviewapi.com/mcp"}'
Windsurf · serverUrl
{
  "mcpServers": {
    "tradingview": {
      "serverUrl": "https://mcp.tradingviewapi.com/mcp"
    }
  }
}

Windsurf: ~/.codeium/windsurf/mcp_config.json. The remote field is serverUrl, not url.

2

Sign In When Prompted

The first connection opens Console in the browser. Sign in and allow access. The client stores refresh credentials, so you do not paste a JWT into a config file.

Need a JWT instead?
3

Start Using MCP Tools

After sign-in, restart is usually unnecessary. Ask the assistant to use TradingView tools:

"Search for Apple stock symbol"

"Get real-time quote for AAPL"

"Show me technical analysis for BTC/USDT"

"Get latest news for Tesla"

"Show upcoming earnings calendar"

"Get market leaderboards and top gainers"

"Use the TradingView MCP server to compare BTCUSDT and ETHUSDT trend signals"

Try Live Demo →
JWT fallback

Hosted MCP with a JWT

Use this when the client cannot complete OAuth, when you are testing in the browser MCP tester, or when you subscribe on RapidAPI and want the official hosted tools. Generate a token, then put it in the client headers.

cURL · RapidAPI
curl -X POST https://tradingview-data1.p.rapidapi.com/api/mcp/generate \
  -H "x-rapidapi-host: tradingview-data1.p.rapidapi.com" \
  -H "x-rapidapi-key: YOUR_RAPIDAPI_KEY"
Response includes:
  • token — JWT for Authorization: Bearer
  • mcpUrl — hosted MCP endpoint
  • expiresIn — Basic 30 minutes, Ultra 15 days, Mega 30 days

Add the token to the same hosted URL. Console API keys can call POST https://api.tradingviewapi.com/api/mcp/generate with Authorization: Bearer YOUR_API_KEY instead of RapidAPI headers.

JSON
{
  "mcpServers": {
    "tradingview": {
      "type": "http",
      "url": "https://mcp.tradingviewapi.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN_HERE",
        "Accept": "application/json, text/event-stream"
      }
    }
  }
}
RapidAPI

Local OpenAPI MCP for RapidAPI

This local npx server is for RapidAPI subscribers. It runs on your machine, uses your RapidAPI quota directly, and exposes the OpenAPI spec as tools. It is not the hosted TradingView MCP and does not use Console OAuth.

Add under mcpServers in a command-based MCP client, then replace YOUR_RAPIDAPI_KEY

JSON
{
  "mcpServers": {
    "tradingview-data": {
      "command": "npx",
      "args": ["-y", "@ivotoby/openapi-mcp-server"],
      "env": {
        "API_BASE_URL": "https://tradingview-data1.p.rapidapi.com",
        "OPENAPI_SPEC_PATH": "https://www.tradingviewapi.com/openapi.json",
        "API_HEADERS": "x-rapidapi-host:tradingview-data1.p.rapidapi.com,x-rapidapi-key: YOUR_RAPIDAPI_KEY"
      }
    }
  }
}
When to use this RapidAPI setup
  • You subscribe on RapidAPI and do not have a Console login
  • You want a local process that calls RapidAPI with your key
  • Tool names come from the OpenAPI spec, not the hosted tradingview_* list
  • Cursor, VS Code, Claude Code, and Claude Desktop should use the one-click or one-command setup above instead

Technical Details

Service Endpoint

https://mcp.tradingviewapi.com/mcp
  • Transport: Streamable HTTP
  • Protocol: JSON-RPC 2.0
  • POST for initialize, tools/list, and tools/call
  • GET opens the MCP session SSE stream

Authentication

The hosted MCP URL accepts:

  • Console OAuth (recommended for Cursor, VS Code, Claude, Codex, Gemini)
  • Authorization: Bearer MCP JWT from POST /api/mcp/generate
  • Do not send a Console API key or RapidAPI key to the MCP URL

RapidAPI keys mint a JWT, or run the local OpenAPI MCP. They are not headers on the hosted URL.

JWT Client Headers

OAuth clients set these for you. Use them only with a manual MCP JWT:

Headers
Content-Type: application/json
Accept: application/json, text/event-stream
mcp-protocol-version: 2025-03-26
Authorization: Bearer YOUR_TOKEN

Token Expiration

JWT lifetime follows your Console plan. OpenAPI: token lifetime follows your plan.

  • Basic: 30 minutes
  • Pro: MCP not included
  • Ultra: 15 days
  • Mega: 30 days

OAuth refresh renews the JWT. Manual JWTs must be regenerated before expiresAt.

Response Format

MCP messages are JSON-RPC 2.0 over Streamable HTTP:

  • Success: result with tool output
  • Error: error with code and message
  • Request ID: id matches the client request
  • GET SSE is the MCP session stream, not market quote streaming

Rate Limits

POST /api/mcp/generate is capped (OAuth mint uses the same endpoint). Tool calls are not billed as REST quota.

  • Basic: 50 token generations / month
  • Pro: MCP not included
  • Ultra: 1,000 token generations / month
  • Mega: unlimited token generations

REST monthly quotas apply to HTTP API calls, not hosted MCP tools.

Ready to Integrate TradingView MCP?

Start accessing professional market data through your AI assistant today.