tv-cdp-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TV_CDP_PORT | No | Port the CDP session connects to on 127.0.0.1 | 9222 |
| TV_EXPORT_DIR | No | Where tv_export_data writes files | <repo>/exports |
| TV_DENY_SYMBOLS | No | Comma-separated tickers the trading tools always refuse | |
| TV_MAX_RISK_USD | No | Paper-trading gate: max USD at risk per entry | 50 |
| TV_DEFAULT_EXCHANGE | No | Exchange prefix applied to bare tickers (ethusdt → BYBIT:ETHUSDT.P) | BYBIT |
| TV_MAX_OPEN_POSITIONS | No | Paper-trading gate: max simultaneous open positions | 2 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| tv_list_alertsA | List the account's TradingView alerts with their machine-readable firing condition. Read-only. Returns at most 200 projected rows in the same order as the TradingView alert panel (newest first), each with panel_pos = its 1-based row on the full unfiltered list, plus id, symbol, resolution, name, description (the string the UI shows), type, complexity, active, expiration, conditionType, condition, hasWebhook, webhookUrl, message. Refer to an alert by name + symbol, never by position alone. In list mode the description is capped at 400 chars, message at 200, and study |
| tv_get_alertA | Read one alert in full: the complete description, the untruncated firing condition (including every study input), the projected alert model, and the raw snake_case REST payload from listAlerts() for that id. Read-only. |
| tv_set_alert_conditionA | MUTATES a live alert: shallow-merge |
| tv_pause_alertsA | MUTATES: stop (pause) the given alerts via AlertsCollection.stopAlerts - they stay defined but stop firing. Returns per-id { previous_active, current_active } read back from the server, so tv_resume_alerts reverses it. Verified live 2026-09-04 on a price alert. |
| tv_resume_alertsA | MUTATES: restart (resume) the given alerts via AlertsCollection.restartAlerts - they begin firing again, webhooks included. Returns per-id { previous_active, current_active } read back from the server, so tv_pause_alerts reverses it. Verified live 2026-09-04 on a price alert. |
| tv_create_alertA | MUTATES: create a new alert by CLONING an existing one ( |
| tv_delete_alertsA | MUTATES: PERMANENTLY delete the given alerts (REST /delete_alerts via the alerts REST handler; there is no undo - a deleted alert can only be re-created by cloning another one). Requires confirm=true. Every id is resolved to name + symbol BEFORE anything is deleted (unknown ids abort the whole call), and the result echoes { id, name, symbol, resolution, active } per deleted alert plus confirmed_gone read back from the server list (the delete can lag seconds; still_present lists ids that were still there after ~5 s). VERIFIED LIVE 2026-09-05: a paused clone (id 7700000006) deleted, confirmed gone in ~1 s. |
| tv_list_layoutsA | List every open TradingView chart tab (index, layout id, title, url) and which one is actually painting (active). Read-only; the paint probe runs one requestAnimationFrame per tab. |
| tv_get_chart_stateA | Read the active chart: symbol, extended symbol info, resolution, chart type, study count, saved layout name and layout id. Read-only. |
| tv_set_symbolA | MUTATES the chart: change the active chart symbol (e.g. "BYBIT:ETHUSDT.P"). Returns { previous, current } so the change can be reverted. TradingView does not validate the symbol up front - check symbol_resolved in the result. |
| tv_set_resolutionB | MUTATES the chart: change the active chart timeframe/resolution ("1", "5", "60", "1D", "1W"). Returns { previous, current } so the change can be reverted. |
| tv_screenshotA | Capture a PNG screenshot of the chart tab and return it as an image. Read-only. Set clip_to_chart to crop to the chart container. |
| tv_get_barsA | Read OHLCV bars of the active chart straight from the loaded series (newest last). Read-only. Returns at most 500 bars; TradingView only holds what has been scrolled into memory, so |
| tv_get_study_valuesA | Read the plotted values of one study for the most recent bars (newest last). Read-only. Accepts a study id or a case-insensitive part of its name. Each row is keyed by plot title (e.g. "Buy", "Sell", "Plot (plot_8)"); colour/fill plots are dropped unless include_decoration=true. Built-in studies such as Volume have no series and return the formatted data-window strings instead. |
| tv_export_dataA | Read-only: export the active chart as one table - OHLCV bars plus the plotted values of every study (or the studies you name) joined on bar time - to a CSV (default) or JSON file under the export directory, or inline with write=false. TradingView Desktop refuses its own "Export chart data", so this composes the export from the loaded series: at most 500 bars and only what the chart has scrolled into memory. Studies without a data series (built-in Volume etc.) are listed under |
| tv_list_saved_layoutsA | List the saved chart layouts of the logged-in TradingView account (id, layout id, name, symbol, resolution, modified). Read-only; from TradingViewApi.getSavedCharts(). Optional name filter (case-insensitive substring). |
| tv_open_chart_urlA | Open a TradingView chart URL (or bare layout id) in the bound chart tab - own layouts and other users' shared / View Only charts alike. Full page reload, ~20 s; waits until the chart is ready and reports the layout it landed on, its owner and whether it is read-only. Refuses while the current layout has unsaved changes unless discard_changes=true. |
| tv_copy_layoutA | TradingView "Make a copy": clone the layout shown in the bound tab (optionally opening source_url first, e.g. someone else's View Only chart) into a new saved layout with the given name. Settles when the copy appears in the saved-layout list (45-60 s: server clone + page reload); reports which tab shows it (TV Desktop opens a copy of another user's chart in a NEW tab). Refuses an empty name or a name that already exists among the saved layouts unless allow_duplicate_name=true. |
| tv_rename_layoutA | Rename the layout shown in the bound tab (TradingView "Rename"). Refuses a read-only / View Only chart. Returns the previous and new name. |
| tv_delete_layoutA | Delete ONE saved layout from the TradingView account by layout id, numeric id or exact name. Irreversible: requires confirm=true, refuses anything listed in protect (ids or names), and refuses the layout currently shown in the bound tab unless force=true. Verifies by re-listing. |
| tv_list_studiesA | List the indicators/strategies on the active TradingView chart with their study ids. Read-only. |
| tv_get_study_inputsA | Read one study's inputs with their human names, types, options and ranges. Accepts a study id or a case-insensitive name substring. Read-only. |
| tv_set_study_inputsA | MUTATES the chart: set one or more inputs on a study by id, then re-read them. Values are coerced to the input's declared type and validated against its options/min/max. Returns the previous value for every change so it can be undone. |
| tv_study_templateA | Indicator (study) templates of the TradingView account, one tool switched on |
| tv_trading_statusA | Read the broker connected inside TradingView: broker id/title, account id/type, connection, open positions, working orders, capability flags and the gate this server enforces. Pass symbol to also check tradability, qty step/min and the chart price. Read-only. |
| tv_place_orderA | MUTATES the connected TradingView broker: place an order with a mandatory stop loss and optional take profit through the in-page broker adapter. PAPER ONLY - refuses unless the broker is TradingView Paper Trading on a demo account. Gate (configurable): risk <= 50 USD, max 2 open positions, one position per symbol, denied symbols refused. qty is sized from risk_usd / stop distance unless qty is given. Market orders size off the chart price of the active layout (set the chart to the symbol) or entry_price. dry_run=true returns the exact pre-order and sends nothing; use it first. |
| tv_close_positionA | MUTATES the connected TradingView broker: close an open position by symbol or position id (market close via the broker adapter). PAPER ONLY. Returns the position that was closed and the remaining open positions. |
| tv_cancel_orderA | MUTATES the connected TradingView broker: cancel one working order by id (entry orders; bracket orders belong to their position). PAPER ONLY. Returns the cancelled order and the remaining working orders. |
| tv_set_position_bracketsA | MUTATES the connected TradingView broker: move the stop loss and/or take profit of an OPEN position via the broker adapter (editPositionBrackets). PAPER ONLY - refuses unless the broker is TradingView Paper Trading on a demo account. Give symbol or position_id and at least one of stop_loss / take_profit; the value you leave out keeps its current level (both are always sent). Sanity gate against the position side and price: long needs stop_loss < price < take_profit, short the reverse - no override. Returns previous and applied levels plus the position before/after, read back until the broker shows the new values. dry_run=true returns the plan and sends nothing; use it first. Verified live against a paper position: stop moved and restored, ~450 ms each. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 29 tools
Every tool targets a distinct resource and action—alerts, layouts, chart state, studies, and trading each have clear boundaries. Even similar-sounding tools like tv_list_alerts vs tv_get_alert or tv_list_layouts vs tv_list_saved_layouts are unambiguously separated by read scope and detail.
The dominant pattern is tv_verb_noun in snake_case (list_alerts, set_symbol, delete_layout), which is consistent and predictable. Minor deviations include tv_screenshot, tv_study_template (noun with action parameter), and tv_trading_status, but these do not undermine the overall pattern.
29 tools is on the higher end for an MCP server, but the server covers five distinct domains (alerts, layouts, chart, studies, trading), and each tool has a distinct role. The count feels justified rather than bloated, though it is close to the upper bound of what is appropriate.
The surface is nearly complete for the stated scope: full CRUD for alerts and layouts, chart inspection and mutation, study input management, template lifecycle, and paper trading operations. Minor gaps exist—such as no way to remove a single study from a chart or modify an existing order's price/size—but agents can work around them.