Skip to main content
Glama
girishgupta211

sip-advisor-mcp

市场感知的 SIP 时机顾问 — FastMCP(工作坊)

一个约 180 行的 Python MCP 服务器,将实时 NSE 指数数据转化为 SIP 加投(step-up)/暂停建议。为 mfAPIs × SunitechAI 网络研讨会而构建。

**设计:**服务器自身不持有数据。原始 NIFTY 50 PE 和 OHLC 行数据来自 MF Engine REST API;估值百分位、价格趋势和 SIP 规则逻辑则用 Python 写在这里。这种拆分正是教学点所在。

工具

功能说明

get_nifty_valuation_context

当前 PE + 百分位 + 相对 10 年历史的 z-score → cheap / fair / expensive

get_nifty_trend

DMA50/200、距 52 周高点/低点的距离、1/3/6 个月回报 → uptrend / sideways / downtrend

recommend_sip_action

区间(+ 趋势)→ pause / continue / step_up + 建议的新金额

设置

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 Desktop —— 将 claude_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:8000ngrok http 8000),然后设置 → 连接器 → 高级 → 开发者模式 → 添加 https://…/mcp URL。普通 ChatGPT 连接器需要 search/fetch 工具;此服务器只能通过开发者模式或 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