About Nifty Technical Indicators
Nifty Technical Indicators is an MCP server for retrieving market data and calculating technical indicators for NSE-listed stocks. It uses Yahoo Finance data and returns indicator values and the previous day's OHLCV as JSON.
Key features
- 01Fetch one year of daily NSE stock data
- 02Calculate SMA50, MACD, RSI14, and ATR
- 03Calculate Bollinger Bands and average volume
- 04Return previous-day OHLCV as JSON
Use cases
- 01Review technical indicators for an NSE ticker
- 02Retrieve a stock's previous-day OHLCV
- 03Provide indicator data to an MCP-compatible analysis workflow
MCP support
It exposes the `get_technical_indicators` tool to MCP clients over local stdio transport. The tool accepts an NSE ticker and returns indicator values as JSON.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMENifty Technical Indicators MCP Server
This project provides a Model Context Protocol (MCP) server for calculating popular technical indicators for stocks listed on the National Stock Exchange of India (NSE). It uses TA-Lib for all indicator calculations and can be run locally as an MCP server using stdio transport.
Features
- Fetches 1 year of daily OHLCV data for any NSE ticker using Yahoo Finance
- Calculates key technical indicators:
- SMA50 (50-day Simple Moving Average)
- MACD (Moving Average Convergence Divergence)
- RSI14 (14-day Relative Strength Index)
- ATR (Average True Range)
- Bollinger Bands (20-day)
- 20-day Average Volume
- Returns previous day's Open, High, Low, Close, and Volume
- Exposes a single MCP tool:
get_technical_indicators - Output is a clean JSON object with all indicator values
Requirements
- Python 3.8+
- TA-Lib
- yfinance
- mcp (Model Context Protocol server)
Installation
- Clone the repository:
git clone https://github.com/sasikiranaratla/nifty_technical_indicators_mcp.git cd nifty_technical_indicators_mcp - Create and activate a virtual environment:
python -m venv venv venv\Scripts\activate # On Windows source venv/bin/activate # On Linux/Mac - Install dependencies:
Ifpip install -r requirements.txtrequirements.txtis missing, install manually:pip install pandas TA-Lib yfinance mcp
Usage: Run as MCP Server (stdio)
To run the MCP server locally using stdio transport:
python main.py
Or, if using a virtual environment:
venv\Scripts\python.exe main.py # On Windows
source venv/bin/activate && python main.py # On Linux/Mac
This will start the MCP server and expose the get_technical_indicators tool. You can connect to it using any MCP-compatible client or integration.
MCP Tool: get_technical_indicators
- Input:
ticker(str) — NSE stock symbol (e.g., "RELIANCE", "TCS") - Output: JSON object with:
- SMA50
- MACD_Line, MACD_Signal, MACD_Hist
- RSI14
- ATR
- BB_Upper, BB_Middle, BB_Lower
- Vol_Avg20
- Prev_OHLCV: {Open, High, Low, Close, Volume} for previous day
Example MCP Request
{
"tool": "get_technical_indicators",
"args": {"ticker": "RELIANCE"}
}
Example MCP Response
{
"SMA50": 2795.12,
"MACD_Line": 12.34,
"MACD_Signal": 10.56,
"MACD_Hist": 1.78,
"RSI14": 55.67,
"ATR": 45.12,
"BB_Upper": 2900.45,
"BB_Middle": 2750.23,
"BB_Lower": 2600.01,
"Vol_Avg20": 1234567.0,
"Prev_OHLCV": {
"Open": 2780.0,
"High": 2800.0,
"Low": 2770.0,
"Close": 2795.0,
"Volume": 1500000.0
}
}
Notes
- All calculations use TA-Lib for reliability and speed.
- Data is fetched from Yahoo Finance via yfinance.
- MCP server can be integrated with any LLM or automation platform supporting MCP.
License
MIT
Author
sasikiranaratla
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.