tradingview-mcp
Provides a TradingView-centric trading toolkit, including screener queries via TradingView's public endpoint, historical FX data, and optional toolsets for pattern scanning, chart rendering, backtesting, TradingView account data (session), desktop CDP control, and Pine Script compilation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tradingview-mcpscan for bullish engulfing on EURUSD daily"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
tradingview-mcp
MCP server giving AI agents a TradingView-centric trading toolkit: screener queries, historical FX data, and — as milestones land — SMC/ICT pattern scanning, chart rendering with markup, backtesting, Pine tooling, and a bundle of companion Agent Skills.
Not affiliated with TradingView, Inc. "TradingView", "Pine Script" and "Lightweight Charts" are trademarks of TradingView, Inc.
Status
M0-M5 complete: server boots with public/data defaults; opt-in toolsets for SMC scanning, chart rendering, backtesting, FX Replay journal sync, TradingView-account data (session), Pine compile, Desktop CDP (screenshots, navigation, drawing on the live chart, reading the user's own indicators — plot values and Pine-drawn FVG/OB zones), and declarative strategies. Ships a tv CLI (every tool = a subcommand emitting JSON), 10 companion skills, and a validated Claude Code plugin manifest. Open items: M1's trust gate still awaits the owner's real hand-labeled SMC setups; webhook receiver, MCP Apps, and the sandboxed Python strategy escape hatch are deferred. Roadmap: docs/PLAN.md.
Related MCP server: TradingView MCP Bridge
Install as a Claude Code plugin
/plugin marketplace add Miha21222/tradingview-mcp
/plugin install tradingview-mcp@tradingview-mcp-marketplaceThe install prompts for optional credentials (OANDA practice key, TradingView sessionid) and operator settings (TV_TOOLSETS, TV_READ_ONLY, ...) — nothing is required for the default public,data surface, which works with zero TradingView account. Requires uv on PATH.
Quick start
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 -> JSONThe opt-in chart toolset renders via headless Chromium; run uv run playwright install chromium once if you enable it. Enable opt-in toolsets via TV_TOOLSETS=default,scan,chart,backtest,journal.
Claude Code: the repo's .mcp.json registers the server automatically when you trust the project.
Configuration (env vars)
Var | Default | Meaning |
|
| Comma list; |
| off |
|
|
| Parquet OHLCV cache |
|
| Rendered PNG output (managed, collision-safe filenames) |
|
| FX Replay CSV watch-folder for |
|
| YAML strategy specs for |
| — | Your TradingView |
|
| CDP address of TradingView Desktop for the opt-in |
|
| Hard cap on bars per response |
| — | Free practice-account key enables the OANDA provider |
|
|
|
Run uv run tv tv_setup_doctor to check every prerequisite - each broken check returns the exact fix command.
TradingView Terms of Service
The default toolsets use no TradingView account: the public toolset talks to TradingView's public scanner endpoint, and market data comes from Dukascopy/OANDA. TradingView's ToS prohibits automated data collection and non-display use of its data; the optional session and desktop toolsets (off by default) interact with your own TradingView account/desktop app at your own risk — enabling them is your explicit choice and may violate TradingView's ToS and risk account restrictions. Both print a ToS/ban warning to stderr on first use. This project is for personal research/education.
License
MIT — see LICENSE. Not affiliated with TradingView, Inc.; protected/invite-only Pine scripts remain their authors' property — the study tools read only the rendered output of indicators on your own chart, never their source.
Available Tools
6 toolstv_data_get_barsARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ISO date/datetime UTC. Default: now. | |
| count | No | Max bars returned (tail of range) | |
| start | No | ISO date/datetime UTC, e.g. 2026-07-01. Default: computed back from `count`. | |
| symbol | Yes | Any alias: EURUSD, OANDA:EURUSD, EUR_USD, eurusd | |
| provider | No | auto | dukascopy | oanda. auto prefers OANDA when a key is configured. | auto |
| timeframe | No | M1, M5, M15, M30, H1, H4, D1 (aliases like 15m/1h accepted) | M15 |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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_statusARead-only
Which OHLCV data providers are usable right now, and why not if not.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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_runARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows (1-200) | |
| market | No | Scanner market: forex, crypto, america, futures, bond, cfd, coin, ... | forex |
| columns | No | Scanner fields to return, e.g. ['name','close','change','RSI','Recommend.All']. Default: name/close/change/volume. | |
| filters | No | Filter triples [field, op, value]; ops: > >= < <= == != between isin. Example: [['RSI','<',30], ['close','>',1.05]] | |
| order_by | No | Field to sort by (descending) |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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_doctorARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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_symbol_searchARead-only
Search TradingView's symbol directory. Returns exchange-qualified tickers with descriptions and types.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Search text, e.g. 'EURUSD' or 'gold' | |
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds that results are exchange-qualified tickers with descriptions/types, but it does not disclose rate limits, pagination behavior, or any other operational traits beyond what annotations and the output schema would imply.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with no filler. The action and resource are front-loaded, and the return contents fit in a compact clause, making the definition easy to scan and act on.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only symbol search with an output schema and clear annotations, the description is largely sufficient. It could mention when to prefer this over tv_screener_run, but the core invocation context is adequately covered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema fully documents the 'text' parameter with examples, leaving 'limit' without a semantic description. The tool description itself does not compensate by explaining limit or its role in result size, although the parameter name and min/max/default constraints make its meaning fairly inferable.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb and resource: 'Search TradingView's symbol directory.' It also states the output shape ('exchange-qualified tickers with descriptions and types'), which clearly differentiates it from the screened runs, TA summaries, and data bar tools listed as siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description makes the intended use clear: an agent should call this when a user wants to find symbols in TradingView's directory. It does not explicitly name alternatives or exclusions, but the verb and resource are specific enough to disambiguate from the sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tv_ta_summaryARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| market | No | Scanner market the tickers belong to: forex (default), crypto, america, ... | forex |
| symbols | Yes | TradingView tickers, e.g. ['OANDA:EURUSD','OANDA:GBPUSD'] (bare 'EURUSD' is auto-prefixed with OANDA:) | |
| timeframe | No | 1D, M15, H1, H4, W1 ... | 1D |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
6 tool updates
v0.1.0- First observed
tv_data_get_bars - First observed
tv_data_providers_status - First observed
tv_screener_run - First observed
tv_setup_doctor - First observed
tv_symbol_search - First observed
tv_ta_summary
TDQS
Scored across 6 tools
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.
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.
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.
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
Related MCP Connectors
Evidence-gated quant research for TradingView Pine Script strategies, run from your AI client.
LuxAlgo Library — the encyclopedia of trading & technical analysis for AI agents. Free, keyless.
Unified financial infrastructure connecting AI agents directly to trade live/demo brokerage accounts, Web3 non-custodial wallets, real-time market data across equities, ETFs, crypto, forex, options, DeFi swaps, and prediction markets, institutional research feeds, and algorithmic strategy backtesters.
Macroeconomic and FX time-series data for AI agents: indicators, calendars, COT, forex, commodities.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceConnects AI assistants to TradingView Desktop for chart analysis, Pine Script development, and workflow automation via Chrome DevTools Protocol.99 npm-
- FlicenseNot gradedqualityDmaintenanceConnects AI assistants to TradingView Desktop via Chrome DevTools Protocol for chart analysis, Pine Script development, and workflow automation.99 npm-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to control and read data from TradingView Desktop, including morning briefs, chart analysis, Pine Script development, and replay mode.99 npm-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with TradingView Desktop via Chrome DevTools Protocol for automated morning briefs, chart analysis, Pine script development, and trading workflows.99 npm-