Tradingview Indicator Search MCP Serverのロゴ

Tradingview Indicator Search MCP Server

コミュニティ
daviddme

TradingView MCP server: search indicators and strategies, fetch Pine Script source. Works with Claude Code, Claude Desktop and Cursor. No API key needed.

公開者daviddme
リポジトリtradingview-indicator-search-mcp-server
言語JavaScript
フォーク
21
スター
59
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    Tradingview Indicator Search MCP Serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには59件のスターと21件のフォークがあります。

TradingView Indicator Search MCP Server

Search TradingView's public indicator and strategy library from Claude, Cursor, or any MCP client, and pull the full Pine Script source of any open-source script.

An MCP (Model Context Protocol) server that turns the entire public TradingView script library into a tool your AI coding agent can query. Ask for "trend following strategies" or "everything by LuxAlgo", get back real indicators with their Pine Script source, ready to read, adapt or backtest.

No TradingView account, API key, cookie or login required. Every endpoint used is public.

MCP Node Tests License


Contents


What this does

TradingView hosts hundreds of thousands of community-published indicators and strategies written in Pine Script. Most are open source. This MCP server gives an AI agent structured access to all of it:

  • Search by topic — "trend following", "scalping", "order blocks", "mean reversion"
  • Browse editors' picks — TradingView's hand-curated best scripts
  • Search by author — every public script from a creator you follow
  • Fetch Pine Script source — the complete code for any open-source script
  • Build a local library — bulk-collect scripts into a SQLite corpus you can search offline, including searching inside the Pine code itself

That last point is the useful one. Once scripts are collected locally, you can find every strategy that uses ta.supertrend or strategy.entry with a single instant query. The TradingView website cannot do that.

Quick start

bash
git clone https://github.com/daviddme/tradingview-indicator-search-mcp-server.git
cd tradingview-indicator-search-mcp-server
npm install

Requires Node.js 22.5 or newer (it uses the built-in node:sqlite, so there is no native module to compile and no database to install).

Then add it to your MCP client below.

Install in Claude Code

bash
claude mcp add tradingview -s user -- node "$(pwd)/src/server.js"

-s user makes it available in every project. Verify with:

bash
claude mcp list

Install in Claude Desktop

Edit claude_desktop_config.json:

  • macOS — ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows — %APPDATA%\Claude\claude_desktop_config.json
json
{
  "mcpServers": {
    "tradingview": {
      "command": "/absolute/path/to/node",
      "args": ["/absolute/path/to/tradingview-indicator-search-mcp-server/src/server.js"]
    }
  }
}

Use the absolute path to node. Desktop apps do not inherit your shell PATH, so a bare "node" fails with spawn node ENOENT. Find yours with which node.

Restart Claude Desktop.

Install in Cursor

Edit ~/.cursor/mcp.json with the same block as above, then restart Cursor.

Any MCP-compatible client works. The server speaks stdio, so it also runs in Windsurf, Cline, Zed and others.

Tools

ToolWhat it does
search_scriptsSearch by topic: "trend following", "scalping", "order blocks". Omit the query for the top/trending feed
list_editors_picksTradingView's hand-curated editors' picks, the highest quality per result
list_author_scriptsEvery public script by one author
get_script_sourceFull Pine Script source, by script ID or a pasted TradingView chart URL
harvest_scriptsBulk-collect scripts and their source into the local corpus. Resumable
query_corpusSearch the local corpus offline, including full-text search inside Pine code
fetch_statusRate-limit health and corpus size. Makes no network request

Example prompts

Once installed, just ask your agent in plain language:

"Find me the top 10 trend-following strategies on TradingView and show me the Pine Script for the most popular one."

"Harvest 100 scalping strategies, then show me which ones use ATR-based stop losses."

"What indicators has LuxAlgo published recently?"

"Get the source for https://www.tradingview.com/script/K0SEi3Ct-Some-Indicator/ and explain how its entry logic works."

"Search my local corpus for every strategy that calls strategy.exit with a trailing stop."

The efficient pattern is to harvest once, then work offline:

harvest_scripts   query="trend following" script_type=strategies max_scripts=100
query_corpus      source_contains="strategy.entry" with_source_only=true
get_script_source script_id_part="PUB;..."

How TradingView search actually works

Worth knowing, because it explains the tool design. TradingView exposes two search surfaces and they are not equally good:

SurfaceQuality
Slug routes — /scripts/trend-following/Curated and genuinely on-topic
JSON API — /api/v1/scripts/?q=trend+followingPoor relevance. Top result was "Split Volume + Signals"

So topic search uses the slug routes, and the JSON API is used only for by=<username> author lookups, which is the one thing it does well.

Undocumented filters compose with topics, and the API helpfully declares its own query schema in every response under data.ideas.params:

  • script_type — indicators | strategies | libraries | all
  • script_access — open | all
  • sort — latest_popular | recent_extended

Every script carries a script_id_part (PUB;<hash>) and version, which together address the Pine source endpoint. Passing last as the version always resolves to the current one.

Rate limiting and not getting banned

This is the part most scrapers get wrong, so it is enforced at the lowest level: every outbound request passes through a single throttle and no tool can bypass it.

  • Strictly sequential — concurrency of exactly 1, process-wide. Never parallel
  • Randomised delays of 1.5 to 4.5s between requests. A fixed interval is the clearest bot signature there is, so the gap is jittered every time
  • Human break pattern — a 20 to 60s pause roughly every 25 requests
  • Persistent cookie jar — real browsers accumulate cookies, and sending none on every request is itself anomalous. The server warms up once per 12h and reuses the jar
  • Stable browser identity — user agent and its matching sec-ch-ua are chosen once per process and held constant, because real browsers do not change UA mid-session
  • Exponential backoff on 429/403/5xx, honouring Retry-After
  • Circuit breaker — after 3 consecutive blocks, all traffic stops for 15 minutes and tools return a clear error. Without this, a rate-limited agent retries straight into a hard ban. This is the single most important safeguard here
  • Daily budget of 2000 requests, so a runaway agent loop cannot burn your IP overnight
  • Cache-first — Pine source is immutable per version, so a cached source is never refetched. This cuts request volume more than everything else combined

Run fetch_status at any time to see budget use and breaker state.

Run this locally, on a residential connection. Hosting it on a cloud provider puts requests on a datacenter IP, which sites like TradingView block far more aggressively than home connections, and a block would hit an egress IP you do not control.

Configuration

All optional, all environment variables.

VariableDefaultMeaning
IF_DB_PATHdata/indicator_fetch.dbCorpus location
IF_MIN_DELAY_MS / IF_MAX_DELAY_MS1500 / 4500Delay window between requests
IF_BREAK_EVERY25Requests between long breaks
IF_BREAK_MIN_MS / IF_BREAK_MAX_MS20000 / 60000Long break window
IF_DAILY_BUDGET2000Hard daily request cap
IF_BREAKER_THRESHOLD3Consecutive blocks before the breaker trips
IF_BREAKER_COOLDOWN_MS900000How long the breaker stays open
IF_LISTING_TTL_MS21600000Listing cache lifetime. Source never expires
IF_HARVEST_MAX200Hard cap on scripts per harvest
IF_SNIPPET_CHARS300Description snippet length in listings

Running several MCP clients at once is fine. They share one SQLite file (WAL mode, so concurrent access is safe) and therefore share the daily request budget, which is correct because they share one IP.

FAQ

Do I need a TradingView account or API key?

No. Every endpoint this uses is public and unauthenticated. There is no login, no API key and no cookie to configure.

Can it fetch invite-only or closed-source indicators?

No, and nothing can. TradingView never exposes the Pine source of protected scripts. Searches filter them out by default so every result you see can actually be fetched.

Does this work with Claude Desktop, Claude Code and Cursor?

Yes, all three, plus any other MCP client that speaks stdio. See the install sections above. It does not work with claude.ai in the browser, which requires a publicly hosted HTTPS connector rather than a local process.

Will this get my IP banned by TradingView?

The whole design is built to avoid that: sequential requests, randomised human-like delays, periodic breaks, a daily budget and a circuit breaker that halts everything after repeated blocks. Run it locally rather than from a datacenter, and leave the conservative defaults alone unless you have a reason.

How many scripts can I collect?

TradingView caps broad result counts at 1000, so narrow topics give better coverage than broad ones. A single harvest_scripts call is capped at 200 scripts by default, and it is resumable, so larger libraries are built across several calls.

Where is the data stored?

In a local SQLite file, data/indicator_fetch.db by default. Nothing is uploaded anywhere. Change the location with IF_DB_PATH.

Can I search inside the Pine Script code?

Yes, and this is the main reason to build a local corpus. query_corpus supports full-text search over names, authors and descriptions, plus literal substring matching inside the source with source_contains, which is what you want for code tokens like ta.supertrend that a full-text tokeniser would split apart.

Is scraping TradingView allowed?

This reads public pages the same way a browser does, at a much slower rate than a person clicking around. You are responsible for your own use of it, including TradingView's Terms of Service, and for respecting the licences of any Pine Script you collect. Script authors retain copyright in their code.

Development

bash
npm test

60 tests, fully offline. Parsers run against real captured API payloads in test/fixtures/ (see the fixtures note on what was redacted for redistribution), and the throttle is tested with an injected clock so no test ever waits.

bash
npm run smoke

Live end-to-end check against TradingView. Makes about 5 real requests.

Project layout

FileResponsibility
src/server.jsMCP wiring and tool definitions
src/tools.jsTool implementations and response shaping
src/tradingview.jsEndpoint construction, caching, normalisation
src/http.jsHeaders, cookie jar, retry and backoff
src/throttle.jsThe rate-limit gate, circuit breaker and budget
src/db.jsSQLite corpus and full-text search
src/parse.jsPure parsers for the three response shapes

License

MIT. See LICENSE.

Pine Script collected with this tool remains the copyright of its original authors on TradingView. This project is not affiliated with or endorsed by TradingView. See NOTICE.md.


Keywords: TradingView MCP server, TradingView MCP, Model Context Protocol TradingView, Pine Script MCP server, TradingView indicators API, Pine Script scraper, TradingView strategy search, MCP server for trading, Claude TradingView integration, Cursor TradingView MCP, AI trading indicators, TradingView Pine Script source code, backtesting indicators with AI.

インストール

TypingMind
{
  "mcpServers": {
    "tradingview-indicator-search-mcp-server": {
      "command": "node",
      "args": [
        "src/server.js"
      ]
    }
  }
}

Tradingview Indicator Search MCP ServerのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Tradingview Indicator Search MCP Serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Tradingview Indicator Search MCP Serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Tradingview Indicator Search MCP ServerのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "tradingview-indicator-search-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "tradingview-indicator-search-mcp-server"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてTradingview Indicator Search MCP ServerのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Tradingview Indicator Search MCP ServerのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Tradingview Indicator Search MCP Serverを使ってこのタスクを手伝ってもらえますか?
Tradingview Indicator Search MCP Server
はい、読みました。
Tradingview Indicator Search MCP Serverで調べた結果をお伝えします。

よくある質問

Tradingview Indicator Search MCP Server MCPサーバーは何に使いますか?

Tradingview Indicator Search MCP Serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでTradingview Indicator Search MCP Server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでTradingview Indicator Search MCP Serverを利用できます。

TypingMindでTradingview Indicator Search MCP Server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Tradingview Indicator Search MCP Serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Tradingview Indicator Search MCP Server MCPをTypingMindに接続するにはどうすればよいですか?

Tradingview Indicator Search MCP ServerはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでTradingview Indicator Search MCP Server MCPのどのようなツールを利用できますか?

Tradingview Indicator Search MCP ServerはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Tradingview Indicator Search MCP Server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Tradingview Indicator Search MCP Serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇