
TradingView MCP 向 AI 助手和 TradingView MCP 自动化工具展示 TradingView 市场数据、多交易所扫描器和 AI 回测引擎
概览
一个面向生产环境的模型上下文协议服务器,向AI助手和自动化工具展示TradingView市场数据、多交易所筛选器、技术分析、市场情绪、新闻以及内置回测引擎。 独立开源项目——与TradingView Inc.无关。内容仅供研究和教育用途,不构成财务建议。 1. (src/server.ts) — 验证输入,委派服务,返回 JSON 负载。2. — 域逻辑,无 MCP 依赖;可独立测试。3. — 具有重试、抖动、限速和缓存集成的 HTTP 客户端。4. — 可选的 Resis 支持缓存,并可优雅地退回内存存储。 - — 严格、noUnusedLocals、noUncheckedIndexedAccess 启用。- MCP 层不包含任何业务逻辑。- — Redis 是可选的;服务器运行时无需 Redis 逻辑。- — 用于程序处理的稳定 ErrorCode 字符串。 - 节点。
概述(AI 翻译)
一个面向生产环境的模型上下文协议服务器,向AI助手和自动化工具展示TradingView市场数据、多交易所筛选器、技术分析、市场情绪、新闻以及内置回测引擎。
免责声明: 独立开源项目——与TradingView Inc.无关。内容仅供研究和教育用途,不构成财务建议。
目录
- 特色亮点
- 建筑学
- 工作流程
- 项目结构
- 安装
- 配置
- 发展
- 测试
- 故障排除
- 贡献
- 常见问题解答
特色亮点
| 能力 | 详情 |
|---|---|
| 多交易所筛选器加密货币、美国股票、EGX、BIST、HKEX、SSE、TWSE等,通过静态符号列表+TradingView扫描API | |
| 技术分析布林尔指数、RSI、多时间框架对齐、成交量突破、蜡烛形态 | |
| 回测9个策略,使用Sharpe、Calmar,前进过拟合检测 | |
| 市场情报Reddit情绪,RSS财经新闻,雅虎财经报价 | |
| 韧性 | 重试/退回,内存内 + 可选分布式缓存,结构化错误包络 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
TradingView MCP Server
A production-oriented Model Context Protocol server that exposes TradingView market data, multi-exchange screeners, technical analysis, sentiment, news, and a built-in backtesting engine to AI assistants and automation tools.
Disclaimer: Independent open-source project — not affiliated with TradingView Inc. Outputs are for research and education only, not financial advice.
Table of Contents
- Feature Highlights
- Architecture
- Workflows
- Project Structure
- Installation
- Configuration
- Development
- Testing
- Troubleshooting
- Contributing
- FAQ
Feature Highlights
| Capability | Details |
|---|---|
| Multi-exchange screeners | Crypto, US equities, EGX, BIST, HKEX, SSE, TWSE, and more via static symbol lists + TradingView scanner API |
| Technical analysis | Bollinger ratings, RSI, multi-timeframe alignment, volume breakouts, candle patterns |
| Backtesting | 9 strategies with Sharpe, Calmar, walk-forward overfitting detection |
| Market intelligence | Reddit sentiment, RSS financial news, Yahoo Finance quotes |
| Resilience | Retry/backoff, in-memory + optional distributed cache, structured error envelopes |
| MCP-native | 36 tools, stdio transport, works with Claude Desktop, Cursor, Copilot, and other MCP clients |
Architecture
flowchart TB
subgraph clients [MCP Clients]
Claude[Claude Desktop]
Cursor[Cursor IDE]
Other[Other MCP Hosts]
end
subgraph server [tradingview-mcp-server]
Router[MCP Tool Router]
Config[Zod Config Loader]
Logger[Structured Logger]
subgraph services [Service Layer]
Screener[Screener Service]
Scanner[Volume Scanner]
Backtest[Backtest Engine]
Yahoo[Yahoo Finance]
Sentiment[Reddit Sentiment]
News[RSS News]
EGX[EGX Tools]
Futures[Futures Tools]
end
subgraph persistence [Persistence]
Memory[In-Memory Cache]
Redis[(Redis Cache)]
end
Provider[Screener Provider\nretry + throttle]
end
subgraph external [External APIs]
TV[scanner.tradingview.com]
YF[Yahoo Finance Chart API]
Reddit[Reddit JSON API]
RSS[Financial RSS Feeds]
end
Claude --> Router
Cursor --> Router
Other --> Router
Router --> services
Config --> services
Logger --> services
Screener --> Provider
Scanner --> Provider
Provider --> Memory
Provider --> Redis
Provider --> TV
Yahoo --> YF
Sentiment --> Reddit
News --> RSS
Backtest --> YF
Layer responsibilities
- MCP router (
src/server.ts) — validates inputs, delegates to services, returns JSON payloads. - Services — domain logic with no MCP dependencies; independently testable.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"tradingview": {
"command": "node",
"args": ["D:/path/to/tradingview-mcp/dist/index.js"]
}
}
}