TradingView Alerts MCP Server
Manages TradingView alerts programmatically, allowing creation, listing, pausing, resuming, and deletion of strategy alerts, with optional webhook support and inspection of firing history.
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 Alerts MCP Server Create a webhook alert from my RSI strategy on ETHUSDT 15m"
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 Alerts MCP Server
Create, list, pause, resume and delete TradingView alerts from Claude, Claude Desktop or Cursor.
An MCP (Model Context Protocol) server for managing TradingView alerts programmatically. Attach a Pine strategy to any symbol and timeframe, wire it to a webhook for your trading bot, and pause or resume the whole set by asking in plain language.
"Pause every BTC alert."
"Create an alert from my RSI strategy on BYBIT:ETHUSDT.P 15m, webhook to my bot."
"Which of my alerts are paused, and why did they stop?"
This server authenticates with your live TradingView session cookies, which grant
full access to your account. Never commit auth.json, never paste your cookies into a
shared config, and never publish them. auth.json and .env are gitignored here.
delete_alerts is permanent and cannot be undone.
Contents
Related MCP server: TradingView MCP Bridge
What this does
TradingView has no public API for alerts. Everything has to go through the web UI, which makes managing more than a handful of strategy alerts tedious and impossible to automate.
This server exposes the full alert lifecycle as MCP tools:
Create an alert from any Pine strategy saved on your account, on any symbol and timeframe, with an optional webhook URL
List every alert with its status, symbol, timeframe and webhook
Pause and resume alerts individually or in bulk, by symbol or by name
Delete alerts permanently
Inspect firing history and the reason an alert stopped on its own
Creating a strategy alert correctly is the hard part, and it is handled for you: the
symbol and its currency-id are resolved from TradingView's own search, and the
strategy's default input values are read from its compiled metadata, so the alert
actually fires.
Quick start
git clone https://github.com/daviddme/tradingview-alerts-mcp-server.git
cd tradingview-alerts-mcp-server
npm installRequires Node.js 20 or newer. Then add your credentials and register it with a client below.
Getting your session cookies
TradingView has no alert API key. Authentication is a logged-in browser session, so the server replays four cookies.
Log in to tradingview.com in your browser
Open DevTools (
F12orCmd+Option+I)Go to Application → Storage → Cookies →
https://www.tradingview.comCopy the values of these four cookies:
Cookie | What it is |
| Your session token |
| Signature for the session token |
| Device token |
| Client id |
You also need your TradingView username exactly as it appears on your profile.
Supply them either as environment variables in your MCP client config (recommended), or
by copying auth.example.json to auth.json and filling it in.
Cookies expire, and logging in on another device can invalidate them. When that happens
every tool returns a clear "session rejected" error telling you to refresh them. Run
check_auth to test at any time.
Install in Claude Code
claude mcp add tradingview-alerts -s user \
-e TV_USERNAME=YourUsername \
-e TV_SESSIONID=... \
-e TV_SESSIONID_SIGN=... \
-e TV_DEVICE_T=... \
-e TV_ECUID=... \
-- node "$(pwd)/src/server.js"Install in Claude Desktop
Edit claude_desktop_config.json:
macOS —
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows —
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"tradingview-alerts": {
"command": "/absolute/path/to/node",
"args": ["/absolute/path/to/tradingview-alerts-mcp-server/src/server.js"],
"env": {
"TV_USERNAME": "YourUsername",
"TV_SESSIONID": "your-sessionid-cookie",
"TV_SESSIONID_SIGN": "your-sessionid_sign-cookie",
"TV_DEVICE_T": "your-device_t-cookie",
"TV_ECUID": "your-tv_ecuid-cookie"
}
}
}
}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.
Install in Cursor
Same block as above in ~/.cursor/mcp.json, then restart Cursor.
Tools
Tool | What it does |
| Every alert with status, symbol, timeframe and |
| New alert from a saved Pine strategy, with optional webhook |
| Stop alerts firing, keeping them on the account |
| Reactivate paused alerts |
| Permanently delete alerts |
| Your saved Pine scripts, flagging which are strategies |
| Firing history |
| Resolve |
| Verify the session works and report alert counts |
pause_alerts, resume_alerts and delete_alerts all target alerts the same way:
explicit alert_ids, or a symbol / name / status filter. They refuse to run with
no target at all rather than acting on everything, and error if a filter matches nothing
rather than silently doing nothing.
Example prompts
"List my TradingView alerts and tell me which are paused."
"Create an alert from my 'RSI Breakout' strategy on BYBIT:BTCUSDT.P at 60m, and send it to https://my-bot.example.com/webhook"
"Pause everything on RUNEUSDT, I'm done trading it for today."
"Resume all my paused alerts."
"Delete every alert with 'test' in the name."
"My ETH alert stopped firing. What happened?" (reads
last_stop_reason)
The TradingView alerts API
Undocumented and private. The endpoint names below were confirmed empirically: the API
answers unauthorized for endpoints that exist and no_such_endpoint for ones that do
not, which cleanly separates real endpoints from guesses.
All live on https://pricealerts.tradingview.com:
Endpoint | Purpose |
| List all alerts |
| Create |
| Pause (takes |
| Resume (takes |
| Delete (takes |
| Firing history |
Endpoints that do not exist, despite being plausible: modify_alert, edit_alert,
pause_alerts, resume_alerts, deactivate_alerts, and every singular variant such as
stop_alert.
Creating a strategy alert is a four-step chain:
symbol-search/v3resolves the symbol and itscurrency-idpine-facade/list?filter=savedfinds the script'spine_idand versionpine-facade/translate/<id>/<version>returns the compiled metadata containing the script's default input valuescreate_alertposts atype: "strategy"condition wrappingStrategyScript@tv-scripting-101
Gotchas worth knowing
Each of these cost real debugging time and is handled by this server.
There is no modify endpoint. Editing an alert means deleting it and creating a
replacement. The alert gets a new alert_id.
Activation is asynchronous. create_alert returns active: false, and TradingView
flips the alert to active a second or two later. The same applies to stop_alerts and
restart_alerts. Reading the response directly tells you the wrong thing, so every
state-changing tool here polls until the state settles and reports confirmed.
Strategy inputs are not positional in the way they look. The alert payload wants an
in_0, in_1, … map, and metaInfo.inputs is an array, so it is tempting to walk that
array by index. That is wrong: the array starts with four hidden internal entries
(text, pineId, pineVersion, pineFeatures), so index 0 is the compiled script
blob, not in_0. Use metaInfo.defaults.inputs, which is already keyed correctly.
An alert built the wrong way is accepted by the API and then never fires, with no
error anywhere.
The useful metadata is nested at result.metaInfo, not metaInfo.
symbol is a JSON document inside a string, prefixed with =. This server parses it
so you get a plain "BYBIT:BTCUSDT.P" back.
user_id is not required by list_alerts, despite the web app always sending it.
The session cookie identifies the account.
last_stop_reason explains self-stopping alerts, with values like
pro_plan_expired or auto. Worth checking when an alert goes quiet.
FAQ
Do I need a paid TradingView plan?
To use strategy alerts, yes. TradingView limits how many alerts each plan allows, and
strategy alerts need a paid tier. This server surfaces last_stop_reason: "pro_plan_expired" when a plan lapse is what stopped an alert.
Is this an official TradingView API?
No. TradingView publishes no alerts API. This drives the same private endpoints the web app uses, which means they can change without notice. Not affiliated with TradingView.
Will this get my account banned?
It makes the same requests the TradingView web app makes, as your own logged-in user, at a far lower rate than clicking through the UI. That said, you are using a private API, which is your own decision and risk. See NOTICE.md.
Can it create simple price alerts, not just strategy alerts?
Not yet. This server covers Pine strategy alerts, which is the automation-heavy case. Price alerts use a different condition shape. Contributions welcome.
Why does my new alert say it is not active?
Activation is asynchronous. The tool polls for a couple of seconds and reports
activation: "confirmed active" when it settles. If it reports otherwise, run
list_alerts again or call resume_alerts to force it.
My alert was created but never fires. Why?
Almost always wrong strategy inputs. This server reads inputs from the script's own
compiled defaults to avoid exactly that, and reports inputs_applied so you can check
the count looks right. Zero applied inputs means something went wrong.
How do I change an alert's settings?
Delete it and create a new one. TradingView has no modify endpoint.
Where are my credentials stored?
Wherever you put them: environment variables in your MCP client config, or a local
auth.json that is gitignored. This server never transmits them anywhere except
TradingView.
Development
npm test58 tests, fully offline. The alerts API is stubbed in-memory, so the suite never touches a real account.
npm run smoke -- --strategy "Your Strategy Name" --symbol BYBIT:BTCUSDT.PLive end-to-end test against your real account. It creates one alert, verifies it,
pauses it, resumes it, then deletes it, checking state at every step. It only ever
touches the alert it created, verifies your existing alerts are untouched, and cleans up
in a finally block even if a step fails.
Project layout
File | Responsibility |
| MCP wiring and tool definitions |
| Tool implementations, targeting and state confirmation |
| The six lifecycle operations and payload construction |
| Saved script lookup and strategy input extraction |
| Symbol and currency-id resolution |
| Normalising raw alert objects |
| Request handling and error mapping |
| Credential loading |
License
MIT. See LICENSE and NOTICE.md.
Keywords: TradingView alerts MCP server, TradingView MCP, TradingView alert API, Model Context Protocol TradingView, Pine Script alerts automation, TradingView webhook automation, create TradingView alerts programmatically, pause resume TradingView alerts, Claude TradingView alerts, Cursor TradingView MCP, trading bot webhook alerts.
Available Tools
9 toolscheck_authA
Verify the TradingView session is valid and report the account and alert counts. Run this first if anything returns an authorization error.
Inputs: no named parameters.
create_strategy_alertA
Create a new TradingView alert from one of your saved Pine strategies. Resolves the symbol and its currency-id automatically, and reads the strategy's own default input values so the alert actually fires. Optionally set a webhook URL to forward signals to your own trading bot or endpoint.
Inputs: symbol (required), strategy (required), email, popup, +6 more.
delete_alertsA
Permanently delete TradingView alerts. This cannot be undone. TradingView has no edit endpoint, so changing an alert means deleting it and creating a replacement. To stop an alert temporarily, use pause_alerts instead.
Inputs: name, status, symbol, alert_ids.
list_alert_firesA
Show the firing history for your alerts: what triggered, and when.
Inputs: limit.
list_alertsA
List TradingView alerts on the authenticated account, with their status (active or paused), symbol, timeframe and alert_id. Start here: every other tool targets alerts by the alert_id this returns. Supports filtering by symbol, name or status.
Inputs: name, status, symbol, include_details.
list_saved_strategiesA
List the Pine scripts saved on your TradingView account, flagging which are strategies. Only strategies can drive a strategy alert. Use this to find the exact name to pass to create_strategy_alert.
Inputs: strategies_only.
pause_alertsA
Pause (stop) one or more TradingView alerts. Paused alerts stay on your account but stop firing, and can be reactivated with resume_alerts. Target by alert_ids, or by symbol / name / status filter.
Inputs: name, status, symbol, alert_ids.
resolve_symbolA
Resolve an EXCHANGE:TICKER into TradingView's canonical symbol plus its currency-id, which alerts require. Useful for checking a symbol exists before creating an alert.
Inputs: symbol (required).
resume_alertsA
Resume (restart) previously paused TradingView alerts so they fire again. Target by alert_ids, or by symbol / name / status filter.
Inputs: name, status, symbol, alert_ids.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct action (auth check, list, create, pause, resume, delete, list strategies, list fires, resolve symbol). Overlapping actions like pause/resume/delete are clearly differentiated by their verb and description.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., list_alerts, create_strategy_alert, pause_alerts). Verbs are active and distinct, making the naming predictable.
9 tools is well-scoped for an alerts management server, covering authentication, alert CRUD, strategy discovery, and symbol resolution without unnecessary bloat.
The core alert lifecycle (create, list, pause, resume, delete) is covered, along with supporting tools for strategies and symbol resolution. However, the creation tool is limited to strategy-based alerts, leaving no way to create a simple price alert, which is a minor gap.
Related MCP Connectors
Create and manage trading strategies, bots, webhooks and signals from any MCP client.
> TradingMCP puts a market analyst inside your AI assistant. Paste one URL into Claude, ChatGPT, Cursor, VS Code or any MCP client and ask in plain language: screen for breakouts, run a multi-timeframe analysis, backtest a strategy with walk-forward validation, scan for smart-money and volume signals, or get a one-prompt morning market brief. In clients that support MCP Apps, price charts and the Markets panel are drawn right in the chat. > 40+ tools covering crypto (real-time), stocks, ETFs, FX, futures and commodities across major global exchanges. > Hosted, nothing to install: Pro $9/month (2,500 tool calls) or Pro+ $29/month (10,000). Paid upfront with a 14-day money-back guarantee; your API key arrives right after checkout. > Built on the open-source tradingview-mcp core (MIT, ~5k GitHub stars): self-host it free, or use the hosted version with zero ops. > For research and education, not financial advice. Not affiliated with TradingView
Send trade alerts from Claude, Cursor or any MCP client to Nyria Paper or your broker.
Read and trade MetaTrader 5 accounts hosted by Pipsocket, and set up TradingView alert hooks.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceControls the TradingView Desktop app via MCP, allowing AI agents to manage charts, indicators, Pine Script strategies, and optionally mirrors signals to MetaTrader 5 for automated trading.1MIT
- FlicenseNot gradedqualityCmaintenanceBridges MCP-capable AI assistants to a locally running TradingView Desktop app via Chrome DevTools Protocol, enabling chart analysis, Pine Script development, drawing tools, alerts, and workflow automation through natural language.-
- FlicenseNot gradedqualityDmaintenanceEnables automated control of TradingView Desktop via MCP, supporting morning briefs, chart analysis, Pine Script development, replay practice, and alert management.-
- FlicenseNot gradedqualityCmaintenanceProvides unified TradingView capabilities through one MCP server, including market data, screening, technical analysis, backtesting, sentiment, chart control via browser automation, Pine script transpilation and compilation, and alert webhooks.-