Skip to main content
Glama
tradingview-mcp

tradingview-mcp

by Miha21222

tradingview-mcp

AI 에이전트에 TradingView 중심의 트레이딩 툴킷을 제공하는 MCP 서버: 스크리너 쿼리, 과거 FX 데이터, 그리고 마일스톤이 완료됨에 따라 SMC/ICT 패턴 스캔, 마크업이 포함된 차트 렌더링, 백테스팅, Pine 도구, 그리고 함께 제공되는 Agent Skills 번들.

TradingView, Inc.와 제휴 관계가 아닙니다. "TradingView", "Pine Script" 및 "Lightweight Charts"는 TradingView, Inc.의 상표입니다.

상태

M0-M5 완료: 서버는 public/data 기본값으로 부팅됩니다. SMC 스캔, 차트 렌더링, 백테스팅, FX Replay 저널 동기화, TradingView 계정 데이터(session), Pine 컴파일, Desktop CDP(스크린샷, 탐색, 라이브 차트에 그리기, 사용자 자신의 인디케이터 읽기 — 플롯 값 및 Pine으로 그린 FVG/OB 영역), 그리고 선언적 전략을 위한 옵트인 툴셋. tv CLI(모든 도구 = JSON을 출력하는 하위 명령), 10개의 동반 스킬, 검증된 Claude Code 플러그인 매니페스트를 제공합니다. 미해결 항목: M1의 신뢰 게이트는 여전히 소유자의 실제 수작업 라벨링된 SMC 설정을 기다리고 있습니다. 웹훅 수신기, MCP Apps, 샌드박스 Python 전략 탈출구는 연기되었습니다. 로드맵: docs/PLAN.md.

Related MCP server: TradingView MCP Jackson

Claude Code 플러그인으로 설치

/plugin marketplace add Miha21222/tradingview-mcp
/plugin install tradingview-mcp@tradingview-mcp-marketplace

설치 시 선택적 자격 증명(OANDA 연습 키, TradingView sessionid)과 운영자 설정(TV_TOOLSETS, TV_READ_ONLY, ...)을 묻습니다. 기본 public,data 표면에는 아무것도 필요하지 않으며, TradingView 계정 없이도 작동합니다. PATH에 uv가 필요합니다.

빠른 시작

uv sync
uv run python -m tvmcp --check    # list registered tools
uv run python -m tvmcp            # run on stdio
uv run tv --check                 # CLI: list tools
uv run tv tv_data_get_bars '{"symbol":"EURUSD","count":10}'   # CLI: call any tool -> JSON

옵트인 chart 툴셋은 헤드리스 Chromium을 통해 렌더링합니다. 활성화하려면 uv run playwright install chromium을 한 번 실행하세요. 옵트인 툴셋은 TV_TOOLSETS=default,scan,chart,backtest,journal로 활성화합니다.

Claude Code: 프로젝트를 신뢰하면 저장소의 .mcp.json이 서버를 자동으로 등록합니다.

구성 (환경 변수)

Var

Default

의미

TV_TOOLSETS

default (= public,data)

쉼표 목록; all은 모든 것을 활성화합니다. 옵트인: scan (SMC 스캔), chart (PNG 렌더링), backtest, journal, pine (컴파일/타입체크), strategy (선언적 YAML 스펙), session (TV 계정 데이터, ToS 위험), desktop (TradingView Desktop에 CDP, ToS 위험)

TV_READ_ONLY

off

1 = 쓰기 가능한 도구가 절대 등록되지 않음 (모든 것보다 우선)

TV_CACHE_DIR

~/.tvmcp/cache

Parquet OHLCV 캐시

TV_CHART_DIR

~/.tvmcp/charts

렌더링된 PNG 출력 (관리됨, 충돌 방지 파일명)

TV_JOURNAL_DIR

~/.tvmcp/journal

tv_journal_scan / tv_journal_parse용 FX Replay CSV 감시 폴더

TV_STRATEGY_DIR

~/.tvmcp/strategies

tv_strategy_list / tv_strategy_run용 YAML 전략 스펙

TV_SESSIONID

—

TradingView sessionid 쿠키가 옵트인 session 툴셋을 게이트합니다 (ToS 위험; 아래 참조). 라이브 페치가 작동합니다: 쿠키는 웹소켓 JWT로 교환되어 tvdatafeed-enhanced에 공급됩니다

TV_CDP_URL

http://127.0.0.1:9222

옵트인 desktop 툴셋용 TradingView Desktop의 CDP 주소 (scripts/start-tv-desktop.ps1로 실행, 기본 포트는 9223 — 이 변수를 일치하도록 설정하세요; 다른 CDP 앱이 9222를 소유할 수 있음)

TV_MAX_BARS

5000

응답당 바 수의 상한

OANDA_API_KEY

—

무료 연습 계정 키가 OANDA 공급자를 활성화합니다

OANDA_ENV

practice

practice 또는 live

uv run tv tv_setup_doctor를 실행하여 모든 사전 요구 사항을 확인하세요 — 각 실패한 검사는 정확한 수정 명령을 반환합니다.

TradingView 서비스 약관

기본 툴셋은 TradingView 계정을 사용하지 않습니다: public 툴셋은 TradingView의 공개 스크리너 엔드포인트와 통신하고, 시장 데이터는 Dukascopy/OANDA에서 제공됩니다. TradingView의 ToS는 자동 데이터 수집 및 데이터의 비표시 사용을 금지합니다. 선택적 session 및 desktop 툴셋(기본적으로 꺼짐)은 사용자 자신의 TradingView 계정/데스크톱 앱과 사용자 자신의 책임 하에 상호 작용합니다 — 이를 활성화하는 것은 사용자의 명시적 선택이며 TradingView의 ToS를 위반하고 계정 제한의 위험이 있을 수 있습니다. 둘 다 첫 사용 시 stderr에 ToS/밴 경고를 출력합니다. 이 프로젝트는 개인 연구/교육용입니다.

라이선스

MIT — LICENSE 참조. TradingView, Inc.와 제휴 관계가 아닙니다. 보호/초대 전용 Pine 스크립트는 작성자의 자산으로 유지됩니다 — 연구 도구는 사용자 자신의 차트에 있는 인디케이터의 렌더링된 출력만 읽으며, 소스 코드는 절대 읽지 않습니다.

Available Tools

6 tools
tv_data_get_barsA
Read-only

Fetch historical OHLCV bars. Cached in Parquet; repeat queries are instant.

Providers: dukascopy (free, deep history to ~2000s, first fetch of a range is slow) and oanda (real broker mid prices, needs OANDA_API_KEY). Bars are UTC, returned as arrays [time_iso, open, high, low, close, volume]. The provider field in the result names the feed - feeds disagree; levels are feed-specific.

NameRequiredDescriptionDefault
endNoISO date/datetime UTC. Default: now.
countNoMax bars returned (tail of range)
startNoISO date/datetime UTC, e.g. 2026-07-01. Default: computed back from `count`.
symbolYesAny alias: EURUSD, OANDA:EURUSD, EUR_USD, eurusd
providerNoauto | dukascopy | oanda. auto prefers OANDA when a key is configured.auto
timeframeNoM1, M5, M15, M30, H1, H4, D1 (aliases like 15m/1h accepted)M15

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint and openWorldHint, and the description adds substantial context: Parquet caching makes repeat queries instant, first fetch can be slow, bars are UTC, output format is arrays, and feeds disagree with feed-specific levels. This goes beyond the annotation hints without contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact, with each sentence serving a purpose: main action, caching, providers, output format, and a caveat. It is front-loaded with the main verb and resource, and no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description still covers key behavioral aspects: caching, provider specifics, timezone, output format, and feed disagreement. For a 6-parameter tool, this is complete enough for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers 100% of parameters, so the baseline is 3. The description adds meaning to the provider parameter by explaining provider differences (dukascopy free/deep, oanda requires key), and clarifies the output format. This extra context justifies a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Fetch') and resource ('historical OHLCV bars'), and the provider/output details clearly differentiate it from screening, TA, and search tools. The purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus siblings is provided. However, the description implies it is the go-to for historical bar data, and provider selection is covered. Since alternatives are not named, it only achieves implied usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tv_data_providers_statusA
Read-only

Which OHLCV data providers are usable right now, and why not if not.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark the tool as readOnlyHint=true and openWorldHint=true, so the description adds value by revealing that results are time-sensitive ('right now') and that the tool will explain the cause of unavailability. It does not contradict annotations and provides behavioral context beyond the structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, tightly worded sentence that immediately communicates purpose and scope. Every word earns its place, and the core question ('which providers are usable') is front-loaded before the explanatory clause.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, read-only status tool with an output schema and annotations already covering safety, the description is complete. It tells the agent what the tool does, what makes it different from data-fetching tools, and what kind of answer to expect (usable or not, plus reasons).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

This tool has zero parameters and an empty input schema, so there are no parameter semantics for the description to clarify. Per the rubric, a zero-parameter tool earns a baseline of 4; nothing is missing here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: checking which OHLCV data providers are currently usable, and provides the additional promise of explaining why not if a provider is unavailable. This is specific and easily distinguishes it from sibling tools like tv_data_get_bars or tv_screener_run, which serve different functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies a real-time availability check but does not explicitly state when to use this tool versus siblings, nor does it mention any exclusions or alternatives. An agent can infer use context, but there is no direct guidance such as 'check this before requesting data' or 'use tv_data_get_bars for historical bars instead.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tv_screener_runA
Read-only

Run a TradingView screener query (unauthenticated scanner, ~3000 fields).

Use for: ranking/filtering instruments by indicator or fundamental values, finding oversold pairs, volume leaders, etc. US-equity quotes are 15-min delayed; forex/crypto are near-realtime. Timeframe-scoped fields take a suffix, e.g. 'RSI|15' for M15 RSI.

NameRequiredDescriptionDefault
limitNoMax rows (1-200)
marketNoScanner market: forex, crypto, america, futures, bond, cfd, coin, ...forex
columnsNoScanner fields to return, e.g. ['name','close','change','RSI','Recommend.All']. Default: name/close/change/volume.
filtersNoFilter triples [field, op, value]; ops: > >= < <= == != between isin. Example: [['RSI','<',30], ['close','>',1.05]]
order_byNoField to sort by (descending)

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare read-only and open-world behavior, so the bar is lower. The description still adds meaningful context beyond annotations: the scanner is unauthenticated, US-equity quotes are 15-minute delayed, forex/crypto are near-realtime, and timeframe-scoped fields use a suffix like 'RSI|15'. This helps set expectations without contradicting annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: the core operation comes first, followed by concrete use cases, then important data-quality caveats. Each sentence contributes distinct value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with zero required parameters, full schema coverage, clear annotations, and an output schema, the description covers the key operational nuances: when to use it, field flexibility, data delay caveats, and field-name formatting. Nothing essential is missing for an agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds beyond the schema by explaining the timeframe-suffix convention for fields (e.g., 'RSI|15') and signaling the wide field space (~3000 fields), which helps the agent construct valid columns and filters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description opens with a specific verb and resource: 'Run a TradingView screener query'. It further differentiates from siblings by scoping to ranking/filtering instruments, oversold pairs, and volume leaders, which clearly separates it from symbol search, bar retrieval, and TA summary tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides an explicit 'Use for' list covering ranking, filtering, identifying oversold pairs, and volume leaders. It does not name alternatives or state when not to use the tool, but the use cases are clear enough for an agent to select it over siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tv_setup_doctorA
Read-only

Diagnose this install: check every prerequisite, return exact fixes.

Each check reports {name, ok, detail, optional} and - when broken - a fix holding the exact shell command to run. Run the fixes for anything with ok=false and optional=false, rerun the doctor, and the server is fully operational. Credential checks (OANDA key, TV session cookie) are optional and always require the human - never attempt to obtain credentials.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With readOnlyHint=true, the annotation already indicates safety, but the description goes well beyond that by disclosing the exact output shape ({name, ok, detail, optional}), the presence of a `fix` field, and the required workflow after running fixes. It also transparently states that credential checks always require a human and must not be attempted automatically. This is rich behavioral disclosure that complements the annotations without contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the core purpose. Each sentence adds distinct value: first the diagnose-and-fix purpose, then the output contract, then the remediation workflow, and finally the credential-handling caveat. There is no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, read-only diagnostic tool, the description covers everything an agent needs: what the tool does, what it returns, how to use the results, and which actions require human involvement. The presence of an output schema reduces the need to document return values further, and the description already summarizes the key output fields.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so there is nothing for the description to explain about parameter usage. The description instead focuses on the diagnostic workflow and output contract, which is the most relevant semantic content for this tool. The baseline of 4 for no-parameter tools is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a concrete action: 'Diagnose this install: check every prerequisite, return exact fixes.' This clearly identifies the tool as a setup diagnostic, distinguishing it from siblings like tv_screener_run or tv_data_get_bars, which perform different functions. A specific resource ('this install') and expected outcome ('return exact fixes') makes the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit workflow guidance: run fixes for anything with ok=false and optional=false, rerun the doctor, and the install becomes operational. It also warns that credential checks are optional and require human involvement. It does not explicitly compare against sibling tools, but the usage context is clear enough that an agent would know when to invoke it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tv_ta_summaryA
Read-only

Technical-analysis summary per symbol: overall/MA/oscillator ratings plus RSI and close.

Ratings are TradingView's precomputed Recommend.* fields mapped to STRONG_BUY..STRONG_SELL. Use for a quick bias read, not as a trade signal.

NameRequiredDescriptionDefault
marketNoScanner market the tickers belong to: forex (default), crypto, america, ...forex
symbolsYesTradingView tickers, e.g. ['OANDA:EURUSD','OANDA:GBPUSD'] (bare 'EURUSD' is auto-prefixed with OANDA:)
timeframeNo1D, M15, H1, H4, W1 ...1D

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds valuable behavioral context by disclosing that ratings are TradingView's precomputed Recommend.* fields and explaining the mapping to STRONG_BUY..STRONG_SELL.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: the first sentence states what the tool returns, the second explains the rating source and mapping, and the third gives a clear usage caveat. Every sentence contributes useful information with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With a complete input schema, an output schema present, and annotations covering read-only behavior, the description adds the remaining essential context: data provenance, rating mapping, and the caution that this is not a trade signal. Nothing critical is missing for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and each parameter already has a meaningful description, including examples and auto-prefix behavior for symbols. The tool description does not add parameter-specific detail beyond what the schema provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool produces a technical-analysis summary per symbol, naming the specific components: overall/MA/oscillator ratings plus RSI and close. It also explains the rating values are TradingView Recommend.* fields mapped to STRONG_BUY..STRONG_SELL, which distinguishes this from sibling tools like tv_data_get_bars and tv_screener_run.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says to use it for a quick bias read and not as a trade signal, giving clear context and an exclusion. It does not name a specific alternative tool, but the usage context is still well-defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.0
    • First observedtv_data_get_bars
    • First observedtv_data_providers_status
    • First observedtv_screener_run
    • First observedtv_setup_doctor
    • First observedtv_symbol_search
    • First observedtv_ta_summary

TDQS

A4.1/5.0

Scored across 6 tools

Disambiguation4/5

Each tool targets a distinct surface—screening, TA ratings, symbol lookup, install diagnostics, provider health, and OHLCV data—so most are unambiguous. The two diagnostic tools have some overlap around environment/credential health but are separated by install prerequisites versus current data-feed availability.

Naming Consistency3/5

All names share a tv_ prefix and snake_case, but the internal pattern is mixed: action-style names like tv_screener_run and tv_data_get_bars sit beside noun-style names like tv_ta_summary, tv_symbol_search, tv_setup_doctor, and tv_data_providers_status. A consistent verb_noun or noun_verb pattern would make the set more predictable.

Tool Count5/5

Six tools is well-scoped for a TradingView-oriented data server: screening, symbol discovery, technical summaries, historical bars, and health diagnostics each have a home. No tool feels redundant, and the count is neither thin nor bloated.

Completeness4/5

Core workflows are covered: find symbols, screen/filter, get TA reads, and pull OHLCV bars, plus status and diagnostic tools. Minor gaps exist—such as no direct single-symbol quote tool separate from bars/screener and no explicit indicator-value fetch beyond the TA summary—but agents can work around these.

Maintenance

ActivitySlowing
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Connects AI assistants to TradingView Desktop for chart analysis, Pine Script development, and workflow automation via Chrome DevTools Protocol.
    76 npm
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to interact with TradingView Desktop via Chrome DevTools Protocol for automated morning briefs, chart analysis, Pine script development, and trading workflows.
    76 npm
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to read and control TradingView Desktop charts in real time, supporting chart analysis, Pine Script development, alerts, replay practice, and multi-pane automation.
    76 npm
    MIT