loading…
Search for a command to run...
loading…
Provides real-time Indian stock market analysis, including live price tracking, technical indicators, and options Greeks calculations for NSE/BSE securities. It
Provides real-time Indian stock market analysis, including live price tracking, technical indicators, and options Greeks calculations for NSE/BSE securities. It also enables news-based sentiment analysis, market scanning for NIFTY 50 stocks, and virtual portfolio management.
A Model Context Protocol (MCP) server for Indian stock market analysis providing real-time market data, technical analysis, options analytics, and portfolio management using 100% free APIs.
IndiaQuant MCP provides 11 tools for NSE/BSE market analysis:
IndiaQuant/
├── server.py # MCP server entry point (stdio transport)
├── market_data/
│ └── fetcher.py # Live NSE/BSE price fetching (yfinance)
├── trading_signals/
│ └── signal_generator.py # RSI, MACD, Bollinger Bands (pandas-ta)
├── options_analysis/
│ ├── options_analyzer.py # Options chain data (yfinance)
│ ├── greeks.py # Black-Scholes Greeks implementation
│ └── unusual_activity.py # Volume/OI spike detection
├── utils/
│ ├── sentiment.py # News sentiment analysis
│ └── market_scanner.py # NIFTY 50 scanner, sector heatmap
├── portfolio_management/
│ └── portfolio_manager.py # Virtual portfolio with SQLite
└── database/
└── portfolio.db # SQLite database
1. Modular Architecture
2. 100% Free API Stack
3. MCP Protocol Implementation
What Works:
Known Limitations:
Design Justification:
Check if server is running.
Parameters: None
Returns: {"status": "server running"}
Fetch live NSE stock price.
Parameters:
symbol (string): Stock symbol (e.g., 'RELIANCE', 'TCS')Example Response:
{
"symbol": "RELIANCE.NS",
"current_price": 1408.40,
"change_percent": 1.54,
"volume": 5234567
}
Generate BUY/SELL/HOLD signals using RSI, MACD, Bollinger Bands.
Parameters:
symbol (string): Stock symbolperiod (string, optional): '1d', '5d', '1mo', '3mo', '1y' (default: '3mo')Example Response:
{
"symbol": "TCS",
"signal": "BUY",
"confidence": 75,
"reasoning": "RSI oversold (28.5), MACD bullish crossover"
}
Fetch options chain with calls, puts, OI, PCR.
Parameters:
symbol (string): Stock symbolexpiry (string, optional): Expiry date YYYY-MM-DDNote: Limited data availability for NSE stocks (see Limitations section)
Calculate Black-Scholes Greeks from scratch.
Parameters:
symbol (string): Stock symbolstrike_price (number): Strike priceexpiry_date (string): YYYY-MM-DDoption_type (string): 'call' or 'put'volatility (number, optional): IV (default: 0.25)risk_free_rate (number, optional): Rate (default: 0.065)Example Response:
{
"greeks": {
"delta": 0.575,
"gamma": 0.0057,
"theta": -1.107,
"vega": 1.075,
"rho": 0.295
}
}
Implementation: Pure mathematical Black-Scholes using scipy.stats
Detect volume/OI spikes in options.
Parameters:
symbol (string): Stock symbolvolume_threshold (number, optional): Spike multiplier (default: 3.0)oi_threshold (number, optional): OI multiplier (default: 2.0)Scan NIFTY 50 for overbought/oversold stocks.
Parameters:
rsi_threshold (number, optional): RSI threshold (default: 30)condition (string, optional): 'oversold' or 'overbought'Sector performance heatmap.
Parameters:
period (string, optional): '1d', '5d', '1mo', '3mo' (default: '1d')Place virtual trade in portfolio.
Parameters:
symbol (string): Stock symbolquantity (number): Number of sharesside (string): 'buy' or 'sell'price (number, optional): Price (defaults to live market price)View portfolio positions with real-time P&L.
Parameters: None
Analyze news sentiment using NewsAPI + TextBlob.
Parameters:
symbol (string): Stock symboldays (number, optional): Days to look back (default: 7)Note: Free tier limited to 100 requests/day
# Clone repository
git clone https://github.com/Shirshak-dugtal/mcp.git
cd mcp
# Install dependencies
pip install -r requirements.txt
# Configure environment
echo "NEWS_API_KEY=your_key_here" > .env
# Test server
python server.py
mcp>=1.0.0
yfinance>=0.2.40
pandas>=2.0.0
pandas-ta>=0.4.0
numpy>=1.24.0
scipy>=1.10.0
newsapi-python>=0.2.7
textblob>=0.18.0
python-dotenv>=1.0.0
Windows:
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"IndiaQuant": {
"command": "python",
"args": ["D:/code/mcp/IndiaQuant/server.py"]
}
}
}
Replace path with your actual installation path.
macOS/Linux:
Edit ~/.config/Claude/claude_desktop_config.json with appropriate paths.
Restart Claude Desktop completely (exit from system tray).
Verify: Settings → Developer → Local MCP Server → IndiaQuant should show green checkmark.
get_live_price:
{"symbol": "RELIANCE.NS", "current_price": 1408.40, "change_percent": 1.54}
generate_trading_signal:
{"symbol": "TCS", "signal": "BUY", "confidence": 75, "reasoning": "RSI oversold, MACD bullish"}
calculate_greeks:
{"delta": 0.575, "gamma": 0.0057, "theta": -1.107, "vega": 1.075}
scan_nifty50:
{"matches": [{"symbol": "TATAMOTORS", "rsi": 28.3, "price": 945.20}]}
get_portfolio_pnl:
{"total_invested": 44580, "total_pnl": 314, "pnl_percent": 0.70}
MIT License
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"indiaquant-mcp-server": {
"command": "npx",
"args": []
}
}
}PRs, issues, code search, CI status
Database, auth and storage
Reference / test server with prompts, resources, and tools.
Secure file operations with configurable access controls.