MCP Server
thetadatadx-mcp is a Model Context Protocol server over stdio: any MCP-capable client (Claude Desktop, Cursor, and others) gets a tool per historical endpoint plus the offline Greeks calculators, speaking JSON-RPC 2.0.
Install
cargo install thetadatadx-mcp --git https://github.com/userFRM/ThetaDataDxConfigure your client
Most MCP clients read an mcpServers block from a project-local or user-level settings file; the shape is the same across clients (for example .cursor/mcp.json in Cursor):
{
"mcpServers": {
"thetadata": {
"command": "thetadatadx-mcp",
"env": {
"THETA_EMAIL": "you@example.com",
"THETA_PASSWORD": "your-password"
}
}
}
}WARNING
Keep credentials in environment variables or a secrets manager — not in config files committed to version control.
Tools
Every generated historical endpoint plus ping, all_greeks, and implied_volatility. Tool names and parameters match the reference pages one-to-one, so the model's tool list is the same surface you read here.
Without credentials, the server still starts and serves the offline tools (ping, all_greeks, implied_volatility) — useful for testing the integration or computing Greeks with no subscription.
Option queries from a model
- Pin one contract with a concrete strike:
"strike":"385". - Use
"strike":"0"when you want a bulk chain-style response; rows then carry contract-identity fields. strike_rangenarrows a bulk selection around the money; it does not fan a pinned strike out to neighbors.
Troubleshooting
The client lists no tools
Run thetadatadx-mcp by hand: the process must start silently and wait on stdin. Anything printed to stdout breaks the JSON-RPC channel — logs go to stderr by design, so a corrupted stdout usually means a wrapper script is echoing.
Only three tools appear
That is offline mode: credentials were missing or rejected. Check THETA_EMAIL / THETA_PASSWORD in the client's env block.
Calls fail with permission errors
The account's tier doesn't cover the endpoint — check the tier badge on the matching reference page against Subscriptions.
Debug logging
RUST_LOG=debug thetadatadx-mcp (stderr only; stdout stays clean for the protocol).
WARNING
LLM output varies run to run — treat model-generated parameter choices and analysis as drafts to verify, per Building with AI / LLMs.