tradytics-mcp 0.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.
- tradytics_mcp-0.1.0/LICENSE +21 -0
- tradytics_mcp-0.1.0/PKG-INFO +134 -0
- tradytics_mcp-0.1.0/README.md +108 -0
- tradytics_mcp-0.1.0/pyproject.toml +56 -0
- tradytics_mcp-0.1.0/setup.cfg +4 -0
- tradytics_mcp-0.1.0/tradytics_mcp/__init__.py +3 -0
- tradytics_mcp-0.1.0/tradytics_mcp/cli.py +132 -0
- tradytics_mcp-0.1.0/tradytics_mcp.egg-info/PKG-INFO +134 -0
- tradytics_mcp-0.1.0/tradytics_mcp.egg-info/SOURCES.txt +10 -0
- tradytics_mcp-0.1.0/tradytics_mcp.egg-info/dependency_links.txt +1 -0
- tradytics_mcp-0.1.0/tradytics_mcp.egg-info/entry_points.txt +2 -0
- tradytics_mcp-0.1.0/tradytics_mcp.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tradytics
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tradytics-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP server for US stock market data: options flow, dark pool prints, dealer gamma, stock perpetuals, fundamentals, SEC filings, and prediction markets via Tradytics.
|
|
5
|
+
Author-email: Tradytics <hello@tradytics.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://tradytics.com/docs/mcp
|
|
8
|
+
Project-URL: Documentation, https://tradytics.com/docs/mcp
|
|
9
|
+
Project-URL: Repository, https://github.com/tradytics/tradytics-mcp
|
|
10
|
+
Project-URL: API keys, https://tradytics.com/developer/keys
|
|
11
|
+
Keywords: mcp,mcp-server,model-context-protocol,stock-market,options-flow,dark-pool,gamma-exposure,sec-filings,fundamentals,prediction-markets,finance,trading,claude,cursor,tradytics
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
20
|
+
Classifier: Operating System :: OS Independent
|
|
21
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
22
|
+
Requires-Python: >=3.8
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# Tradytics MCP Server (`tradytics-mcp`)
|
|
28
|
+
|
|
29
|
+
[](https://glama.ai/mcp/connectors/com.tradytics/market-data)
|
|
30
|
+
[](https://www.npmjs.com/package/tradytics-mcp)
|
|
31
|
+
[](https://pypi.org/project/tradytics-mcp/)
|
|
32
|
+
[](LICENSE)
|
|
33
|
+
|
|
34
|
+
Official Model Context Protocol (MCP) server for [Tradytics](https://tradytics.com) US market data: stitched options flow, options chains, dealer gamma/vanna/charm, ranked dark pool prints, stock perpetuals, stock quotes and bars, company fundamentals, SEC filings with semantic passage search, earnings transcripts, insider/13F/Congress disclosures, screener signals, and Kalshi/Polymarket prediction market odds.
|
|
35
|
+
|
|
36
|
+
Connect in two ways:
|
|
37
|
+
1. **Remote Streamable HTTP + OAuth (recommended for Claude, ChatGPT, Cursor):** `https://tradytics.com/mcp`
|
|
38
|
+
2. **Local stdio bridge (`npx -y tradytics-mcp` or `uvx tradytics-mcp`):** zero-dependency bridge using `TRADYTICS_API_KEY` for Claude Desktop, Cline, Windsurf, Docker agents, LangChain, CrewAI, and headless workflows.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Option 1: Hosted Remote MCP (OAuth, Zero Install)
|
|
43
|
+
|
|
44
|
+
- **Server URL:** `https://tradytics.com/mcp`
|
|
45
|
+
- **Official MCP Registry ID:** `com.tradytics/market-data`
|
|
46
|
+
- **Setup guide:** [tradytics.com/docs/mcp](https://tradytics.com/docs/mcp)
|
|
47
|
+
|
|
48
|
+
### Claude Code
|
|
49
|
+
```bash
|
|
50
|
+
claude mcp add --transport http tradytics https://tradytics.com/mcp
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Cursor (`.cursor/mcp.json`)
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"tradytics": {
|
|
58
|
+
"url": "https://tradytics.com/mcp"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Option 2: Local Stdio MCP (`npx` / `uvx` / `pip`, API Key Auth)
|
|
67
|
+
|
|
68
|
+
Create an API key at [tradytics.com/developer/keys](https://tradytics.com/developer/keys) and configure your MCP client:
|
|
69
|
+
|
|
70
|
+
### Node.js (`npx`, Node 18+, zero dependencies)
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"mcpServers": {
|
|
74
|
+
"tradytics": {
|
|
75
|
+
"command": "npx",
|
|
76
|
+
"args": ["-y", "tradytics-mcp"],
|
|
77
|
+
"env": {
|
|
78
|
+
"TRADYTICS_API_KEY": "tdy_your_key_here"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Python (`uvx` or `pip install tradytics-mcp`, Python 3.8+, zero dependencies)
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"mcpServers": {
|
|
89
|
+
"tradytics": {
|
|
90
|
+
"command": "uvx",
|
|
91
|
+
"args": ["tradytics-mcp"],
|
|
92
|
+
"env": {
|
|
93
|
+
"TRADYTICS_API_KEY": "tdy_your_key_here"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Or install globally:
|
|
101
|
+
```bash
|
|
102
|
+
pip install tradytics-mcp
|
|
103
|
+
TRADYTICS_API_KEY="tdy_..." tradytics-mcp
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Available Data Scopes & Tools
|
|
109
|
+
|
|
110
|
+
All tools stay automatically in sync with `https://tradytics.com/mcp`:
|
|
111
|
+
|
|
112
|
+
| Scope | Key Tools |
|
|
113
|
+
| :--- | :--- |
|
|
114
|
+
| **Options flow & chains** | `get_options_flow`, `get_flow_summary`, `get_option_contracts`, `get_dealer_positioning`, `get_volatility` |
|
|
115
|
+
| **Dark pools** | `get_dark_pool` (ranked block prints and volume price levels) |
|
|
116
|
+
| **Stock perpetuals** | `get_perp_markets`, `get_perp_prints` |
|
|
117
|
+
| **Equities & market** | `get_quotes`, `get_price_bars`, `get_stock_snapshot`, `get_stock_data`, `get_market`, `get_calendar`, `get_news`, `get_insights` |
|
|
118
|
+
| **Fundamentals & SEC** | `get_fundamentals`, `get_transcripts`, `get_filings` (including semantic passage search), `get_disclosures`, `get_kpis` |
|
|
119
|
+
| **Screening & signals** | `screen_stocks`, `get_screener_fields`, `get_signals`, `get_signal_performance` |
|
|
120
|
+
| **Prediction markets** | `get_probabilities` (Kalshi and Polymarket) |
|
|
121
|
+
| **AI Fund & account** | `get_ai_fund`, `get_my_portfolio`, `get_my_backtests`, `get_my_dashboards`, `get_my_watchlists`, `find_symbol` |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Related Packages & Resources
|
|
126
|
+
|
|
127
|
+
- **Agent Skill (Claude Code, Codex, Cursor):** `npx skills add tradytics/skills` ([github.com/tradytics/skills](https://github.com/tradytics/skills))
|
|
128
|
+
- **Starter prompts & scripts:** [github.com/tradytics/options-flow-mcp-starter](https://github.com/tradytics/options-flow-mcp-starter)
|
|
129
|
+
- **Python & JS REST SDKs:** `pip install tradytics` | `npm install tradytics`
|
|
130
|
+
- **Full docs & rate limits:** [tradytics.com/docs](https://tradytics.com/docs) | [tradytics.com/docs/rate-limits](https://tradytics.com/docs/rate-limits)
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
MIT. Not investment advice; all market data is for informational purposes only.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Tradytics MCP Server (`tradytics-mcp`)
|
|
2
|
+
|
|
3
|
+
[](https://glama.ai/mcp/connectors/com.tradytics/market-data)
|
|
4
|
+
[](https://www.npmjs.com/package/tradytics-mcp)
|
|
5
|
+
[](https://pypi.org/project/tradytics-mcp/)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
Official Model Context Protocol (MCP) server for [Tradytics](https://tradytics.com) US market data: stitched options flow, options chains, dealer gamma/vanna/charm, ranked dark pool prints, stock perpetuals, stock quotes and bars, company fundamentals, SEC filings with semantic passage search, earnings transcripts, insider/13F/Congress disclosures, screener signals, and Kalshi/Polymarket prediction market odds.
|
|
9
|
+
|
|
10
|
+
Connect in two ways:
|
|
11
|
+
1. **Remote Streamable HTTP + OAuth (recommended for Claude, ChatGPT, Cursor):** `https://tradytics.com/mcp`
|
|
12
|
+
2. **Local stdio bridge (`npx -y tradytics-mcp` or `uvx tradytics-mcp`):** zero-dependency bridge using `TRADYTICS_API_KEY` for Claude Desktop, Cline, Windsurf, Docker agents, LangChain, CrewAI, and headless workflows.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Option 1: Hosted Remote MCP (OAuth, Zero Install)
|
|
17
|
+
|
|
18
|
+
- **Server URL:** `https://tradytics.com/mcp`
|
|
19
|
+
- **Official MCP Registry ID:** `com.tradytics/market-data`
|
|
20
|
+
- **Setup guide:** [tradytics.com/docs/mcp](https://tradytics.com/docs/mcp)
|
|
21
|
+
|
|
22
|
+
### Claude Code
|
|
23
|
+
```bash
|
|
24
|
+
claude mcp add --transport http tradytics https://tradytics.com/mcp
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Cursor (`.cursor/mcp.json`)
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mcpServers": {
|
|
31
|
+
"tradytics": {
|
|
32
|
+
"url": "https://tradytics.com/mcp"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Option 2: Local Stdio MCP (`npx` / `uvx` / `pip`, API Key Auth)
|
|
41
|
+
|
|
42
|
+
Create an API key at [tradytics.com/developer/keys](https://tradytics.com/developer/keys) and configure your MCP client:
|
|
43
|
+
|
|
44
|
+
### Node.js (`npx`, Node 18+, zero dependencies)
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"mcpServers": {
|
|
48
|
+
"tradytics": {
|
|
49
|
+
"command": "npx",
|
|
50
|
+
"args": ["-y", "tradytics-mcp"],
|
|
51
|
+
"env": {
|
|
52
|
+
"TRADYTICS_API_KEY": "tdy_your_key_here"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Python (`uvx` or `pip install tradytics-mcp`, Python 3.8+, zero dependencies)
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"tradytics": {
|
|
64
|
+
"command": "uvx",
|
|
65
|
+
"args": ["tradytics-mcp"],
|
|
66
|
+
"env": {
|
|
67
|
+
"TRADYTICS_API_KEY": "tdy_your_key_here"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Or install globally:
|
|
75
|
+
```bash
|
|
76
|
+
pip install tradytics-mcp
|
|
77
|
+
TRADYTICS_API_KEY="tdy_..." tradytics-mcp
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Available Data Scopes & Tools
|
|
83
|
+
|
|
84
|
+
All tools stay automatically in sync with `https://tradytics.com/mcp`:
|
|
85
|
+
|
|
86
|
+
| Scope | Key Tools |
|
|
87
|
+
| :--- | :--- |
|
|
88
|
+
| **Options flow & chains** | `get_options_flow`, `get_flow_summary`, `get_option_contracts`, `get_dealer_positioning`, `get_volatility` |
|
|
89
|
+
| **Dark pools** | `get_dark_pool` (ranked block prints and volume price levels) |
|
|
90
|
+
| **Stock perpetuals** | `get_perp_markets`, `get_perp_prints` |
|
|
91
|
+
| **Equities & market** | `get_quotes`, `get_price_bars`, `get_stock_snapshot`, `get_stock_data`, `get_market`, `get_calendar`, `get_news`, `get_insights` |
|
|
92
|
+
| **Fundamentals & SEC** | `get_fundamentals`, `get_transcripts`, `get_filings` (including semantic passage search), `get_disclosures`, `get_kpis` |
|
|
93
|
+
| **Screening & signals** | `screen_stocks`, `get_screener_fields`, `get_signals`, `get_signal_performance` |
|
|
94
|
+
| **Prediction markets** | `get_probabilities` (Kalshi and Polymarket) |
|
|
95
|
+
| **AI Fund & account** | `get_ai_fund`, `get_my_portfolio`, `get_my_backtests`, `get_my_dashboards`, `get_my_watchlists`, `find_symbol` |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Related Packages & Resources
|
|
100
|
+
|
|
101
|
+
- **Agent Skill (Claude Code, Codex, Cursor):** `npx skills add tradytics/skills` ([github.com/tradytics/skills](https://github.com/tradytics/skills))
|
|
102
|
+
- **Starter prompts & scripts:** [github.com/tradytics/options-flow-mcp-starter](https://github.com/tradytics/options-flow-mcp-starter)
|
|
103
|
+
- **Python & JS REST SDKs:** `pip install tradytics` | `npm install tradytics`
|
|
104
|
+
- **Full docs & rate limits:** [tradytics.com/docs](https://tradytics.com/docs) | [tradytics.com/docs/rate-limits](https://tradytics.com/docs/rate-limits)
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
MIT. Not investment advice; all market data is for informational purposes only.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tradytics-mcp"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "MCP server for US stock market data: options flow, dark pool prints, dealer gamma, stock perpetuals, fundamentals, SEC filings, and prediction markets via Tradytics."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [{ name = "Tradytics", email = "hello@tradytics.com" }]
|
|
13
|
+
keywords = [
|
|
14
|
+
"mcp",
|
|
15
|
+
"mcp-server",
|
|
16
|
+
"model-context-protocol",
|
|
17
|
+
"stock-market",
|
|
18
|
+
"options-flow",
|
|
19
|
+
"dark-pool",
|
|
20
|
+
"gamma-exposure",
|
|
21
|
+
"sec-filings",
|
|
22
|
+
"fundamentals",
|
|
23
|
+
"prediction-markets",
|
|
24
|
+
"finance",
|
|
25
|
+
"trading",
|
|
26
|
+
"claude",
|
|
27
|
+
"cursor",
|
|
28
|
+
"tradytics",
|
|
29
|
+
]
|
|
30
|
+
classifiers = [
|
|
31
|
+
"Programming Language :: Python :: 3",
|
|
32
|
+
"Programming Language :: Python :: 3.8",
|
|
33
|
+
"Programming Language :: Python :: 3.9",
|
|
34
|
+
"Programming Language :: Python :: 3.10",
|
|
35
|
+
"Programming Language :: Python :: 3.11",
|
|
36
|
+
"Programming Language :: Python :: 3.12",
|
|
37
|
+
"Programming Language :: Python :: 3.13",
|
|
38
|
+
"License :: OSI Approved :: MIT License",
|
|
39
|
+
"Operating System :: OS Independent",
|
|
40
|
+
"Topic :: Office/Business :: Financial :: Investment",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[project.scripts]
|
|
44
|
+
tradytics-mcp = "tradytics_mcp.cli:main"
|
|
45
|
+
|
|
46
|
+
[project.urls]
|
|
47
|
+
Homepage = "https://tradytics.com/docs/mcp"
|
|
48
|
+
Documentation = "https://tradytics.com/docs/mcp"
|
|
49
|
+
Repository = "https://github.com/tradytics/tradytics-mcp"
|
|
50
|
+
"API keys" = "https://tradytics.com/developer/keys"
|
|
51
|
+
|
|
52
|
+
[tool.setuptools]
|
|
53
|
+
packages = ["tradytics_mcp"]
|
|
54
|
+
|
|
55
|
+
[tool.setuptools.dynamic]
|
|
56
|
+
version = { attr = "tradytics_mcp.__version__" }
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"""Zero-dependency stdio-to-Streamable-HTTP MCP bridge for Tradytics."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import json
|
|
7
|
+
import os
|
|
8
|
+
import sys
|
|
9
|
+
import urllib.error
|
|
10
|
+
import urllib.request
|
|
11
|
+
|
|
12
|
+
from . import __version__
|
|
13
|
+
|
|
14
|
+
DEFAULT_URL = "https://tradytics.com/mcp"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _send(obj: dict) -> None:
|
|
18
|
+
sys.stdout.write(json.dumps(obj, separators=(",", ":")) + "\n")
|
|
19
|
+
sys.stdout.flush()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _send_error(req_id, code: int, message: str) -> None:
|
|
23
|
+
if req_id is None:
|
|
24
|
+
return
|
|
25
|
+
_send({"jsonrpc": "2.0", "id": req_id, "error": {"code": code, "message": message}})
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _emit_sse(text: str) -> None:
|
|
29
|
+
for block in text.replace("\r\n", "\n").split("\n\n"):
|
|
30
|
+
lines = [line[5:].lstrip() for line in block.split("\n") if line.startswith("data:")]
|
|
31
|
+
data = "\n".join(lines).strip()
|
|
32
|
+
if not data or data == "[DONE]":
|
|
33
|
+
continue
|
|
34
|
+
try:
|
|
35
|
+
_send(json.loads(data))
|
|
36
|
+
except json.JSONDecodeError:
|
|
37
|
+
sys.stderr.write("[tradytics-mcp] ignored non-JSON SSE frame\n")
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _parse_args(argv: list[str] | None = None) -> argparse.Namespace:
|
|
41
|
+
parser = argparse.ArgumentParser(
|
|
42
|
+
prog="tradytics-mcp",
|
|
43
|
+
description="Stdio MCP bridge for Tradytics (https://tradytics.com/mcp).",
|
|
44
|
+
)
|
|
45
|
+
parser.add_argument(
|
|
46
|
+
"--api-key",
|
|
47
|
+
default=os.environ.get("TRADYTICS_API_KEY", ""),
|
|
48
|
+
help="Tradytics API key (or set TRADYTICS_API_KEY). Create one at https://tradytics.com/developer/keys",
|
|
49
|
+
)
|
|
50
|
+
parser.add_argument(
|
|
51
|
+
"--url",
|
|
52
|
+
default=os.environ.get("TRADYTICS_MCP_URL", DEFAULT_URL),
|
|
53
|
+
help=f"MCP endpoint URL (default: {DEFAULT_URL})",
|
|
54
|
+
)
|
|
55
|
+
parser.add_argument("-v", "--version", action="version", version=f"tradytics-mcp {__version__}")
|
|
56
|
+
return parser.parse_args(argv)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def main(argv: list[str] | None = None) -> None:
|
|
60
|
+
args = _parse_args(argv)
|
|
61
|
+
api_key = args.api_key.strip()
|
|
62
|
+
url = args.url.strip()
|
|
63
|
+
session_id = ""
|
|
64
|
+
|
|
65
|
+
for raw in sys.stdin:
|
|
66
|
+
line = raw.strip()
|
|
67
|
+
if not line:
|
|
68
|
+
continue
|
|
69
|
+
try:
|
|
70
|
+
msg = json.loads(line)
|
|
71
|
+
except json.JSONDecodeError:
|
|
72
|
+
_send_error(None, -32700, "Parse error")
|
|
73
|
+
continue
|
|
74
|
+
|
|
75
|
+
req_id = msg.get("id")
|
|
76
|
+
if not api_key:
|
|
77
|
+
_send_error(
|
|
78
|
+
req_id,
|
|
79
|
+
-32001,
|
|
80
|
+
"Missing TRADYTICS_API_KEY. Create a key at https://tradytics.com/developer/keys or connect directly with OAuth at https://tradytics.com/mcp",
|
|
81
|
+
)
|
|
82
|
+
continue
|
|
83
|
+
|
|
84
|
+
headers = {
|
|
85
|
+
"Content-Type": "application/json",
|
|
86
|
+
"Accept": "application/json, text/event-stream",
|
|
87
|
+
"Authorization": f"Bearer {api_key}",
|
|
88
|
+
"User-Agent": f"tradytics-mcp-py/{__version__}",
|
|
89
|
+
}
|
|
90
|
+
if session_id:
|
|
91
|
+
headers["Mcp-Session-Id"] = session_id
|
|
92
|
+
|
|
93
|
+
req = urllib.request.Request(
|
|
94
|
+
url,
|
|
95
|
+
data=json.dumps(msg).encode("utf-8"),
|
|
96
|
+
headers=headers,
|
|
97
|
+
method="POST",
|
|
98
|
+
)
|
|
99
|
+
try:
|
|
100
|
+
with urllib.request.urlopen(req, timeout=60) as resp:
|
|
101
|
+
sid = resp.headers.get("Mcp-Session-Id")
|
|
102
|
+
if sid:
|
|
103
|
+
session_id = sid
|
|
104
|
+
if resp.status in (202, 204):
|
|
105
|
+
continue
|
|
106
|
+
body = resp.read().decode("utf-8", errors="replace").strip()
|
|
107
|
+
if not body:
|
|
108
|
+
continue
|
|
109
|
+
ctype = (resp.headers.get("Content-Type") or "").lower()
|
|
110
|
+
if "text/event-stream" in ctype:
|
|
111
|
+
_emit_sse(body)
|
|
112
|
+
else:
|
|
113
|
+
parsed = json.loads(body)
|
|
114
|
+
if isinstance(parsed, list):
|
|
115
|
+
for item in parsed:
|
|
116
|
+
_send(item)
|
|
117
|
+
else:
|
|
118
|
+
_send(parsed)
|
|
119
|
+
except urllib.error.HTTPError as exc:
|
|
120
|
+
err_body = exc.read().decode("utf-8", errors="replace")[:300]
|
|
121
|
+
detail = (
|
|
122
|
+
"Unauthorized: check TRADYTICS_API_KEY at https://tradytics.com/developer/keys"
|
|
123
|
+
if exc.code == 401
|
|
124
|
+
else f"HTTP {exc.code}: {err_body}"
|
|
125
|
+
)
|
|
126
|
+
_send_error(req_id, -32000, detail)
|
|
127
|
+
except Exception as exc:
|
|
128
|
+
_send_error(req_id, -32603, f"Transport error: {exc}")
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
if __name__ == "__main__":
|
|
132
|
+
main()
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tradytics-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP server for US stock market data: options flow, dark pool prints, dealer gamma, stock perpetuals, fundamentals, SEC filings, and prediction markets via Tradytics.
|
|
5
|
+
Author-email: Tradytics <hello@tradytics.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://tradytics.com/docs/mcp
|
|
8
|
+
Project-URL: Documentation, https://tradytics.com/docs/mcp
|
|
9
|
+
Project-URL: Repository, https://github.com/tradytics/tradytics-mcp
|
|
10
|
+
Project-URL: API keys, https://tradytics.com/developer/keys
|
|
11
|
+
Keywords: mcp,mcp-server,model-context-protocol,stock-market,options-flow,dark-pool,gamma-exposure,sec-filings,fundamentals,prediction-markets,finance,trading,claude,cursor,tradytics
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
20
|
+
Classifier: Operating System :: OS Independent
|
|
21
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
22
|
+
Requires-Python: >=3.8
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# Tradytics MCP Server (`tradytics-mcp`)
|
|
28
|
+
|
|
29
|
+
[](https://glama.ai/mcp/connectors/com.tradytics/market-data)
|
|
30
|
+
[](https://www.npmjs.com/package/tradytics-mcp)
|
|
31
|
+
[](https://pypi.org/project/tradytics-mcp/)
|
|
32
|
+
[](LICENSE)
|
|
33
|
+
|
|
34
|
+
Official Model Context Protocol (MCP) server for [Tradytics](https://tradytics.com) US market data: stitched options flow, options chains, dealer gamma/vanna/charm, ranked dark pool prints, stock perpetuals, stock quotes and bars, company fundamentals, SEC filings with semantic passage search, earnings transcripts, insider/13F/Congress disclosures, screener signals, and Kalshi/Polymarket prediction market odds.
|
|
35
|
+
|
|
36
|
+
Connect in two ways:
|
|
37
|
+
1. **Remote Streamable HTTP + OAuth (recommended for Claude, ChatGPT, Cursor):** `https://tradytics.com/mcp`
|
|
38
|
+
2. **Local stdio bridge (`npx -y tradytics-mcp` or `uvx tradytics-mcp`):** zero-dependency bridge using `TRADYTICS_API_KEY` for Claude Desktop, Cline, Windsurf, Docker agents, LangChain, CrewAI, and headless workflows.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Option 1: Hosted Remote MCP (OAuth, Zero Install)
|
|
43
|
+
|
|
44
|
+
- **Server URL:** `https://tradytics.com/mcp`
|
|
45
|
+
- **Official MCP Registry ID:** `com.tradytics/market-data`
|
|
46
|
+
- **Setup guide:** [tradytics.com/docs/mcp](https://tradytics.com/docs/mcp)
|
|
47
|
+
|
|
48
|
+
### Claude Code
|
|
49
|
+
```bash
|
|
50
|
+
claude mcp add --transport http tradytics https://tradytics.com/mcp
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Cursor (`.cursor/mcp.json`)
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"tradytics": {
|
|
58
|
+
"url": "https://tradytics.com/mcp"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Option 2: Local Stdio MCP (`npx` / `uvx` / `pip`, API Key Auth)
|
|
67
|
+
|
|
68
|
+
Create an API key at [tradytics.com/developer/keys](https://tradytics.com/developer/keys) and configure your MCP client:
|
|
69
|
+
|
|
70
|
+
### Node.js (`npx`, Node 18+, zero dependencies)
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"mcpServers": {
|
|
74
|
+
"tradytics": {
|
|
75
|
+
"command": "npx",
|
|
76
|
+
"args": ["-y", "tradytics-mcp"],
|
|
77
|
+
"env": {
|
|
78
|
+
"TRADYTICS_API_KEY": "tdy_your_key_here"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Python (`uvx` or `pip install tradytics-mcp`, Python 3.8+, zero dependencies)
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"mcpServers": {
|
|
89
|
+
"tradytics": {
|
|
90
|
+
"command": "uvx",
|
|
91
|
+
"args": ["tradytics-mcp"],
|
|
92
|
+
"env": {
|
|
93
|
+
"TRADYTICS_API_KEY": "tdy_your_key_here"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Or install globally:
|
|
101
|
+
```bash
|
|
102
|
+
pip install tradytics-mcp
|
|
103
|
+
TRADYTICS_API_KEY="tdy_..." tradytics-mcp
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Available Data Scopes & Tools
|
|
109
|
+
|
|
110
|
+
All tools stay automatically in sync with `https://tradytics.com/mcp`:
|
|
111
|
+
|
|
112
|
+
| Scope | Key Tools |
|
|
113
|
+
| :--- | :--- |
|
|
114
|
+
| **Options flow & chains** | `get_options_flow`, `get_flow_summary`, `get_option_contracts`, `get_dealer_positioning`, `get_volatility` |
|
|
115
|
+
| **Dark pools** | `get_dark_pool` (ranked block prints and volume price levels) |
|
|
116
|
+
| **Stock perpetuals** | `get_perp_markets`, `get_perp_prints` |
|
|
117
|
+
| **Equities & market** | `get_quotes`, `get_price_bars`, `get_stock_snapshot`, `get_stock_data`, `get_market`, `get_calendar`, `get_news`, `get_insights` |
|
|
118
|
+
| **Fundamentals & SEC** | `get_fundamentals`, `get_transcripts`, `get_filings` (including semantic passage search), `get_disclosures`, `get_kpis` |
|
|
119
|
+
| **Screening & signals** | `screen_stocks`, `get_screener_fields`, `get_signals`, `get_signal_performance` |
|
|
120
|
+
| **Prediction markets** | `get_probabilities` (Kalshi and Polymarket) |
|
|
121
|
+
| **AI Fund & account** | `get_ai_fund`, `get_my_portfolio`, `get_my_backtests`, `get_my_dashboards`, `get_my_watchlists`, `find_symbol` |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Related Packages & Resources
|
|
126
|
+
|
|
127
|
+
- **Agent Skill (Claude Code, Codex, Cursor):** `npx skills add tradytics/skills` ([github.com/tradytics/skills](https://github.com/tradytics/skills))
|
|
128
|
+
- **Starter prompts & scripts:** [github.com/tradytics/options-flow-mcp-starter](https://github.com/tradytics/options-flow-mcp-starter)
|
|
129
|
+
- **Python & JS REST SDKs:** `pip install tradytics` | `npm install tradytics`
|
|
130
|
+
- **Full docs & rate limits:** [tradytics.com/docs](https://tradytics.com/docs) | [tradytics.com/docs/rate-limits](https://tradytics.com/docs/rate-limits)
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
MIT. Not investment advice; all market data is for informational purposes only.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
tradytics_mcp/__init__.py
|
|
5
|
+
tradytics_mcp/cli.py
|
|
6
|
+
tradytics_mcp.egg-info/PKG-INFO
|
|
7
|
+
tradytics_mcp.egg-info/SOURCES.txt
|
|
8
|
+
tradytics_mcp.egg-info/dependency_links.txt
|
|
9
|
+
tradytics_mcp.egg-info/entry_points.txt
|
|
10
|
+
tradytics_mcp.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tradytics_mcp
|