Skip to main content
Glama
girishgupta211

sip-advisor-mcp

マーケット連動SIPタイミングアドバイザー — FastMCP(ワークショップ)

約180行のPython MCPサーバーで、ライブNSEインデックスデータをSIPのステップアップ/一時停止の推奨に変換します。mfAPIs × SunitechAI ウェビナー向けに構築されました。

設計: このサーバーはデータを保持しません。生のNIFTY 50 PEおよびOHLC行はMF Engine REST APIから取得し、バリュエーション・パーセンタイル、価格トレンド、SIPルールのロジックはここ(Python)にあります。この分割が学びどころです。

ツール

機能

get_nifty_valuation_context

現在のPE + パーセンタイル + 10年履歴とのzスコア → 割安 / 適正 / 割高

get_nifty_trend

DMA50/200、52週高値/安値からの距離、1/3/6か月リターン → 上昇トレンド / 横ばい / 下降トレンド

recommend_sip_action

バンド(+ トレンド)→ 一時停止 / 継続 / ステップアップ + 推奨される新しい金額

セットアップ

cd workshop/sip-advisor-mcp
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env      # then paste MFAPI_TOKEN

MFAPI_TOKEN は、パートナー / 投資家 / 管理者ユーザー向けのJWT access-token です。zinni-appブラウザセッション(DevTools → Application → Local Storage、またはNetworkタブ)またはログインAPI呼び出しから取得してください。これはMCP静的トークンではありません — RESTエンドポイントは通常のユーザー認証を使用します。

Related MCP server: Upstox MCP Server

実行

# stdio — for Claude Desktop
python server.py

# HTTP — for ChatGPT developer mode / remote clients  (serves :8000/mcp)
MCP_TRANSPORT=http python server.py

LLMなしのクイックチェック:

pip install fastmcp   # includes the CLI
fastmcp run server.py --transport http &
npx @modelcontextprotocol/inspector   # connect to http://localhost:8000/mcp

Claude への接続

Claude Desktopclaude_desktop_config.example.json~/Library/Application Support/Claude/claude_desktop_config.json にマージし(絶対パスとトークンを修正)、Claude Desktopを再起動します。

Claude Code

claude mcp add sip-advisor -- python /abs/path/workshop/sip-advisor-mcp/server.py
# set MFAPI_TOKEN in the shell that launches claude, or via --env

ChatGPT への接続

HTTPモードで実行し、公開します(cloudflared tunnel --url http://localhost:8000 または ngrok http 8000)。次に Settings → Connectors → Advanced → Developer mode → Addhttps://…/mcp URLを追加します。通常のChatGPTコネクタでは search/fetch ツールが必要です。このサーバーは developer mode またはResponses API経由でのみ動作します。

デモスクリプト

「私は毎月₹10,000のNIFTY 50 SIPを実行しています。今の市場の状況を考えると、ステップアップ、継続、一時停止のどれをすべきでしょうか?」

モデルは get_nifty_valuation_contextget_nifty_trendrecommend_sip_action(band, trend, 10000) を連鎖させ、PEパーセンタイル、トレンド、as_of 日付を使ってその判断を説明します。

データの鮮度に関する注意

本番のNSE OHLC / バリュエーションテーブルは、ライブ市場より数週間遅れることがあります。ツールは as_of を返すので、デモでは必ず読み上げ、本番移行前にデータリポジトリの取り込みを修正してください。

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables quantitative trading analysis with 12 tools for real-time market data, 28+ technical indicators, FinBERT-powered news sentiment analysis, and automated trading signal generation for stocks and forex.
    1
  • F
    license
    Not graded
    quality
    C
    maintenance
    Real-time Indian stock market sentiment intelligence. Provides NSE/BSE news sentiment, aggregated stock & sector signals, and technical analysis.
    1
  • A
    license
    Not graded
    quality
    D
    maintenance
    Connects AI assistants to real-time Indian stock market data with 34 tools for search, screening, analysis, portfolio tracking, and market insights across all NSE and BSE stocks.
    129
    62
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/girishgupta211/sip-advisor-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server