Excluding trading endpoints entirely is a stronger guarantee than a permission flag — a misread instruction cannot become an order, because the capability is not there. The cost of running it is the access token, which expires every 24 hours and has no automatic refresh yet, so a long-lived agent will need that handled. Live quotes only mean anything during market hours; outside them, intraday calls legitimately return nothing.
An MCP server over the Upstox trading API, covering NSE, BSE and MCX instruments. It carries market data, a set of technical-analysis calculators, and read access to your own account, with trading endpoints deliberately left out: no order placement, no modification, no fund transfers.
- Market data — `market_get_live_quote` for last traded price, OHLC and volume, `market_search_instruments` to find a symbol, `market_get_instrument_details` for its metadata, plus `market_get_historical_data` and `market_get_intraday_candles`
- Individual indicator tools rather than one opaque call: `analysis_calculate_rsi`, `analysis_calculate_macd`, `analysis_calculate_adx`, `analysis_calculate_moving_averages`, `analysis_calculate_bollinger_bands`, `analysis_calculate_stochastic`, `analysis_calculate_williams_r`, `analysis_calculate_volatility_metrics` and `analysis_calculate_support_resistance`
- `analysis_get_technical_analysis` for a combined report — price, the indicators you name, detected candlestick patterns, trend context and support and resistance levels in one response
- `analysis_calculate_fibonacci_levels` and `analysis_analyze_candlestick_patterns` for retracements and pattern detection
- Read-only account access — `account_get_summary`, `account_get_user_margin`, `account_get_holdings_list`, `account_get_positions_list`, `account_get_order_book` and `account_get_trade_history`
- A standardised JSON envelope on every tool, so a failure comes back as structured data rather than prose
Python 3.10 or higher, an Upstox trading account, and API credentials from the Upstox developer console. Install with `pip install -e .`, which puts `upstox-mcp` on the path; the package is `upstock-mcp`, version 2.2.0. `UPSTOX_ACCESS_TOKEN` is required and expires every 24 hours, so it needs refreshing daily; `UPSTOX_API_KEY` and `UPSTOX_API_SECRET` are optional. Transport is stdio by default and HTTP with `--transport http`; Docker and docker-compose files ship with it. A remote deployment can take credentials per request as `X-Upstox-API-Key`, `X-Upstox-API-Secret` and `X-Upstox-Access-Token` headers, which is how several people share one instance.
One command plus a key — npx -y mcp-remote https://mcp-server-upstox.onrender.com/mcp --header X-Upstox-API-Key:YOUR_API_KEY --header X-Upstox-API-Secret:YOUR_API_SECRET --header X-Upstox-Access-Token:YOUR_ACCESS_TOKEN, then supply credentials
