indian-option-mcp
Provides optional integration with Zerodha Kite API for faster data access, including full option chains, tick-level data, and order book depth.
๐ Free Alternative to Sensibull & Opstra
Feature | Sensibull (โน1500/mo) | Opstra (โน999/mo) | Indian Option MCP (Free) |
Option Chain | โ | โ | โ Live from NSE |
Strategy Builder | โ (20+) | โ (15+) | โ 34 strategies |
Greeks Calculator | โ | โ | โ Black-Scholes |
Max Pain | โ | โ | โ |
OI Analysis | โ | โ | โ |
IV Smile/Skew | โ | โ | โ |
Position Sizing | โ | โ | โ |
Margin Estimation | โ | โ | โ |
Probability of Profit | โ | โ | โ |
AI-Powered Analysis | โ | โ | โ Claude AI |
Natural Language | โ | โ | โ "Build me an Iron Condor" |
API/Programmatic | โ | โ | โ MCP Protocol |
Price | โน1500/month | โน999/month | ๐ Forever Free |
Related MCP server: trading-skills
โจ Why Indian Option MCP?
Pain Point | Old Way | With This MCP |
Checking option chains | Open Sensibull/NSE website, scroll, compare | "Show me NIFTY option chain" |
Building strategies | Manually pick strikes, calculate P&L | "Build an iron condor on BANKNIFTY" |
Greeks analysis | Open Black-Scholes calculator, enter values | "What are the Greeks for NIFTY 24000 CE?" |
Finding support/resistance from OI | Stare at OI columns, do mental math | "Where is the highest OI in NIFTY?" |
Position sizing | Spreadsheet + guesswork | "Size a position for โน5L capital, 2% risk" |
๐ 24/7 Availability โ Works Even After Market Hours
Most NSE tools and scrapers break after 3:30 PM IST because NSE takes down the option chain API. This MCP server uses a dual-endpoint fallback architecture:
Time | Data Source | What You Get |
9:15 AM โ 3:30 PM (Market Open) | Primary NSE API | Full chain with IV, Greeks, change-in-OI, bid/ask |
After 3:30 PM (Market Closed) | Fallback derivatives API | Closing snapshot with OI, LTP, volume, strike prices |
No configuration needed. The fallback is automatic. You always get data, any time of day.
๐ Features
๐ Option Chain Tools
Tool | Description |
| Full option chain with strikes, LTP, OI, IV, volume, bid/ask for calls & puts |
| All available expiry dates for any F&O symbol |
| Current spot/underlying price of any stock or index |
๐ข Greeks & Pricing
Tool | Description |
| All Greeks โ Delta, Gamma, Theta, Vega, Rho โ via Black-Scholes |
| Implied Volatility from market price (Newton-Raphson method) |
| Theoretical option price using Black-Scholes model |
| Scenario analysis โ how Greeks change under hypothetical conditions |
๐๏ธ Strategy Builder โ 34 Pre-Built Strategies
Tool | Description |
| Build any of 34 strategies with real market prices, payoff & breakevens |
| Build custom multi-leg strategies with specific strikes |
| Get strategy suggestions based on outlook & risk preference |
| Browse all available strategies by category |
| Payoff/P&L table at expiry across price scenarios |
๐ Open Interest Analysis
Tool | Description |
| Max Pain strike โ where option buyers lose the most |
| Put-Call Ratio (OI, Volume, and Change based) with interpretation |
| OI-based support & resistance levels |
| Change in OI patterns โ emerging support/resistance |
๐ IV Analytics
Tool | Description |
| IV Smile curve + IV Skew across strikes |
| Expected price range by expiry (1ฯ, 1.645ฯ, 1.96ฯ) |
๐ Market Data
Tool | Description |
| NIFTY & BANKNIFTY snapshot โ spot, ATM IV, PCR, lot size |
| Is the NSE market currently open or closed? |
| Lot size for any F&O instrument |
| Next weekly/monthly expiry date |
๐ก๏ธ Risk Management
Tool | Description |
| SPAN + Exposure margin estimate for option strategies |
| POP calculation using log-normal distribution |
| Optimal lot count based on capital & risk tolerance |
๐ Scanners
Tool | Description |
| Find strikes with highest institutional OI buildup |
| Detect abnormally high volume/OI ratio |
๐ฌ MCP Prompts
Prompt | Description |
| Full strategy recommendation workflow โ chains, PCR, max pain, expected move, build & size |
| Comprehensive analysis โ OI, PCR, IV smile, max pain, expected move synthesized |
โก Quick Start
Option 1: npx (Recommended โ Zero Install)
Add this to your Claude Desktop config:
{
"mcpServers": {
"indian-options": {
"command": "npx",
"args": ["-y", "indian-option-mcp"]
}
}
}Restart Claude Desktop. Done. ๐
Option 2: Clone & Build
# Clone the repository
git clone https://github.com/devag7/Indian-Option-MCP.git
cd Indian-Option-MCP
# Install dependencies & build
npm install
npm run buildConfigure Claude Desktop
Add this to your Claude Desktop config file:
OS | Path |
macOS |
|
Windows |
|
Linux |
|
{
"mcpServers": {
"indian-options": {
"command": "node",
"args": ["/absolute/path/to/Indian-Option-MCP/dist/bundle.mjs"],
"env": {
"DATA_PROVIDER": "nse"
}
}
}
}That's it. Restart Claude Desktop and start asking about Indian options! ๐
๐ฌ Example Conversations
Once configured, just talk naturally to Claude:
You: Show me the NIFTY option chain for the nearest expiry
You: Build an iron condor on BANKNIFTY with 3 strikes OTM
You: What's the max pain for NIFTY? Where is OI-based support?
You: I'm bullish on RELIANCE. Suggest a strategy with low risk.
You: Calculate Greeks for NIFTY 24500 CE, 10 days to expiry, 14% IV
You: Show the expected move for NIFTY at 95% confidence
You: Size a short straddle on BANKNIFTY for โน10L capital, max 2% risk๐๏ธ Strategy Library
All 34 pre-built strategies, ready to deploy with live market prices:
๐ Bullish
Strategy | Legs |
| 1 |
| 2 |
| 2 |
| 2 |
| 2 |
| 2 |
| 3 |
| 2 |
| 3 |
๐ Bearish
Strategy | Legs |
| 1 |
| 2 |
| 2 |
| 2 |
| 2 |
| 2 |
| 2 |
| 2 |
โ๏ธ Neutral
Strategy | Legs |
| 2 |
| 2 |
| 4 |
| 4 |
| 3 |
| 2 |
| 4 |
๐ Volatility
Strategy | Legs |
| 2 |
| 2 |
| 2 |
| 2 |
| 2 |
| 2 |
| 1 |
| 1 |
| 3 |
| 3 |
๐ก Tip: Use
list_strategiesto browse by category, orsuggest_strategyto get recommendations based on your market view.
๐ Data Providers
Provider | API Key | Features | Speed |
NSE India (default) | โ Not needed | Full option chains, OI, IV, volume, spot prices | โก Fast |
Zerodha Kite (optional) | โ Required | Full option chains, tick-level data, order book depth | โกโก Faster |
NSE (Default โ Zero Config)
Works out of the box. The server fetches data directly from NSE India's public endpoints.
# No configuration needed โ just build and run
DATA_PROVIDER=nse # this is the defaultZerodha Kite (Optional)
For traders with a Zerodha account who want faster data and deeper order book:
DATA_PROVIDER=zerodha
KITE_API_KEY=your_api_key
KITE_API_SECRET=your_api_secret
KITE_ACCESS_TOKEN=your_access_token # refreshed dailyGet credentials from developers.kite.trade
โ๏ธ Environment Variables
Copy .env.example to .env and configure as needed:
cp .env.example .envVariable | Default | Description |
|
| Data source โ |
| โ | Zerodha Kite API key (only if |
| โ | Zerodha Kite API secret (only if |
| โ | Zerodha session token, refreshed daily (only if |
|
| Real-time data cache lifetime in seconds |
|
| Instrument master cache lifetime in hours |
|
| Annual risk-free rate for Black-Scholes (7% = Indian 10Y bond) |
|
| Logging verbosity โ |
๐๏ธ Architecture
indian-option-mcp/
โโโ src/
โ โโโ index.ts # Entry point โ stdio transport
โ โโโ server.ts # MCP server โ all 35+ tools registered here
โ โโโ config.ts # Zod-validated env configuration
โ โ
โ โโโ data/
โ โ โโโ providers/
โ โ โ โโโ base.provider.ts # Abstract data provider interface
โ โ โ โโโ nse.provider.ts # NSE India scraper (default)
โ โ โ โโโ zerodha.provider.ts # Kite Connect API client
โ โ โโโ provider-factory.ts # Provider factory pattern
โ โ โโโ cache/
โ โ โ โโโ memory-cache.ts # TTL-based in-memory cache
โ โ โ โโโ instrument-cache.ts # Long-lived instrument master cache
โ โ โโโ constants/
โ โ โ โโโ lot-sizes.ts # F&O lot sizes (NIFTY=75, BANKNIFTY=30, etc.)
โ โ โ โโโ expiry-calendar.ts # Expiry date calculations
โ โ โ โโโ indices.ts # Index metadata & strike intervals
โ โ โโโ models/
โ โ โโโ option-chain.ts # Option chain data models
โ โ โโโ instrument.ts # Instrument definitions
โ โ โโโ quote.ts # Quote/tick models
โ โ โโโ strategy.ts # Strategy type definitions
โ โ โโโ index.ts # Model barrel exports
โ โ
โ โโโ engine/
โ โ โโโ black-scholes.ts # Option pricing & Greeks (ฮ, ฮ, ฮ, ฮฝ, ฯ)
โ โ โโโ implied-volatility.ts # IV solver (Newton-Raphson)
โ โ โโโ iv-surface.ts # IV Smile, Skew, Rank, Percentile, HV
โ โ โโโ strategy-builder.ts # 34 strategy templates + builder
โ โ โโโ payoff.ts # Payoff/P&L at expiry engine
โ โ โโโ max-pain.ts # Max Pain calculator
โ โ โโโ pcr.ts # Put-Call Ratio analyzer
โ โ โโโ oi-analysis.ts # OI distribution & activity detection
โ โ โโโ margin-calculator.ts # SPAN margin estimator
โ โ โโโ risk-metrics.ts # POP, Kelly, position sizing
โ โ
โ โโโ utils/
โ โโโ date.ts # Market hours, DTE, expiry helpers
โ โโโ format.ts # Currency, number, OI formatting
โ โโโ math.ts # Normal CDF, statistical functions
โ โโโ logger.ts # Stderr-only logger (MCP-safe)
โ
โโโ dist/ # Compiled output
โโโ package.json
โโโ tsconfig.json
โโโ .env.exampleDesign Principles
Zero external trading dependencies โ only
@modelcontextprotocol/sdkandzodProvider pattern โ swap between NSE and Zerodha with one env variable
Pure computation engine โ all pricing, Greeks, and analytics are self-contained
MCP-safe logging โ all output goes to
stderr, neverstdout(protects stdio transport)Startup validation โ Zod schemas validate all config at boot, not at runtime
๐ ๏ธ Development
# Watch mode (recompile on save)
npm run dev
# Type-check without emitting
npm run lint
# Run tests
npm test
# Inspect with MCP Inspector
npm run inspect
# Clean build artifacts
npm run clean๐ค Contributing
Contributions are welcome! Here's how to get started:
Fork the repository
Create a feature branch โ
git checkout -b feat/my-featureCommit your changes โ
git commit -m "feat: add my feature"Push to your branch โ
git push origin feat/my-featureOpen a Pull Request
Areas for Contribution
๐ New strategies (e.g., seagull, condor variations)
๐ Additional data providers (Upstox, Angel One, etc.)
๐ Enhanced analytics (IV term structure, correlation analysis)
๐งช Test coverage for engine modules
๐ Documentation improvements
๐ License
This project is licensed under the MIT License โ see the LICENSE file for details.
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/devag7/Indian-Option-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server