tradingview-mcp 1.0.0__tar.gz → 1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. {tradingview_mcp-1.0.0 → tradingview_mcp-1.0}/LICENSE +0 -2
  2. tradingview_mcp-1.0/PKG-INFO +334 -0
  3. tradingview_mcp-1.0/README.md +298 -0
  4. {tradingview_mcp-1.0.0 → tradingview_mcp-1.0}/pyproject.toml +19 -3
  5. {tradingview_mcp-1.0.0 → tradingview_mcp-1.0}/src/tradingview_mcp/constants.py +6 -4
  6. tradingview_mcp-1.0/src/tradingview_mcp/data/__init__.py +9 -0
  7. tradingview_mcp-1.0/src/tradingview_mcp/data/column_display_names.json +827 -0
  8. tradingview_mcp-1.0/src/tradingview_mcp/data/extracted/__init__.py +1 -0
  9. tradingview_mcp-1.0/src/tradingview_mcp/data/extracted/ai_quick_reference.json +212 -0
  10. tradingview_mcp-1.0/src/tradingview_mcp/data/extracted/common_fields.json +3627 -0
  11. tradingview_mcp-1.0/src/tradingview_mcp/data/extracted/fields_by_market.json +23299 -0
  12. tradingview_mcp-1.0/src/tradingview_mcp/data/extracted/screener_code_examples.json +9 -0
  13. tradingview_mcp-1.0/src/tradingview_mcp/data/markets.json +83 -0
  14. tradingview_mcp-1.0/src/tradingview_mcp/data/metainfo/bond.json +17406 -0
  15. tradingview_mcp-1.0/src/tradingview_mcp/data/metainfo/bonds.json +1303 -0
  16. tradingview_mcp-1.0/src/tradingview_mcp/data/metainfo/cfd.json +21603 -0
  17. tradingview_mcp-1.0/src/tradingview_mcp/data/metainfo/coin.json +21111 -0
  18. tradingview_mcp-1.0/src/tradingview_mcp/data/metainfo/crypto.json +23078 -0
  19. tradingview_mcp-1.0/src/tradingview_mcp/data/metainfo/economics2.json +1026 -0
  20. tradingview_mcp-1.0/src/tradingview_mcp/data/metainfo/forex.json +21003 -0
  21. tradingview_mcp-1.0/src/tradingview_mcp/data/metainfo/futures.json +2972 -0
  22. tradingview_mcp-1.0/src/tradingview_mcp/data/metainfo/ireland.json +22517 -0
  23. tradingview_mcp-1.0/src/tradingview_mcp/data/metainfo/options.json +499 -0
  24. tradingview_mcp-1.0/src/tradingview_mcp/data/metainfo/stocks.json +29808 -0
  25. tradingview_mcp-1.0/src/tradingview_mcp/data/screeners/main_screeners.json +540 -0
  26. tradingview_mcp-1.0/src/tradingview_mcp/data/screeners/markets.json +70 -0
  27. tradingview_mcp-1.0/src/tradingview_mcp/data/screeners/stocks.json +416 -0
  28. tradingview_mcp-1.0/src/tradingview_mcp/data/screeners/stocks_failed.json +36081 -0
  29. tradingview_mcp-1.0/src/tradingview_mcp/docs_data.py +297 -0
  30. {tradingview_mcp-1.0.0 → tradingview_mcp-1.0}/src/tradingview_mcp/scanner.py +2 -1
  31. {tradingview_mcp-1.0.0 → tradingview_mcp-1.0}/src/tradingview_mcp/server.py +839 -51
  32. tradingview_mcp-1.0.0/PKG-INFO +0 -182
  33. tradingview_mcp-1.0.0/README.md +0 -153
  34. {tradingview_mcp-1.0.0 → tradingview_mcp-1.0}/.gitignore +0 -0
  35. {tradingview_mcp-1.0.0 → tradingview_mcp-1.0}/src/tradingview_mcp/__init__.py +0 -0
  36. {tradingview_mcp-1.0.0 → tradingview_mcp-1.0}/src/tradingview_mcp/column.py +0 -0
  37. {tradingview_mcp-1.0.0 → tradingview_mcp-1.0}/src/tradingview_mcp/models.py +0 -0
  38. {tradingview_mcp-1.0.0 → tradingview_mcp-1.0}/src/tradingview_mcp/query.py +0 -0
  39. {tradingview_mcp-1.0.0 → tradingview_mcp-1.0}/src/tradingview_mcp/utils.py +0 -0
@@ -1,7 +1,5 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Shneor Elmaleh
4
- Copyright (c) 2025 Ahmet Taner Atila
5
3
  Copyright (c) 2026 Henrik (k73a)
6
4
 
7
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -0,0 +1,334 @@
1
+ Metadata-Version: 2.4
2
+ Name: tradingview-mcp
3
+ Version: 1.0
4
+ Summary: A comprehensive MCP server for TradingView market screening with integrated screener functionality
5
+ Project-URL: Homepage, https://github.com/k73a/tradingview-mcp
6
+ Project-URL: Documentation, https://github.com/k73a/tradingview-mcp#readme
7
+ Project-URL: Repository, https://github.com/k73a/tradingview-mcp
8
+ Project-URL: Issues, https://github.com/k73a/tradingview-mcp/issues
9
+ Project-URL: Changelog, https://github.com/k73a/tradingview-mcp/blob/main/CHANGELOG.md
10
+ Author: TradingView MCP Team
11
+ License: MIT
12
+ License-File: LICENSE
13
+ Keywords: crypto,mcp,model-context-protocol,screener,stocks,technical-analysis,trading,tradingview
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Financial and Insurance Industry
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Office/Business :: Financial :: Investment
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.10
25
+ Requires-Dist: httpx>=0.24.0
26
+ Requires-Dist: mcp>=1.0.0
27
+ Requires-Dist: pandas>=2.0.0
28
+ Requires-Dist: requests>=2.28.0
29
+ Provides-Extra: dev
30
+ Requires-Dist: pyright>=1.1.0; extra == 'dev'
31
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
32
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
33
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
34
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
35
+ Description-Content-Type: text/markdown
36
+
37
+ # TradingView MCP Server
38
+
39
+ [![PyPI version](https://badge.fury.io/py/tradingview-mcp.svg)](https://badge.fury.io/py/tradingview-mcp)
40
+ [![Python](https://img.shields.io/pypi/pyversions/tradingview-mcp.svg)](https://pypi.org/project/tradingview-mcp/)
41
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
42
+ [![Tests](https://github.com/k73a/tradingview-mcp/workflows/Test/badge.svg)](https://github.com/k73a/tradingview-mcp/actions)
43
+
44
+ A comprehensive Model Context Protocol (MCP) server for TradingView market screening with fully integrated screener functionality. This server provides powerful tools for cryptocurrency and stock market analysis directly through the MCP interface.
45
+
46
+ ## Quick Start (No Installation Required)
47
+
48
+ Use `uvx` to run directly without installing:
49
+
50
+ ```json
51
+ {
52
+ "mcpServers": {
53
+ "tradingview": {
54
+ "command": "uvx",
55
+ "args": ["tradingview-mcp"]
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ ## 🤖 For AI Agents
62
+
63
+ **📖 Read [AI.md](AI.md) for the complete guide!** You can copy the entire AI.md file to understand all capabilities.
64
+
65
+ **Quick Start:**
66
+ 1. Call `get_help()` to understand how to use this MCP
67
+ 2. Call `ai_get_reference()` for markets, columns, and filter references
68
+
69
+ Key points:
70
+ - All results include `description` field with full names (e.g., "Apple Inc." not just "AAPL")
71
+ - Use `limit` parameter to control result count (default: 25)
72
+ - Use `search_symbols("apple", "america")` to search by company name
73
+
74
+ ```
75
+ # Quick examples:
76
+ get_top_gainers("america", 10) # Top 10 US stock gainers
77
+ search_symbols("tesla", "america") # Search for Tesla
78
+ get_symbol_info("NASDAQ:AAPL") # Apple Inc. details
79
+ ```
80
+
81
+ ## Features
82
+
83
+ ### Core Screener Functionality
84
+ - **Direct TradingView API Integration**: Query the TradingView scanner API without external dependencies
85
+ - **Multi-Market Support**: 76+ markets including crypto, stocks, forex, futures, and bonds
86
+ - **SQL-like Query Interface**: Build complex queries with filtering, sorting, and pagination
87
+ - **250+ Technical Indicators**: Access a comprehensive set of technical analysis columns
88
+ - **AI-Friendly Design**: Includes `description` (full name), token-saving limits, and help tools
89
+
90
+ ### MCP Tools
91
+
92
+ #### 🔍 Discovery & Help Tools (AI Start Here!)
93
+ - `get_help(topic)`: **📖 Required reading!** Get usage guide and examples
94
+ - `search_symbols(query, market)`: 🔍 Search by company name (e.g., "Apple", "Tesla")
95
+ - `get_symbol_info(symbol)`: Get detailed symbol information
96
+ - `ai_get_reference()`: AI quick reference guide
97
+
98
+ #### Screening Tools
99
+ - `screen_market`: Execute custom market screening queries
100
+ - `get_top_gainers`: Find top gaining assets (includes full company names)
101
+ - `get_top_losers`: Find top losing assets (includes full company names)
102
+ - `get_most_active`: Most traded by volume
103
+ - `get_premarket_movers`: Pre-market gainers, losers, and most active
104
+ - `get_postmarket_movers`: Post-market activity analysis
105
+ - `get_technical_analysis`: Detailed technical analysis for specific symbols
106
+ - `scan_bollinger_bands`: Bollinger Band squeeze detection
107
+ - `scan_volume_breakout`: Volume breakout detection
108
+ - `scan_rsi_extremes`: RSI overbought/oversold scanner
109
+ - `scan_macd_crossover`: MACD crossover detection
110
+ - `get_all_symbols`: Retrieve all symbols for a market
111
+ - `advanced_query`: Execute advanced queries with AND/OR logic
112
+
113
+ #### AI-Friendly Reference Tools
114
+ - `search_available_fields`: Search for fields/columns by name or description
115
+ - `get_field_info`: Get display name and type for a specific field
116
+ - `get_code_example`: Get Python code examples for screener types
117
+ - `list_fields_for_market`: List available fields with pagination
118
+ - `get_common_fields_summary`: Get commonly used fields by category
119
+ - `get_screener_preset`: Retrieve predefined screener presets
120
+ - `get_market_metainfo`: Field definitions and allowed values per market
121
+
122
+ ### MCP Resources
123
+ - `markets://list`: List all available markets
124
+ - `columns://list`: List all available technical indicator columns
125
+ - `exchanges://crypto`: List cryptocurrency exchanges
126
+ - `presets://list`: List predefined screening presets
127
+ - `docs://params`: Screener params format and schema
128
+ - `docs://screeners`: Predefined screener presets overview
129
+ - `docs://fields`: Field display names (paginated)
130
+ - `docs://markets`: Markets metadata
131
+ - `docs://ai-reference`: AI quick reference guide
132
+ - `docs://code-examples`: Python code examples for screeners
133
+
134
+ ## Installation
135
+
136
+ ### Using uvx (Recommended - No Install)
137
+ ```json
138
+ {
139
+ "mcpServers": {
140
+ "tradingview": {
141
+ "command": "uvx",
142
+ "args": ["tradingview-mcp"]
143
+ }
144
+ }
145
+ }
146
+ ```
147
+
148
+ ### Using uv
149
+ ```bash
150
+ uv add tradingview-mcp
151
+ ```
152
+
153
+ ### Using pip
154
+ ```bash
155
+ pip install tradingview-mcp
156
+ ```
157
+
158
+ ### From Source
159
+ ```bash
160
+ git clone https://github.com/k73a/tradingview-mcp.git
161
+ cd tradingview-mcp
162
+ uv sync
163
+ ```
164
+
165
+ ## Usage
166
+
167
+ ### Running the MCP Server
168
+
169
+ #### Stdio Transport (Default)
170
+ ```bash
171
+ tradingview-mcp
172
+ ```
173
+
174
+ #### HTTP Transport
175
+ ```bash
176
+ tradingview-mcp streamable-http --host 127.0.0.1 --port 8000
177
+ ```
178
+
179
+ ### MCP Client Configuration
180
+
181
+ #### Using uvx (Recommended)
182
+ ```json
183
+ {
184
+ "mcpServers": {
185
+ "tradingview": {
186
+ "command": "uvx",
187
+ "args": ["tradingview-mcp"]
188
+ }
189
+ }
190
+ }
191
+ ```
192
+
193
+ #### Using installed package
194
+ ```json
195
+ {
196
+ "mcpServers": {
197
+ "tradingview": {
198
+ "command": "tradingview-mcp",
199
+ "args": []
200
+ }
201
+ }
202
+ }
203
+ ```
204
+
205
+ ### For AI Agents: Getting Started
206
+
207
+ 1. **First, call `ai_get_reference()`** to understand available markets, columns, and filters
208
+ 2. Use `search_available_fields("your query")` to find specific columns
209
+ 3. Use `get_code_example("Stocks (legacy)")` to see query patterns
210
+ 4. Build queries using `screen_market()` or `advanced_query()`
211
+
212
+ ### Example Queries
213
+
214
+ #### Basic Market Screening
215
+ ```python
216
+ # Get top 50 stocks by trading volume
217
+ await client.call_tool("screen_market", {
218
+ "market": "america",
219
+ "columns": ["name", "close", "volume", "change"],
220
+ "sort_by": "volume",
221
+ "ascending": False,
222
+ "limit": 50
223
+ })
224
+ ```
225
+
226
+ #### Technical Analysis Screening
227
+ ```python
228
+ # Find stocks with RSI below 30 (oversold)
229
+ await client.call_tool("scan_rsi_extremes", {
230
+ "market": "america",
231
+ "condition": "oversold",
232
+ "threshold": 30,
233
+ "limit": 20
234
+ })
235
+ ```
236
+
237
+ #### Cryptocurrency Screening
238
+ ```python
239
+ # Get top crypto gainers
240
+ await client.call_tool("get_top_gainers", {
241
+ "market": "crypto",
242
+ "limit": 25
243
+ })
244
+ ```
245
+
246
+ ## API Reference
247
+
248
+ ### Markets
249
+ The following markets are supported:
250
+ - **Crypto**: `crypto`, `coin`
251
+ - **Traditional Finance**: `america`, `uk`, `germany`, `japan`, etc. (67 countries)
252
+ - **Other**: `forex`, `futures`, `bonds`, `cfd`, `options`
253
+
254
+ ### Technical Indicators
255
+ Common indicators include:
256
+ - Price: `open`, `high`, `low`, `close`, `volume`
257
+ - Moving Averages: `SMA5`, `SMA10`, `SMA20`, `SMA50`, `SMA100`, `SMA200`, `EMA5`, `EMA10`, `EMA20`, `EMA50`, `EMA100`, `EMA200`
258
+ - Oscillators: `RSI`, `RSI7`, `MACD.macd`, `MACD.signal`, `Stoch.K`, `Stoch.D`
259
+ - Bollinger Bands: `BB.upper`, `BB.lower`
260
+ - Others: `VWAP`, `ATR`, `ADX`, `CCI20`, etc.
261
+
262
+ See `columns://list` resource for the complete list.
263
+
264
+ ## Development
265
+
266
+ ### Setup Development Environment
267
+ ```bash
268
+ git clone https://github.com/k73a/tradingview-mcp.git
269
+ cd tradingview-mcp
270
+ uv sync --all-extras
271
+ ```
272
+
273
+ ### Running Tests
274
+ ```bash
275
+ uv run pytest tests/ -v
276
+ ```
277
+
278
+ ### Code Formatting
279
+ ```bash
280
+ uv run ruff format .
281
+ uv run ruff check . --fix
282
+ ```
283
+
284
+ ### Type Checking
285
+ ```bash
286
+ uv run pyright
287
+ ```
288
+
289
+ ### Debug Mode
290
+
291
+ Enable structured debug responses from tools by setting:
292
+
293
+ ```bash
294
+ export TRADINGVIEW_MCP_DEBUG=1
295
+ ```
296
+
297
+ ### Docs Data Path (Optional)
298
+
299
+ If you want the full TradingView Screener docs datasets (e.g., large metainfo files),
300
+ point the loader to your docs data directory:
301
+
302
+ ```bash
303
+ export TRADINGVIEW_SCREENER_DOCS_DATA=/path/to/TradingView-Screener-docs/data
304
+ ```
305
+
306
+ ## Publishing & Releases
307
+
308
+ This project uses GitHub Actions for automated publishing to PyPI:
309
+
310
+ ### Automatic Updates
311
+ - **Weekly auto-update**: Every Monday, the workflow checks for dependency updates, runs tests, and publishes a new version if there are changes
312
+ - **Manual trigger**: You can manually trigger updates from the GitHub Actions tab
313
+
314
+ ### Manual Release
315
+ To create a manual release:
316
+
317
+ 1. Update version in `pyproject.toml`
318
+ 2. Commit and create a tag:
319
+ ```bash
320
+ git commit -am "Bump version to x.y.z"
321
+ git tag vx.y.z
322
+ git push origin main --tags
323
+ ```
324
+ 3. GitHub Actions will automatically build and publish to PyPI
325
+
326
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed release instructions.
327
+
328
+ ## Contributing
329
+
330
+ Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
331
+
332
+ ## License
333
+
334
+ MIT License - see [LICENSE](LICENSE) for details.
@@ -0,0 +1,298 @@
1
+ # TradingView MCP Server
2
+
3
+ [![PyPI version](https://badge.fury.io/py/tradingview-mcp.svg)](https://badge.fury.io/py/tradingview-mcp)
4
+ [![Python](https://img.shields.io/pypi/pyversions/tradingview-mcp.svg)](https://pypi.org/project/tradingview-mcp/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ [![Tests](https://github.com/k73a/tradingview-mcp/workflows/Test/badge.svg)](https://github.com/k73a/tradingview-mcp/actions)
7
+
8
+ A comprehensive Model Context Protocol (MCP) server for TradingView market screening with fully integrated screener functionality. This server provides powerful tools for cryptocurrency and stock market analysis directly through the MCP interface.
9
+
10
+ ## Quick Start (No Installation Required)
11
+
12
+ Use `uvx` to run directly without installing:
13
+
14
+ ```json
15
+ {
16
+ "mcpServers": {
17
+ "tradingview": {
18
+ "command": "uvx",
19
+ "args": ["tradingview-mcp"]
20
+ }
21
+ }
22
+ }
23
+ ```
24
+
25
+ ## 🤖 For AI Agents
26
+
27
+ **📖 Read [AI.md](AI.md) for the complete guide!** You can copy the entire AI.md file to understand all capabilities.
28
+
29
+ **Quick Start:**
30
+ 1. Call `get_help()` to understand how to use this MCP
31
+ 2. Call `ai_get_reference()` for markets, columns, and filter references
32
+
33
+ Key points:
34
+ - All results include `description` field with full names (e.g., "Apple Inc." not just "AAPL")
35
+ - Use `limit` parameter to control result count (default: 25)
36
+ - Use `search_symbols("apple", "america")` to search by company name
37
+
38
+ ```
39
+ # Quick examples:
40
+ get_top_gainers("america", 10) # Top 10 US stock gainers
41
+ search_symbols("tesla", "america") # Search for Tesla
42
+ get_symbol_info("NASDAQ:AAPL") # Apple Inc. details
43
+ ```
44
+
45
+ ## Features
46
+
47
+ ### Core Screener Functionality
48
+ - **Direct TradingView API Integration**: Query the TradingView scanner API without external dependencies
49
+ - **Multi-Market Support**: 76+ markets including crypto, stocks, forex, futures, and bonds
50
+ - **SQL-like Query Interface**: Build complex queries with filtering, sorting, and pagination
51
+ - **250+ Technical Indicators**: Access a comprehensive set of technical analysis columns
52
+ - **AI-Friendly Design**: Includes `description` (full name), token-saving limits, and help tools
53
+
54
+ ### MCP Tools
55
+
56
+ #### 🔍 Discovery & Help Tools (AI Start Here!)
57
+ - `get_help(topic)`: **📖 Required reading!** Get usage guide and examples
58
+ - `search_symbols(query, market)`: 🔍 Search by company name (e.g., "Apple", "Tesla")
59
+ - `get_symbol_info(symbol)`: Get detailed symbol information
60
+ - `ai_get_reference()`: AI quick reference guide
61
+
62
+ #### Screening Tools
63
+ - `screen_market`: Execute custom market screening queries
64
+ - `get_top_gainers`: Find top gaining assets (includes full company names)
65
+ - `get_top_losers`: Find top losing assets (includes full company names)
66
+ - `get_most_active`: Most traded by volume
67
+ - `get_premarket_movers`: Pre-market gainers, losers, and most active
68
+ - `get_postmarket_movers`: Post-market activity analysis
69
+ - `get_technical_analysis`: Detailed technical analysis for specific symbols
70
+ - `scan_bollinger_bands`: Bollinger Band squeeze detection
71
+ - `scan_volume_breakout`: Volume breakout detection
72
+ - `scan_rsi_extremes`: RSI overbought/oversold scanner
73
+ - `scan_macd_crossover`: MACD crossover detection
74
+ - `get_all_symbols`: Retrieve all symbols for a market
75
+ - `advanced_query`: Execute advanced queries with AND/OR logic
76
+
77
+ #### AI-Friendly Reference Tools
78
+ - `search_available_fields`: Search for fields/columns by name or description
79
+ - `get_field_info`: Get display name and type for a specific field
80
+ - `get_code_example`: Get Python code examples for screener types
81
+ - `list_fields_for_market`: List available fields with pagination
82
+ - `get_common_fields_summary`: Get commonly used fields by category
83
+ - `get_screener_preset`: Retrieve predefined screener presets
84
+ - `get_market_metainfo`: Field definitions and allowed values per market
85
+
86
+ ### MCP Resources
87
+ - `markets://list`: List all available markets
88
+ - `columns://list`: List all available technical indicator columns
89
+ - `exchanges://crypto`: List cryptocurrency exchanges
90
+ - `presets://list`: List predefined screening presets
91
+ - `docs://params`: Screener params format and schema
92
+ - `docs://screeners`: Predefined screener presets overview
93
+ - `docs://fields`: Field display names (paginated)
94
+ - `docs://markets`: Markets metadata
95
+ - `docs://ai-reference`: AI quick reference guide
96
+ - `docs://code-examples`: Python code examples for screeners
97
+
98
+ ## Installation
99
+
100
+ ### Using uvx (Recommended - No Install)
101
+ ```json
102
+ {
103
+ "mcpServers": {
104
+ "tradingview": {
105
+ "command": "uvx",
106
+ "args": ["tradingview-mcp"]
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ ### Using uv
113
+ ```bash
114
+ uv add tradingview-mcp
115
+ ```
116
+
117
+ ### Using pip
118
+ ```bash
119
+ pip install tradingview-mcp
120
+ ```
121
+
122
+ ### From Source
123
+ ```bash
124
+ git clone https://github.com/k73a/tradingview-mcp.git
125
+ cd tradingview-mcp
126
+ uv sync
127
+ ```
128
+
129
+ ## Usage
130
+
131
+ ### Running the MCP Server
132
+
133
+ #### Stdio Transport (Default)
134
+ ```bash
135
+ tradingview-mcp
136
+ ```
137
+
138
+ #### HTTP Transport
139
+ ```bash
140
+ tradingview-mcp streamable-http --host 127.0.0.1 --port 8000
141
+ ```
142
+
143
+ ### MCP Client Configuration
144
+
145
+ #### Using uvx (Recommended)
146
+ ```json
147
+ {
148
+ "mcpServers": {
149
+ "tradingview": {
150
+ "command": "uvx",
151
+ "args": ["tradingview-mcp"]
152
+ }
153
+ }
154
+ }
155
+ ```
156
+
157
+ #### Using installed package
158
+ ```json
159
+ {
160
+ "mcpServers": {
161
+ "tradingview": {
162
+ "command": "tradingview-mcp",
163
+ "args": []
164
+ }
165
+ }
166
+ }
167
+ ```
168
+
169
+ ### For AI Agents: Getting Started
170
+
171
+ 1. **First, call `ai_get_reference()`** to understand available markets, columns, and filters
172
+ 2. Use `search_available_fields("your query")` to find specific columns
173
+ 3. Use `get_code_example("Stocks (legacy)")` to see query patterns
174
+ 4. Build queries using `screen_market()` or `advanced_query()`
175
+
176
+ ### Example Queries
177
+
178
+ #### Basic Market Screening
179
+ ```python
180
+ # Get top 50 stocks by trading volume
181
+ await client.call_tool("screen_market", {
182
+ "market": "america",
183
+ "columns": ["name", "close", "volume", "change"],
184
+ "sort_by": "volume",
185
+ "ascending": False,
186
+ "limit": 50
187
+ })
188
+ ```
189
+
190
+ #### Technical Analysis Screening
191
+ ```python
192
+ # Find stocks with RSI below 30 (oversold)
193
+ await client.call_tool("scan_rsi_extremes", {
194
+ "market": "america",
195
+ "condition": "oversold",
196
+ "threshold": 30,
197
+ "limit": 20
198
+ })
199
+ ```
200
+
201
+ #### Cryptocurrency Screening
202
+ ```python
203
+ # Get top crypto gainers
204
+ await client.call_tool("get_top_gainers", {
205
+ "market": "crypto",
206
+ "limit": 25
207
+ })
208
+ ```
209
+
210
+ ## API Reference
211
+
212
+ ### Markets
213
+ The following markets are supported:
214
+ - **Crypto**: `crypto`, `coin`
215
+ - **Traditional Finance**: `america`, `uk`, `germany`, `japan`, etc. (67 countries)
216
+ - **Other**: `forex`, `futures`, `bonds`, `cfd`, `options`
217
+
218
+ ### Technical Indicators
219
+ Common indicators include:
220
+ - Price: `open`, `high`, `low`, `close`, `volume`
221
+ - Moving Averages: `SMA5`, `SMA10`, `SMA20`, `SMA50`, `SMA100`, `SMA200`, `EMA5`, `EMA10`, `EMA20`, `EMA50`, `EMA100`, `EMA200`
222
+ - Oscillators: `RSI`, `RSI7`, `MACD.macd`, `MACD.signal`, `Stoch.K`, `Stoch.D`
223
+ - Bollinger Bands: `BB.upper`, `BB.lower`
224
+ - Others: `VWAP`, `ATR`, `ADX`, `CCI20`, etc.
225
+
226
+ See `columns://list` resource for the complete list.
227
+
228
+ ## Development
229
+
230
+ ### Setup Development Environment
231
+ ```bash
232
+ git clone https://github.com/k73a/tradingview-mcp.git
233
+ cd tradingview-mcp
234
+ uv sync --all-extras
235
+ ```
236
+
237
+ ### Running Tests
238
+ ```bash
239
+ uv run pytest tests/ -v
240
+ ```
241
+
242
+ ### Code Formatting
243
+ ```bash
244
+ uv run ruff format .
245
+ uv run ruff check . --fix
246
+ ```
247
+
248
+ ### Type Checking
249
+ ```bash
250
+ uv run pyright
251
+ ```
252
+
253
+ ### Debug Mode
254
+
255
+ Enable structured debug responses from tools by setting:
256
+
257
+ ```bash
258
+ export TRADINGVIEW_MCP_DEBUG=1
259
+ ```
260
+
261
+ ### Docs Data Path (Optional)
262
+
263
+ If you want the full TradingView Screener docs datasets (e.g., large metainfo files),
264
+ point the loader to your docs data directory:
265
+
266
+ ```bash
267
+ export TRADINGVIEW_SCREENER_DOCS_DATA=/path/to/TradingView-Screener-docs/data
268
+ ```
269
+
270
+ ## Publishing & Releases
271
+
272
+ This project uses GitHub Actions for automated publishing to PyPI:
273
+
274
+ ### Automatic Updates
275
+ - **Weekly auto-update**: Every Monday, the workflow checks for dependency updates, runs tests, and publishes a new version if there are changes
276
+ - **Manual trigger**: You can manually trigger updates from the GitHub Actions tab
277
+
278
+ ### Manual Release
279
+ To create a manual release:
280
+
281
+ 1. Update version in `pyproject.toml`
282
+ 2. Commit and create a tag:
283
+ ```bash
284
+ git commit -am "Bump version to x.y.z"
285
+ git tag vx.y.z
286
+ git push origin main --tags
287
+ ```
288
+ 3. GitHub Actions will automatically build and publish to PyPI
289
+
290
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed release instructions.
291
+
292
+ ## Contributing
293
+
294
+ Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
295
+
296
+ ## License
297
+
298
+ MIT License - see [LICENSE](LICENSE) for details.
@@ -1,12 +1,12 @@
1
1
  [project]
2
2
  name = "tradingview-mcp"
3
- version = "1.0.0"
3
+ version = "1.0"
4
4
  description = "A comprehensive MCP server for TradingView market screening with integrated screener functionality"
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }
7
7
  requires-python = ">=3.10"
8
8
  authors = [{ name = "TradingView MCP Team" }]
9
- keywords = ["mcp", "tradingview", "screener", "crypto", "stocks", "trading", "technical-analysis"]
9
+ keywords = ["mcp", "tradingview", "screener", "crypto", "stocks", "trading", "technical-analysis", "model-context-protocol"]
10
10
  classifiers = [
11
11
  "Development Status :: 4 - Beta",
12
12
  "Intended Audience :: Developers",
@@ -17,6 +17,7 @@ classifiers = [
17
17
  "Programming Language :: Python :: 3.11",
18
18
  "Programming Language :: Python :: 3.12",
19
19
  "Topic :: Office/Business :: Financial :: Investment",
20
+ "Topic :: Software Development :: Libraries :: Python Modules",
20
21
  ]
21
22
 
22
23
  dependencies = [
@@ -26,10 +27,18 @@ dependencies = [
26
27
  "httpx>=0.24.0",
27
28
  ]
28
29
 
30
+ [project.urls]
31
+ Homepage = "https://github.com/k73a/tradingview-mcp"
32
+ Documentation = "https://github.com/k73a/tradingview-mcp#readme"
33
+ Repository = "https://github.com/k73a/tradingview-mcp"
34
+ Issues = "https://github.com/k73a/tradingview-mcp/issues"
35
+ Changelog = "https://github.com/k73a/tradingview-mcp/blob/main/CHANGELOG.md"
36
+
29
37
  [project.optional-dependencies]
30
38
  dev = [
31
39
  "pytest>=7.0.0",
32
40
  "pytest-asyncio>=0.21.0",
41
+ "pytest-cov>=4.0.0",
33
42
  "ruff>=0.1.0",
34
43
  "pyright>=1.1.0",
35
44
  ]
@@ -44,8 +53,15 @@ build-backend = "hatchling.build"
44
53
  [tool.hatch.build.targets.wheel]
45
54
  packages = ["src/tradingview_mcp"]
46
55
 
56
+ [tool.hatch.build.targets.wheel.sources]
57
+ "src" = ""
58
+
47
59
  [tool.hatch.build.targets.sdist]
48
- include = ["src/tradingview_mcp/**"]
60
+ include = [
61
+ "src/tradingview_mcp/**/*.py",
62
+ "src/tradingview_mcp/**/*.json",
63
+ "src/tradingview_mcp/data/**",
64
+ ]
49
65
 
50
66
  [tool.pytest.ini_options]
51
67
  pythonpath = ["src"]