TradingView MCP Server
tradingview-mcp
一个用于加密货币图表分析工作流的 MCP 服务器,该工作流在 config/rules.json 中描述:它拉取 K 线数据,计算你关心的指标,并根据你的倾向和风险规则对其进行评估。
设计说明:为何此工具不连接 TradingView
此工具所基于的初始设置指南通过 Chrome DevTools 协议(--remote-debugging-port=9222)驱动 TradingView 桌面应用。这种方法让服务器完全控制你已登录的浏览器会话——它可以读取你的账户,而不仅仅是你的图表。
rules.json 中没有任何内容需要它。币安现货交易对、1W/1D/4H K 线、RSI、MACD、EMA 和成交量都可以从公共端点获取,无需任何身份验证。因此,此服务器读取公共市场数据,不持有任何凭证,并且从不接触已登录的会话。
CDP 方法能带来的唯一好处是此工具无法获取的数据:你保存的布局和绘图、付费指标以及你订阅的交易所数据流。如果你需要这些,那就是需要慎重权衡的取舍。
Related MCP server: Tickory MCP Server
安装
npm install
npm test # 46 unit + integration tests, no network required
npm run smoke # live end-to-end check against the real API通过将 config/mcp-entry.json 合并到 ~/.claude.json 中,并将 <HOME> 替换为你的主目录,将其注册到 Claude Code:
{
"mcpServers": {
"tradingview": { "command": "node", "args": ["<HOME>/tradingview-mcp/src/server.js"] }
}
}如果 mcpServers 已存在,请将 tradingview 键添加到其中,而不是替换整个对象。
使用 TRADINGVIEW_MCP_RULES=/path/to/rules.json 将服务器指向不同的规则文件。
工具
工具 | 功能 |
| 检查配置 + 数据源可达性。报告 |
| 获取已加载的 |
| 获取最新成交价格。 |
| 获取原始 OHLCV 数据,按时间升序排列。 |
| 获取 RSI、MACD、趋势 EMA、200 EMA、成交量、市场结构。 |
| 获取一个交易对/时间周期的倾向,并显示所有条件。 |
| 获取整个观察列表和所有时间周期的倾向。 |
| 获取当前的 CRYPTOCAP TOTAL / TOTAL3 / BTC.D 数据。 |
| 根据你的风险规则计算仓位大小和 R:R。 |
倾向如何判定
rules.json 中的 bias_criteria 是描述性文本——对人类和模型有用,但机器无法解析。实际驱动 get_bias 的数值阈值位于 bias_engine 中,因此两者被刻意保持同步。
一个交易对被视为看涨仅当以下三个条件同时成立:价格高于趋势 EMA、日线 RSI 在看涨区间内、市场结构呈现更高的高点和更高的低点。看跌则相反。其他情况均为中性。
get_bias 始终返回各个条件的结果以及标签,因此你可以看到原因——如果某个输入不可用(例如,一个没有 200 根 K 线历史的交易对上的 200 EMA),它会返回 unknown 并附上原因,而不是返回一个它无法支持的数字。
有两个值得了解的刻意设计后果:
RSI 高于 70 不被视为看涨。 你的区间上限是 70,因此垂直拉升会被解读为中性,而不是做多信号。
RSI 门控始终来自日线,即使在判断 4H 时也是如此,因为
rules.json指定了 RSI 条件“在日线上”。
EMA 周期
你最初的规则存在矛盾:所有三个 bias_criteria 都引用了 500 EMA,而 indicators_i_care_about 只列出了 50 和 200。我将 bias_engine.trend_ema_period 设置为 50,以匹配你的指标列表——周线上的 500 EMA 大约需要十年的 K 线数据,而大多数这些交易对都没有这么长的历史。
如果你本意是 500,只需在 config/rules.json 中修改一行代码,并且 unknown 路径会诚实地返回“历史数据不足”,而不是给出一个静默错误的答案。
数据源及其限制
现货交易对使用币安公共 REST API;CRYPTOCAP 聚合数据使用 CoinGecko /global。
CRYPTOCAP 条目仅为当前值——免费的市场市值历史数据不可用,因此 get_indicators 和 get_bias 会拒绝它们,而不是凭空生成一个序列。scan_watchlist 会跳过它们,并将其列在 skipped_macro 下。TOTAL3 由 TOTAL x (1 - BTC.D - ETH.D) 推导得出。
币安在某些地区存在地理封锁。如果 tv_health_check 报告在你预期可用的网络上无法访问,这是首先需要检查的事项。
测试
npm test 完全离线运行:指标数学计算已根据 Wilder 发布的 RSI 参考值进行验证,MCP 层由真实的客户端通过内存传输驱动,并使用了模拟的数据源。
npm run smoke 是需要真实网络的部分——它像客户端一样通过 stdio 启动服务器,并调用实时 API。
非财务建议
此工具仅报告你自身的规则对公共数据的解读。它不会为你做出任何决定,并且 rules.json 中的 no_trades_during 窗口仅作为提醒呈现,而非强制执行——此工具不会检查任何经济日历。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceEnables automated cryptocurrency trading on Binance and provides integration for monitoring Base network operations. It allows users to execute trades, fetch market data, and calculate technical indicators like RSI and MACD through the Model Context Protocol.

Tickory MCP Serverofficial
AlicenseAqualityFmaintenanceScheduled scans across all Binance spot and perpetual pairs using CEL rules (RSI, volume, MAs, price action). Runs server-side 24/7, fires webhooks on match, with delivery proof and alert explainability.1845MIT- AlicenseAqualityAmaintenanceBacktest PineScript v6 strategies locally from your AI agent: transpiles Pine to C++ and runs it on the deterministic, TradingView-validated PineForge engine via Docker. Tools for single backtests, parameter-grid sweeps, and Binance OHLCV fetch — no API key, data never leaves your machine.11485MIT
- Alicense-qualityBmaintenanceProvides real-time cryptocurrency trading signals and technical analysis via Binance, supporting multiple timeframes and indicators.293MIT
Related MCP Connectors
Crypto backtesting & Bitcoin cycle analytics. Point-in-time, DSR-corrected, look-ahead-aware.
Real-time market data, screeners, technical analysis & backtesting for stocks, crypto and forex.
US stocks, ETFs, crypto → compact brief: patterns, S/R, regime + base rates vs baseline. Not advice.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Bearspeed77/Claude-Tradingview'
If you have feedback or need assistance with the MCP directory API, please join our Discord server