原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。使用 Google 登录即可撰写评价。原型 · 每 30 分钟更新
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Indian NSE Stock Insights

作者:alokbarnwal版本 1.0.1i★ 1i在云端运行官方网站 ↗
注册名称io.github.alokbarnwal/nse-public-mcp

安装方法

What it does

Analyze any Nifty 500 stock with AI — price action, demand zones, technicals & screener.

  • Connects 在云端运行
  • Account or key No key needed
  • Category 其他

为什么排在这里

此项在“连接 AI 的应用”标签中,该标签不使用星标,按以下顺序排列

1. 在 Claude 连接器目录中否
2. 团队实测过否
3. 适合泰国用户否
4. 不计星标的使用量11/100热度 0 · 新鲜度 3 · 仍在响应 8 · 用户喜欢 +0
5. 登记日期2026-04-30

用户喜欢: 0 · 最多加 5 分(每人 1 分),不能用钱买。

质量: 基础检查通过 4/5 项(仅展示,不用于排序)

安装

选择你使用的 AI 应用,然后复制设置。

用一句话让 AI 帮你安装

请帮我安装 Indian NSE Stock Insights。按照 https://mcp.popnx.com/i/alokbarnwal-nse-public-mcp.md 操作,先把命令给我看,等我同意后再运行。

粘贴到能在你电脑上工作的 AI(如 Claude Code、Cursor)。它会读取我们的步骤,先给你看命令,等你同意。无需密钥,无需注册。 · 查看 AI 会读取的全文

通过 4/5 项检查 · 你的提问会经过开发者的服务器(stockmcp.alokbarnwal.com) · ✓ 命令已检查 2026年11月13日

第一步:你用哪个 AI?

选择你用的应用,步骤会显示在下方。

可连接 Claude · 约 2 分钟

不需要密钥,不用安装程序 · 在 claude.ai 或桌面应用设置一次,即可在聊天中使用 · 免费账户可添加 1 个 · Team/Enterprise 方案由所有者(Owner)添加

  1. 打开 Claude 的 Connectors 页面

    CustomizeConnectors

    CustomizeConnectors1Add2https://…3Add4
  2. 点击“Add” → “Custom” → “Web”,填写这 2 项

    把这里的内容复制到 Claude 中同名的输入框,然后点击 Continue

    Name · 名称Indian NSE Stock Insights
    Remote MCP server URL · 地址https://stockmcp.alokbarnwal.com/mcp

    在 Claude 检测到的登录设置页点击 Continue · Authentication 按作者说明选择(Sign in now、Sign in when needed 或 No sign in),然后点击 Add

  3. 在聊天中开启

    +ConnectorsIndian NSE Stock Insights

  4. 试一试

    用 Indian NSE Stock Insights 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude 说正在使用 Indian NSE Stock Insights,或回答中出现 Indian NSE Stock Insights 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

能否连接 ChatGPT 取决于方案

完整 MCP:网页版 ChatGPT Business、Enterprise 或 Edu · Pro:以读取/获取权限连接,修改数据的工具可能用不了 · Plus:官方文档尚未确认,如果在插件页看到添加自定义 MCP 的选项可以试试 · 仅限网页

  1. 在网页版 ChatGPT 打开添加 MCP 的页面

    Plugins+Add custom MCP server

    ChatGPTPlugins1+2https://…3Create4
  2. 填写名称和地址

    输入名称,在 Connection 下粘贴地址,勾选风险提示,然后点击 Create as a plugin

    Name · 名称Indian NSE Stock Insights
    Connection · 地址https://stockmcp.alokbarnwal.com/mcp
  3. 在聊天中选择 Indian NSE Stock Insights

    开启新聊天,输入前先从插件列表中选择 Indian NSE Stock Insights

  4. 试一试

    用 Indian NSE Stock Insights 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 ChatGPT 说正在使用 Indian NSE Stock Insights,或回答中出现 Indian NSE Stock Insights 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 OpenAI 帮助页面核实 · 你的界面可能因版本略有不同

可连接 Claude Code · 约 2 分钟

不需要密钥,不用安装程序

  1. 打开终端

    Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell

  2. 粘贴这条命令并按 Enter

    claude mcp add --transport http --scope user nse-public https://stockmcp.alokbarnwal.com/mcp
  3. 在 Claude Code 中输入 /mcp

    应能看到 Indian NSE Stock Insights 在列表中并显示已连接

  4. 试一试

    用 Indian NSE Stock Insights 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude Code 说正在使用 Indian NSE Stock Insights,或回答中出现 Indian NSE Stock Insights 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

可连接 Cursor · 约 2 分钟

不需要密钥,不用安装程序

  1. 点击这个按钮打开 Cursor

    在 Cursor 中打开

    Cursor 会请你确认安装,点击 Install

  2. 在 Cursor 中以 Agent 模式打开 AI 聊天

  3. 试一试

    用 Indian NSE Stock Insights 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Cursor 说正在使用 Indian NSE Stock Insights,或回答中出现 Indian NSE Stock Insights 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同

可连接 VS Code · 约 2 分钟

不需要密钥,不用安装程序

  1. 点击这个按钮打开 VS Code

    在 VS Code 中打开

    VS Code 会请你确认安装,点击 Install

  2. 在 VS Code 中以 Agent 模式打开 AI 聊天

  3. 试一试

    用 Indian NSE Stock Insights 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 VS Code 说正在使用 Indian NSE Stock Insights,或回答中出现 Indian NSE Stock Insights 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同

其他支持 MCP 的应用(如 Windsurf、Zed、Gemini CLI)添加方式各不相同,请在应用列表中查看

查看所有支持 MCP 的应用 →

通过网页连接的应用使用的地址

地址https://stockmcp.alokbarnwal.com/mcp

JSON 设置在下方“开发者专用”中

卡住了?问问正在用 Indian NSE Stock Insights 的人💬 讨论 →
开发者专用:终端命令和 JSON 设置

通过网页连接

Claude Code

claude mcp add --transport http --scope user nse-public https://stockmcp.alokbarnwal.com/mcp

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "nse-public": {
      "url": "https://stockmcp.alokbarnwal.com/mcp"
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "nse-public": {
      "type": "http",
      "url": "https://stockmcp.alokbarnwal.com/mcp"
    }
  }
}

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

一览

每周下载量i
不在 npm/PyPI 上
连接方式
在云端运行
传输方式
streamable-http
最新版本i
1.0.1
分类i
其他
发布到注册中心i
2026年5月1日
代码最后更新i
2026年5月1日
最近检查
2026年11月16日
作者
alokbarnwal
注册状态
活跃

哪些应用可以使用它

依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。

通过互联网连接,适用于

ClaudeChatGPTGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatOpen WebUIRaycast

全部应用及其优缺点 →

它能做什么

工具名称和描述与服务器在 2026年11月16日 报告的完全一致。这些内容由作者撰写,不是我们写的;我们以纯文本形式显示。

  • get_stock_quote

    Latest price snapshot for an NSE stock — last close, prev close, change %, day H/L, volume.

  • get_ohlc_data

    Recent OHLCV candles. timeframe in {daily, 15min, 5min}; limit capped at 500; newest first.

  • get_technical_indicators

    Latest technical indicators (EMAs, SMAs, RSI, MACD, BB, ADX, Stoch, ATR, OBV, VWAP).

  • get_support_resistance

    Pivot points + historical support/resistance levels, ordered by price desc.

  • get_demand_supply_zones

    Demand/supply zones (DBR/RBR/RBD/DBD) split into demand_zones and supply_zones.

  • get_candlestick_patterns

    Recent single-bar candlestick patterns (HAMMER, DOJI, ENGULFING, ...) newest first.

  • get_chart_patterns

    Multi-bar chart patterns (DOUBLE_TOP, HEAD_AND_SHOULDERS, ...). 'ACTIVE' = PENDING/CONFIRMED.

  • get_fibonacci_levels

    Latest fibonacci retracement swings (UP/DOWN) with 236/382/500/618/786 levels.

  • get_volume_analysis

    Volume diagnostic: top 5min hotspots + peak slot + OBV 20-day trend + today/20-day volume ratio.

  • get_market_overview

    Market-wide snapshot: indices, top_gainers, top_losers, most_active, breadth.

  • compare_stocks

    Side-by-side comparison of 2-5 symbols: quote, RSI/MACD/ADX, trend, 30d return, latest pattern.

  • screen_stocks

    Filter the active universe. Keys: rsi_min, rsi_max, adx_min, trend, near_demand_zone, pattern, min_volume_ratio, sector. At least one required.

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月19日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 alokbarnwal 验证,该账户拥有此仓库

  • ! 注意

    仍在维护

    代码最后更新于7个月前,已超过 6 个月

  • ✓ 通过

    有许可证

    使用 MIT

  • ✓ 通过

    端点有响应

    在 445 毫秒内响应(HTTP 200)

  • – 不适用

    使用 OAuth 登录

    无需登录

  • ✓ 通过

    工具描述中没有隐藏指令

    已读取 12 个工具描述,未发现针对 AI 的隐藏指令

我们检查什么 → · JSON

作者:申请重新检查或报告信息错误
给作者:在 README 中加徽章

如果你是作者,可把这段代码贴到 README。徽章会链接回本页。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/alokbarnwal-nse-public-mcp.svg)](https://mcp.popnx.com/en/servers/alokbarnwal-nse-public-mcp)

讨论

提问、分享技巧或报告无法使用。按“有帮助”数量排序。

还没有帖子,欢迎第一个提问或分享。

此处内容由用户撰写,不代表 PopNx 团队。

登录后发帖

用户评价

还没有评价

登录后写评价

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 20693 个服务器的 86%
  • 发布到注册中心的时间比此分类中其他 20693 个服务器的 5% 更新
  • 基础检查结果等于或优于此分类中其他 20693 个服务器的 60%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Indian NSE Stock Insights 安全吗?

它在 5 项适用的基础检查中通过了 4 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在作者的云端运行。通过互联网连接,无需安装,但你发送的内容会经过作者的服务器。

它还在维护吗?

GitHub 仓库最后更新于7个月前,最新版本(1.0.1)于7个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。它通过 URL 连接,因此也能用于接受远程 MCP 的应用,例如网页版 ChatGPT(Business 及以上为完整 MCP;Pro 为只读)。

有什么可以替代它?

同一分类中有:World Monitor, openstatus, Oh My Posh Validator, Strata, Jitsu

功能相近的其他选择

同一分类、其他作者、命令已通过检查。官方的排在前面,再按星标排序。

如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

World Monitor

Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 100 tools.

作者:koala73广泛使用★ 9.1万3天前更新

在云端运行✓ 服务方 · worldmonitor.app

openstatus

Manage monitors, status pages, incidents and maintenances in your openstatus workspace.

作者:openstatusHQ广泛使用★ 92742个月前更新

在云端运行✓ 服务方 · openstatus.dev

Strata

MCP server for progressive tool usage at any scale (see https://klavis.ai)

作者:Klavis-AI正在增长★ 582514个月前更新

在云端运行仓库已归档✓ klavis.ai

Jitsu

Manage Jitsu data pipelines: destinations, streams, connections, functions, live events.

作者:jitsucom广泛使用★ 51364个月前更新

在云端运行✓ 服务方 · jitsu.com
与相似项目对比
本项
Indian NSE Stock Insights
World MonitoropenstatusOh My Posh ValidatorStrataJitsu
运行位置在云端运行,无需安装在云端运行,无需安装在云端运行,无需安装在云端运行,无需安装在云端运行,无需安装在云端运行,无需安装
需要密钥否否否否否否
可在 Claude 中按 + 添加否否否否否否
基础检查4/54/44/44/41/44/4
许可证MITAGPL-3.0AGPL-3.0MITApache-2.0MIT
价格登记中未列出费用登记中未列出费用登记中未列出费用登记中未列出费用登记中未列出费用登记中未列出费用

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

Indian NSE Stock Insights 🇮🇳📈

Public MCP server for Indian stock market analysis — Nifty 500 universe, 12 tools, 3 timeframes.

Built with FastMCP · Data from yfinance · Hosted at stockmcp.alokbarnwal.com

Educational only. Not investment advice. See DISCLAIMER.md.


Quick Connect — 30 Seconds

Claude.ai → Settings → Connectors → Add custom MCP connector:

Name: Indian NSE Stock Insights

URL: https://stockmcp.alokbarnwal.com/mcp

That's it. Start asking questions about Indian stocks.


12 Tools

#ToolParametersWhat it returns
1get_stock_quotesymbolLast close, prev close, change %, day H/L, volume
2get_ohlc_datasymbol, timeframe?, limit?OHLCV candles (up to 500, newest first)
3get_technical_indicatorssymbol, timeframe?EMAs, SMAs, RSI, MACD, Bollinger, ADX, Stoch, ATR, OBV, VWAP
4get_support_resistancesymbol, timeframe?Pivot points + historical S/R levels
5get_demand_supply_zonessymbol, timeframe?, status?Demand/supply zones (DBR/RBR/RBD/DBD)
6get_candlestick_patternssymbol, timeframe?, limit?HAMMER, DOJI, ENGULFING, etc.
7get_chart_patternssymbol, timeframe?, status?DOUBLE_TOP, HEAD_AND_SHOULDERS, etc.
8get_fibonacci_levelssymbol, timeframe?Retracement swings (UP/DOWN) with fib levels
9get_volume_analysissymbol5min hotspots, OBV trend, volume ratio
10get_market_overview*(none)*Indices, top gainers/losers, most active, breadth
11compare_stockssymbols (2-5) , timeframe?Side-by-side: quote, RSI/MACD/ADX, trend, 30d return
12screen_stocksfiltersFilter by RSI, ADX, trend, pattern, sector, etc.

timeframe defaults to daily. Options: daily, 15min, 5min.


Example Prompts

Try these in Claude.ai after connecting:

  • *"RELIANCE ka technical analysis do — RSI, MACD, aur support/resistance levels batao"*
  • *"Show me Nifty 500 stocks with RSI below 30 and ADX above 25"*
  • *"Compare TCS, INFY, and WIPRO — which one has the best setup right now?"*
  • *"What does the overall market look like today? Show me top gainers and losers"*
  • *"HDFC Bank ke demand and supply zones dikhao on the 15-minute chart"*

Architecture

graph TB

subgraph Internet C[Claude.ai / MCP Client] end

subgraph Server["Production Server"] subgraph Protection F2B[fail2ban auto-ban repeat abusers] NG[nginx rate limit 20r/s · conn limit · TLS] end

subgraph Application MCP["FastMCP Server port 8089 · 12 tools"] TOOLS["Tool Modules quote · ohlc · indicators levels · zones · patterns fibonacci · volume · market compare · screener"] end

subgraph Data DB[(MySQL: nse_public 500 stocks × 3 timeframes)] CRON[Cron Jobs 5min · 15min · daily] end end

subgraph External YF[Yahoo Finance yfinance API] end

C -->|HTTPS POST /mcp| NG NG -->|proxy_pass| MCP MCP --> TOOLS TOOLS -->|read-only queries| DB YF -->|OHLCV data| CRON CRON -->|upsert| DB F2B -.->|monitors| NG


Data Coverage

TimeframeRetentionUpdate FrequencyStocks
Daily5 yearsEOD (18:00 IST)500
15-minute2 yearsEvery 15 min (market hours)500
5-minute6 monthsEvery 5 min (market hours)500

Market hours: 09:15–15:30 IST, Monday–Friday (excluding NSE holidays).


Rate Limits

LayerLimitAction
nginx20 requests/sec per IP (burst 40)HTTP 429
nginx10 simultaneous connections per IPHTTP 429
fail2ban5× rate-limit violations in 2 minIP banned for 1 hour

Self-Hosting

Click to expand — full deployment runbook

Runs on /home/ubuntu/nse-public-mcp/ — completely isolated from /home/ubuntu/swingtrader/.

1. Clone
cd /home/ubuntu

git clone https://github.com/alokbarnwal/nse-public-mcp.git cd nse-public-mcp

2. Create database and user
sudo mysql <<'SQL'

CREATE DATABASE IF NOT EXISTS nse_public CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER IF NOT EXISTS 'nse_writer'@'localhost' IDENTIFIED BY 'CHANGE_ME_STRONG_PASSWORD'; GRANT ALL PRIVILEGES ON nse_public.* TO 'nse_writer'@'localhost'; FLUSH PRIVILEGES; SQL

3. Apply schema
mysql -u nse_writer -p nse_public < db/schema.sql

mysql -u nse_writer -p nse_public < db/schema_indicators.sql mysql -u nse_writer -p nse_public < db/schema_price_action.sql

4. Install dependencies
python3 -m venv .venv

source .venv/bin/activate pip install -r requirements.txt

5. Configure environment
cp .env.example .env

chmod 600 .env nano .env # set DB_PASSWORD to match step 2

6. (Optional) Refresh full Nifty 500 list

The repo ships with the top ~100 stocks hardcoded. To expand to all 500:

python -m config.stocks --refresh        # fetches NSE archives, rewrites config/stocks.py
7. Load stock universe into DB
python -m config.stocks --load-to-db
8. Backfill historical data (long-running, use screen/tmux)
screen -S backfill

source .venv/bin/activate python -m data.backfill --all

Ctrl-A D to detach. Reattach: screen -r backfill

Expected runtime:

  • daily 5y × 500: ~30 min
  • 15min 2y × 500: ~2 h
  • 5min 6mo × 500: ~1 h

If anything fails, the failure list is written to backfill_failures_ .json. Re-run:

python -m data.backfill --timeframe 15min --resume
8b. Bulk-compute indicators (long-running, use screen/tmux)

After the candle backfill completes, populate the indicators table for all 500 stocks across all 3 timeframes:

screen -S indicators

cd /home/ubuntu/nse-public-mcp python3 -m indicators.runner --all

Ctrl-A D to detach

Expected runtime: ~30–45 min. Idempotent — safe to re-run if interrupted.

8c. Bulk-compute price action (long-running, use screen/tmux)

After indicators are populated, compute price-action features (zones, S/R, patterns, breakouts, fibs, gaps, volume profile) for all 500 stocks across all 3 timeframes:

screen -S price_action

cd /home/ubuntu/nse-public-mcp python3 -m price_action.runner --timeframe daily --all-features python3 -m price_action.runner --timeframe 15min --all-features python3 -m price_action.runner --timeframe 5min --all-features

Ctrl-A D to detach

Expected runtime: ~60–90 min total. Idempotent — safe to re-run if interrupted.

9. Install crontab
crontab -e

Add:

# nse-public-mcp candle updaters

*/5 9-15 * * 1-5 cd /home/ubuntu/nse-public-mcp && /home/ubuntu/nse-public-mcp/.venv/bin/python -m jobs.cron_5min >> logs/cron_5min.log 2>&1 */15 9-15 * * 1-5 cd /home/ubuntu/nse-public-mcp && /home/ubuntu/nse-public-mcp/.venv/bin/python -m jobs.cron_15min >> logs/cron_15min.log 2>&1 0 18 * * 1-5 cd /home/ubuntu/nse-public-mcp && /home/ubuntu/nse-public-mcp/.venv/bin/python -m jobs.cron_daily >> logs/cron_daily.log 2>&1

nse-public-mcp indicator updaters (each runs after the matching candle fetch)

30 18 * * 1-5 cd /home/ubuntu/nse-public-mcp && /usr/bin/python3 -m jobs.cron_indicators_daily >> logs/indicators_daily.log 2>&1 20,35,50 9-15 * * 1-5 cd /home/ubuntu/nse-public-mcp && /usr/bin/python3 -m jobs.cron_indicators_15min >> logs/indicators_15min.log 2>&1 5 16 * * 1-5 cd /home/ubuntu/nse-public-mcp && /usr/bin/python3 -m jobs.cron_indicators_15min >> logs/indicators_15min.log 2>&1 2-57/5 9-15 * * 1-5 cd /home/ubuntu/nse-public-mcp && /usr/bin/python3 -m jobs.cron_indicators_5min >> logs/indicators_5min.log 2>&1

nse-public-mcp price-action updaters (each runs after the matching indicator cron)

35 18 * * 1-5 cd /home/ubuntu/nse-public-mcp && /usr/bin/python3 -m jobs.cron_price_action_daily >> logs/price_action_daily.log 2>&1 25,55 9-15 * * 1-5 cd /home/ubuntu/nse-public-mcp && /usr/bin/python3 -m jobs.cron_price_action_15min >> logs/price_action_15min.log 2>&1 9-54/15 9-15 * * 1-5 cd /home/ubuntu/nse-public-mcp && /usr/bin/python3 -m jobs.cron_price_action_5min >> logs/price_action_5min.log 2>&1

Cron times are server-local. Verify the server is on IST (timedatectl) — if not, shift the hour ranges.

The 5-min indicator cron is offset to 2-57/5 so it runs ~2 minutes after cron_5min and never reads stale candles.

The price-action 5-min cron is offset to 9-54/15 (minutes 9, 24, 39, 54) so it runs ~2 minutes after each cron_indicators_5min slot.

10. Verification
mysql -u nse_writer -p nse_public <<'SQL'

SELECT 'daily' AS tf, COUNT(*) AS n FROM candles_daily UNION ALL SELECT '15min', COUNT(*) FROM candles_15min UNION ALL SELECT '5min', COUNT(*) FROM candles_5min;

-- Per-stock coverage on daily — flag any with < 1000 rows (~4 trading years) SELECT symbol, COUNT(*) AS n FROM candles_daily GROUP BY symbol HAVING n < 1000 ORDER BY n;

-- Latest data freshness SELECT MIN(candle_date) AS earliest, MAX(candle_date) AS latest FROM candles_daily;

-- Recent cron health SELECT job_type, timeframe, symbols_success, symbols_failed, started_at, duration_seconds FROM fetch_log ORDER BY started_at DESC LIMIT 20; SQL

DB size on disk:

sudo du -sh /var/lib/mysql/nse_public/

Service Management

# Server status

sudo systemctl status nse-public-mcp

Restart

sudo systemctl restart nse-public-mcp

Logs

sudo journalctl -u nse-public-mcp -n 100 -f

nginx

sudo nginx -t && sudo systemctl reload nginx

fail2ban

sudo fail2ban-client status nginx-mcp-ratelimit


Layout

See PROJECT.md for architecture and data-flow diagram.

config/        # settings, stock universe, holiday calendar

data/ # yfinance fetcher, backfill CLI, shared upsert helpers db/ # schema and pooled connection indicators/ # technical indicator compute, persist, runner price_action/ # zones, patterns, levels, trends mcp_server/ # FastMCP server + 12 tool modules jobs/ # cron entrypoints (candles + indicators + price action) deploy/ # systemd service, nginx config, fail2ban rules tests/ # mocked unit tests (82 tests)


Operational Notes

  • Be respectful to Yahoo Finance. The fetcher sleeps 1–3 s between requests and retries with backoff. Don't reduce these.
  • Idempotent. All inserts are INSERT … ON DUPLICATE KEY UPDATE. Replaying a cron tick or rerunning backfill is safe.
  • Holiday calendar lives in config/holidays.py. Update it once a year when NSE publishes the next year's list.
  • Retention cleanup runs at the end of jobs/cron_daily.py. Daily candles older than 5 y, 15min older than 2 y, 5min older than 6 mo are purged.

License

MIT — free to use, modify, and distribute.

Disclaimer

This project is for educational and informational purposes only. Not investment advice. See DISCLAIMER.md.