BO

blake365/options-chain

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

11 stars 6 forks Качество 80 Тренд 16MIT

Option Chain MCP server

Обзор

Read-only MCP server for options research. Pluggable data provider — currently supports Tradier and Alpaca. Unlike a server that wraps a free public API, this one talks to a brokerage data provider on your behalf, so it needs a TRADIER_TOKEN, or an ALPACA_API_KEY_ID + ALPACA_SECRET_KEY, in its environment. Free sandbox/paper accounts work fine — see Choosing a data provider. Started without credentials, the server exits immediately and prints which variable is missing. This Model Context Protocol (MCP) server gives AI assistants the tools to research options, without any ability to place trades: - — 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. - — valid expiration dates for an underlying. - — latest quote for a stock symbol or a single OCC option contract.

README

Показан фрагмент оригинального README. Открыть оригинал.

options-chain-mcp

Read-only MCP server for options research. Pluggable data provider — currently supports Tradier and Alpaca.

npx -y options-chain-mcp

You must bring your own market data credentials. Unlike a server that wraps a free public API, this one talks to a brokerage data provider on your behalf, so it needs a TRADIER_TOKEN, or an ALPACA_API_KEY_ID + ALPACA_SECRET_KEY, in its environment. Free sandbox/paper accounts work fine — see Choosing a data provider. Started without credentials, the server exits immediately and prints which variable is missing.

Overview

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:

  • Locally over stdio for Claude Desktop
  • Remotely on Cloudflare Workers with OAuth 2.1, for Claude.ai and other MCP clients that speak the remote-connector protocol

Please note:

  • Requires API credentials for whichever provider you use (free paper/sandbox accounts work)
  • Market data on free plans is typically 15-min delayed
  • Intended for informational purposes only

Users can run queries using natural language.

Why this server (instead of the official Tradier or Alpaca MCP)

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:

  • Strikes are pre-filtered to a configurable percentage band around spot
  • Dead contracts are dropped (volume > 0 OR open_interest > 0 and bid/ask > $0.10)
  • A “significant strikes” pass keeps round-numbered strikes at distance and finer-grained strikes near the money — mimicking how a human trader actually reads a chain
  • Only the fields a research workflow needs are returned (no exchange codes, no raw timestamps, no boilerplate)
Открыть полный README на GitHub

Установка

npx -y options-chain-mcp
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "options-chain": { "command": "npx", "args": ["-y", "options-chain-mcp"], "env": { "TRADIER_TOKEN": "your_tradier_sandbox_token" } } } }