by daviddme
TradingView MCP server: search indicators and strategies, fetch Pine Script source. Works with Claude Code, Claude Desktop and Cursor. No API key needed.
# Add to your Claude Code skills
git clone https://github.com/daviddme/tradingview-indicator-search-mcp-serverGuides for using ai agents skills like tradingview-indicator-search-mcp-server.
tradingview-indicator-search-mcp-server is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by daviddme. TradingView MCP server: search indicators and strategies, fetch Pine Script source. Works with Claude Code, Claude Desktop and Cursor. No API key needed. It has 146 GitHub stars.
tradingview-indicator-search-mcp-server's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/daviddme/tradingview-indicator-search-mcp-server" and add it to your Claude Code skills directory (see the Installation section above).
tradingview-indicator-search-mcp-server is primarily written in JavaScript. It is open-source under daviddme on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh tradingview-indicator-search-mcp-server against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
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.
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:
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.
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.
claude mcp add tradingview -s user -- node "$(pwd)/src/server.js"
-s user makes it available in every project. Verify with:
claude mcp list
Edit claude_desktop_config.json:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.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 shellPATH, so a bare"node"fails withspawn node ENOENT. Find yours withwhich node.
Restart Claude Desktop.
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.
| Tool | What it does |
|---|---|
search_scripts |
Search by topic: "trend following", "scalping", "order blocks". Omit the query for the top/trending feed |
list_editors_picks |
TradingView's hand-curated editors' picks, the highest quality per result |
list_author_scripts |
Every public script by one author |
get_script_source |
Full Pine Script source, by script ID or a pasted TradingView chart URL |
harvest_scripts |
Bulk-collect scripts and their source into the local corpus. Resumable |
query_corpus |
Search the local corpus offline, including full-text search inside Pine code |
fetch_status |
Rate-limit health and corpus size. Makes no network request |
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.exitwith 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;..."
Worth knowing, because it explains the tool design. TradingView exposes two search surfaces and they are not equally good:
| Surface | Quality |
|---|---|
Slug routes — /scripts/trend-following/ |
Curated and genuinely on-topic |
JSON API — /api/v1/scripts/?q=trend+following |
Poor 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 | allscript_access — open | allsort — latest_popular | recent_extendedEvery 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.
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.
sec-ch-ua are chosen once
per process and held constant, because real browsers do not change UA mid-sessionRetry-AfterRun 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.
All optional, all environment variables.
| Variable | Default | Meaning |
|---|---|---|
IF_DB_PATH |
data/indicator_fetch.db |
Corpus location |
IF_MIN_DELAY_MS / IF_MAX_DELAY_MS |
1500 / 4500 | Delay window between requests |
IF_BREAK_EVERY |
25 | Requests between long breaks |
IF_BREAK_MIN_MS / IF_BREAK_MAX_MS |
20000 / 60000 | Long break window |
IF_DAILY_BUDGET |
2000 | Hard daily request cap |
IF_BREAKER_THRESHOLD |
3 | Consecutive blocks before the breaker trips |
IF_BREAKER_COOLDOWN_MS |
900000 | How long the breaker stays open |
IF_LISTING_TTL_MS |
21600000 | Listing cache lifetime. Source never expires |
IF_HARVEST_MAX |
200 | Hard cap on scripts per harvest |
IF_SNIPPET_CHARS |
300 | Description 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.
No. Every endpoint this uses is public and unauthenticated. There is no login, no API key and no cookie to configure.
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.
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.
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 rep