OptionContext MCP Server
Official Model Context Protocol (MCP) Server for the OptionContext Stock and Options Data APIs. This premium integration delivers rich analytical and structural data for Indian Stock Markets directly into LLM agents and clients supporting the Model Context Protocol.
Installation
You can install the OptionContext MCP package using pip, or run it on-demand with Node and LLM-centric workflows.
Installation via pip
pip install optioncontext_mcp
Direct Run with uvx (Python environment)
uvx optioncontext-mcp
Configuration
To use the OptionContext MCP Server, you must specify your API key and base endpoint URL. You can configure these options via environment variables:
OPTIONCONTEXT_API_KEY: Your Agent-as-a-Service API key.OPTIONCONTEXT_BASE_URL: The OptionContext endpoint gateway URL (defaults tohttps://mcp.optioncontext.comif omitted).
For local or custom API gateway environments, OPTIONCONTEXT_BASE_URL will fallback automatically to FASTAPI_BASE_URL if defined.
Available Tools
The MCP Server exposes the following powerful market analytical tools to any connected client:
-
suggest_symbols- Description: Search and resolve correct ticker symbols (e.g., searching 'Reliance' to get 'RELIANCE').
- Arguments:
query(string): The search text or company name.
-
get_market_context- Description: Fetch live quote details, last traded price (LTP), volume, and context for Stocks, Indices, and Futures.
- Arguments:
symbol(string): Ticker symbol (e.g. 'NIFTY', 'BANKNIFTY', 'RELIANCE').expiry(string, optional): Expiry cycle ('SPOT', 'NEAR', 'FAR', 'NEXT'). Default is 'SPOT'.asset_type(string, optional): Asset category ('stock', 'index', 'future', 'auto'). Default is 'auto'.api_key(string, optional): Override API Key. If omitted, uses environment key.
-
get_option_chain- Description: Fetch complete option chain matrix including PCR, ATM strike, CE/PE quotes, volume, and Greeks.
- Arguments:
symbol(string): Underlying index or stock ticker (e.g. 'NIFTY', 'BANKNIFTY').api_key(string, optional): Override API Key. If omitted, uses environment key.
-
get_historical_data- Description: Fetch historical daily/intraday OHLCV candles (Requires Plan B subscription).
- Arguments:
symbol(string): Ticker symbol.from_date(string): YYYY-MM-DD.to_date(string): YYYY-MM-DD.interval(string, optional): Candle interval ('ONE_MINUTE', 'FIVE_MINUTE', 'FIFTEEN_MINUTE', 'ONE_DAY'). Default is 'ONE_DAY'.api_key(string, optional): Override API Key.
Disclaimer & Risk Warning:
- Data Delay: All market prices, quotes, and option chains provided represent the last completed minute (minimum 1-minute delayed feed) and are not real-time tick feeds.
- Accuracy: Data is provided on an 'as-is' basis without warranties of absolute accuracy or timeliness.
- No Liability: The service is strictly for analytical/educational purposes. We assume no liability for any trading losses or investment decisions.
- Regulatory Risk Disclosure: Trading in derivatives (options and futures) involves high risk. Past performance is not indicative of future results.
Metadata
Release files for optioncontext-mcp 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| optioncontext_mcp-0.1.3.tar.gz | 4.7 kB | Without provenance | Details for optioncontext_mcp-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| optioncontext_mcp-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for optioncontext_mcp-0.1.3-py3-none-any.whl |
Total release size: 10.9 kB
Release files / optioncontext_mcp-0.1.3.tar.gz
| Download URL | optioncontext_mcp-0.1.3.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2f20c9c700abd6fde96fbcba896d17eaee427a61e0e26ea5cd5be4bfb02cf3c
|
|
BLAKE2b-256 checksum How to use checksums |
6c4f10dd71804710f7d85f4b6fdc56269820b86783ba90c7b4b586c697c13ea0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / optioncontext_mcp-0.1.3-py3-none-any.whl
| Download URL | optioncontext_mcp-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ec17910e7d710ff381dc060f7b21d3a650250f33d4766ed4609bee3be35e61b4
|
|
BLAKE2b-256 checksum How to use checksums |
6a95d0ac9493ebbecedbf13af0f5b3f898272b25f17e921132555d6d97f659b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for optioncontext-mcp 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.