loading…
Search for a command to run...
loading…
Read-only MCP server for options research with server-side filtering to reduce token usage. Supports Tradier and Alpaca data providers.
Read-only MCP server for options research with server-side filtering to reduce token usage. Supports Tradier and Alpaca data providers.
Read-only MCP server for options research. Pluggable data provider — currently supports Tradier and Alpaca.
This Model Context Protocol (MCP) server gives AI assistants the tools to research options, without any ability to place trades:
find-options-chain — chain for a symbol + expiration, filtered to options with real volume/bid/ask and strikes within a percentage of spot. Automatically trims to significant strikes to keep the payload LLM-friendly.find-option-expirations — valid expiration dates for an underlying.get-quote — latest quote for a stock symbol or a single OCC option contract. Includes Greeks + IV when the provider supports them (Alpaca does; Tradier requires a chain lookup).historical-prices — OHLCV bars for a stock or OCC option over any range and interval.The server runs two ways:
Please note:
Users can run queries using natural language.
Built for LLM context budgets. A typical underlying has hundreds of strikes across dozens of expirations. Calling a raw get_option_chain from the official Alpaca server returns all of them — every dead far-OTM strike, every penny-bid contract, every field the API exposes. That payload eats thousands of tokens per call and forces the model to filter the noise itself. This server filters server-side:
volume > 0 OR open_interest > 0 and bid/ask > $0.10)In practice a NVDA chain comes back as ~15 strikes instead of ~400 — roughly 20–40× fewer tokens per call, leaving room for actual analysis in the conversation.
Other things going for it:
place_order, no close_position, no exercise_options_position. Point an LLM at it without worrying about hallucinated trades.Q: What are the highlights of the SPY options chain for two weeks out?
A: I'll check the current SPY options chain for two weeks out from today.
View Result from find-options-chain from options-chain (local)
{
"symbol": "SPY",
"expiration": "2025-03-28"
}
Now that I have the SPY options chain for March 28, 2025 (two weeks out), I'll highlight the key information:
Current Market Context
Current SPY price appears to be around $565-566 based on the at-the-money options
Installing this might be tricky if you're not familiar with Node.js and the MCP protocol.
If you want to make changes to the server you can do so by editing the src/index.ts file.
npm install to install dependenciesnpm run build to build the serverThe server supports two providers. Set the credentials for whichever you want and (optionally) DATA_PROVIDER to pick explicitly. If DATA_PROVIDER is unset, Alpaca is used when both Alpaca keys are set, otherwise Tradier.
| Provider | Env vars | Notes |
|---|---|---|
| Tradier sandbox | TRADIER_TOKEN |
15-min delayed. Sandbox tokens expire — dashboard lets you regenerate. |
| Alpaca | ALPACA_API_KEY_ID, ALPACA_SECRET_KEY |
Paper account key works fine. Free indicative options feed includes Greeks + IV. |
See sample.env for optional overrides (feed selection, base-URL overrides for live accounts).
| Field | Tradier | Alpaca |
|---|---|---|
volume (per option) |
Daily total | null — not exposed by the snapshot endpoint |
open_interest |
Returned natively | Fetched from the trading API's contracts endpoint and merged in |
| Greeks + IV on free tier | Yes (when greeks=true) |
Yes (free indicative feed) |
The chain filter treats volume > 0 OR open_interest > 0 as "real market interest," so dead strikes get dropped on either provider. When you see "volume": null in an Alpaca response, that means the provider doesn't report it — not that the contract is inactive. Use open_interest for liquidity assessments on Alpaca.
Open your Claude Desktop configuration at:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd the server configuration (using whichever provider you want):
{
"mcpServers": {
"options-chain": {
"command": "node",
"args": [
"/Full/Route/to/Folder/options-chain/build/index.js"
],
"env": {
"TRADIER_TOKEN": "your_tradier_sandbox_token"
}
}
}
}
Or for Alpaca:
"env": {
"ALPACA_API_KEY_ID": "your_key_id",
"ALPACA_SECRET_KEY": "your_secret"
}
Once you restart you should see a small hammer icon in the lower right corner of the textbox. If you hover over the icon you'll see the number of MCP tools available.
The legacy lowercase
tokenenv var is still accepted for backward compatibility with older configs.
The Worker entrypoint (src/worker.ts) exposes the same tools over MCP's SSE and Streamable HTTP transports, wrapped in an OAuth 2.1 provider. Claude.ai (web and desktop) discovers the endpoints automatically via Dynamic Client Registration.
npx wrangler loginOAUTH_KV (create with npx wrangler kv namespace create OAUTH_KV and paste the ID into wrangler.jsonc)For Tradier:
npx wrangler secret put TRADIER_TOKEN
For Alpaca:
npx wrangler secret put ALPACA_API_KEY_ID
npx wrangler secret put ALPACA_SECRET_KEY
# optional:
npx wrangler secret put DATA_PROVIDER # "alpaca" or "tradier"
And the auth passcode that gates the consent page:
npx wrangler secret put APPROVE_PASSCODE # e.g. `openssl rand -base64 18`
For local dev, put the same keys in a .dev.vars file at the repo root (gitignored).
npm run dev # local dev server with hot reload
npm run deploy # publish to <name>.<account>.workers.dev
In Claude.ai → Settings → Connectors → Add custom connector:
https://<your-worker>.workers.dev/sse (or /mcp for Streamable HTTP).APPROVE_PASSCODE you set above.For multi-user access or SSO, put Cloudflare Access in front of the Worker route. The OAuth flow still works for the MCP client; Access just adds a second layer for the human consent page.
If you get errors when running the server you may need to provide the full path to the node command. For example, on macOS: /usr/local/bin/node
Выполни в терминале:
claude mcp add options-chain-mcp -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.