NSE MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NSE MCP Summarize RELIANCE on January 15, 2025 including open, close, return, VWAP, and bars."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NSE MCP
Explore NSE market data with a local analytics engine and an AI assistant that can discover and use its tools through the Model Context Protocol (MCP). The project covers the path from raw market files to validated Parquet, time-aware analytics, and an optional AWS-hosted MCP endpoint.
What you can do
Prepare a clean dataset: validate raw OHLCV files against the NIFTY 50 symbol index and write partitioned Parquet for efficient queries.
Ask focused market questions: retrieve candles, session statistics, price extremes, volume buckets, common indicators, and daily symbol comparisons.
Connect AI clients through MCP: discover typed analytics tools at runtime over local stdio or Streamable HTTP, then answer questions with one or more tool calls.
Inspect the work: optionally trace model and tool activity with Langfuse, and independently compare remote results with local calculations.
Run the service on AWS: deploy the read-only analytics server as a Lambda container behind an authenticated Function URL, with Terraform-managed infrastructure and CloudWatch logs.
Related MCP server: MyFinancial Market Data MCP
Architecture
The local Python client discovers analytics tools over MCP. For remote use, an authenticated Lambda Function URL fronts a stateless Lambda service; Terraform manages the disposable service resources while the processed S3 dataset remains read-only.

Data flow
Ingestion validates raw OHLCV files against the NIFTY 50 index and writes partitioned Parquet. DuckDB and PyArrow read only the needed partitions to answer typed MCP tool calls; the client turns tool results into a natural-language response. Optional traces and AWS logs support inspection.

The analytics layer uses predefined, parameterized queries. Timestamps are timezone-aware; trading dates and session buckets follow India time. Missing values remain explicit, and invalid inputs return stable errors. The same tools work against local files or the read-only S3 dataset.
Future development scope
The roadmap prioritizes an interactive CLI, reusable investment prompts, and MCP data-discovery tools (P0); a web UI, interactive charts, expanded analytics, and a market screener (P1); portfolio simulation, research workspaces, and advanced screening (P2); and conversation memory, multi-tool query handling, and answer verification (P3). The MCP analytics server remains independent of the frontend, while CLI and web clients share a service layer. Tool contracts should use typed parameters, bounded outputs, predictable errors, and explicit data-availability metadata. See the full future development scope.
Try it locally
Install dependencies and process the raw files indexed by data/index/NIFTY50.csv:
uv sync
uv run python scripts/ingestion.pyStart the MCP server:
uv run uvicorn server.main:app --host 127.0.0.1 --port 8000In another terminal, configure OPENAI_API_KEY in your environment and ask a question about a symbol and date present in your dataset:
uv run python -m client.main --server http://127.0.0.1:8000/mcp \
--prompt 'Summarize RELIANCE on January 15, 2025, including open, close, return, VWAP, and number of bars.'The client discovers the server's tools and schemas at runtime, validates model arguments, and executes the selected analytics calls. See the tutorial for analytics examples, MCP inspection, tracing, remote verification, and deployment workflows.
Documentation
Tutorial: run ingestion, analytics, the local MCP client, and optional remote workflows.
Remote demo: walk through the AWS-hosted MCP analytics flow and its verification steps.
Project documentation: architecture, tool contracts, deployment boundaries, and verification evidence.
Feature records: retained requirements, plans, implementation journals, and focused feature tutorials.
Development
Run the test suite with the project's Python environment:
uv run --no-project --with pytest --python .venv/bin/python -- python -m pytest tests/ -qAvailable Tools
6 toolscompare_symbolsA
Compare at least two symbols using daily metrics on their common trading dates.
Inputs: arguments (required). Returns: Comparison metrics and the dates shared by every requested symbol.
compute_indicatorsC
Calculate SMA, EMA, RSI, or ATR values with prior-candle warm-up and no look-ahead.
Inputs: arguments (required). Returns: Timestamped closing prices, indicator values, and readiness status.
get_barsC
Return ordered OHLCV candles for one symbol and an inclusive UTC time range.
Inputs: arguments (required). Returns: Result schema returned by :func:`get_bars`.
get_price_extremesB
Find the highest high and lowest low, with their earliest timestamps, in a UTC range.
Inputs: arguments (required). Returns: Range extremes and their earliest matching timestamps.
get_volume_statsB
Summarize candle volumes and chronological hourly or daily IST bucket totals.
Inputs: arguments (required). Returns: Candle-level volume statistics and IST bucket totals.
intraday_statsC
Summarize a symbol's session on an IST date, including OHLC, volume, VWAP, and returns.
Inputs: arguments (required). Returns: Session summary; unavailable values are ``None`` for empty/undefined data.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
The six tools have mostly distinct purposes: raw candles, session summary, price extremes, volume aggregates, indicators, and cross-symbol comparison. Some overlap exists around volume and high/low summaries, especially between intraday_stats, get_volume_stats, and get_price_extremes, but the descriptions clarify the intended outputs.
Five tools follow a clear verb_noun snake_case pattern (get_price_extremes, get_volume_stats, get_bars, compute_indicators, compare_symbols). intraday_stats is the minor deviation as a noun-only name, but the set remains readable and predictable.
Six tools are well-scoped for an NSE market-data analysis server. Each tool covers a distinct analytical need without excessive granularity.
The surface covers OHLCV retrieval, session/volume summaries, price extremes, indicators, and symbol comparison, which supports core market-analysis workflows. Minor gaps exist around symbol discovery or a direct latest-quote tool, but agents can work around these using get_bars and known symbols.
Maintenance
Related MCP Connectors
Hosted MCP server for Indian NSE/BSE stock research: 59 tools for quotes, financials and ratios, peers, shareholding and pledge, filings with extracted facts, screens, F&O and FII/DII context. Source and freshness on every answer; no buy/sell calls.
NSE/BSE stock data via Tickertape as JSON: index lists, screener, 10-year fundamentals.
Live crypto + IDX stock market intelligence for AI agents — 19 tools, no API key.
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time and historical Indian stock market data from NSE and BSE exchanges with 66 tools covering quotes, options chains, corporate actions, IPOs, and market analytics for LLM-powered financial analysis.43 npm13MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to query live NSE & BSE stock market data, with 55 tools covering quotes, financials, screeners, FII/DII flows, option chains, and company filings.55MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search, screen, and analyze 8,200+ NSE and BSE listed securities through 55 tools covering live quotes, financials, technical indicators, FII/DII flows, option chains, filings, IPOs, bulk deals, and portfolio P&L.-
- AlicenseNot gradedqualityBmaintenanceGives AI assistants live, structured data on all 8,200+ NSE and BSE listed stocks through 55 tools, covering quotes, financials, a 326-ratio screener, technical indicators, FII/DII flows, option chains and IV, corporate filings, IPOs, bulk deals and portfolio P&L. Runs either remotely over OAuth or locally over stdio, so it works in Claude, ChatGPT, Cursor, VS Code, Codex, Gemini CLI and any other MCP client.MIT