BN

bshada/nse-bse-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

13 stars 9 forks 质量 69 趋势 20MIT

Model Context Protocol server for NSE and BSE India stock market APIs using Streamable HTTP transport.

概览

Model Context Protocol server for NSE and BSE India stock market APIs using Streamable HTTP transport. Get real-time Indian stock market data and let LLMs do the analysis for you. Server will be available at http://localhost:3000/mcp - (38 NSE + 20 BSE + 2 Document) - - Returns metadata for large responses, letting LLM decide what to fetch - - Download and extract IPO prospectus, reports, circulars - transport (stateless) - support for browsers - endpoint - - nse_get_market_status - Current market status and trading hours - nse_equity_quote - Real-time equity quotes - nse_get_quote - Quote with segment specification (equities, sme, mf, debt) - nse_lookup_symbol - Search symbols by name or partial match - nse_get_gainers - Top gainers from market data - nse_get_losers - Top losers from market data - nse_equity_historical - Historical equity data with date range - nse_fno_historical - Historical F&O data - nse_vix_historical - Historical VIX (volatility index) data -...

README

以下为原文 README 节选,完整内容请查看原文。

NSE-BSE MCP Server

Model Context Protocol server for NSE and BSE India stock market APIs using Streamable HTTP transport.

Get real-time Indian stock market data and let LLMs do the analysis for you.

Quick Start

npx nse-bse-mcp

Or run from source:

# Requires Bun: https://bun.sh
bun install
bun run build
bun start

Docker Deployment

cd docker
docker-compose up -d

Server will be available at http://localhost:3000/mcp

MCP Client Setup (Gemini CLI, Claude Desktop, ChatGPT)

{
  "mcpServers": {
    "nse-bse-mcp": {
      "command": "npx",
      "args": ["-y", "mcp-remote@latest", "http://localhost:3000/mcp", "--allow-http"]
    }
  }
}

Features

  • 60 Tools (38 NSE + 20 BSE + 2 Document)
  • Smart Response Limiting - Returns metadata for large responses, letting LLM decide what to fetch
  • Document Downloader - Download and extract IPO prospectus, reports, circulars
  • Streamable HTTP transport (stateless)
  • CORS support for browsers
  • Health check endpoint
  • Production ready

Tools (60 Total)

NSE Tools (38)

Market Data (6 tools)

  • nse_get_market_status - Current market status and trading hours
  • nse_equity_quote - Real-time equity quotes
  • nse_get_quote - Quote with segment specification (equities, sme, mf, debt)
  • nse_lookup_symbol - Search symbols by name or partial match
  • nse_get_gainers - Top gainers from market data
  • nse_get_losers - Top losers from market data

Historical Data (3 tools)

  • nse_equity_historical - Historical equity data with date range
  • nse_fno_historical - Historical F&O data
  • nse_vix_historical - Historical VIX (volatility index) data

Options & Derivatives (7 tools)

  • nse_get_expiry_dates - Get available expiry dates for a symbol (call first!)
  • nse_option_chain - Complete option chain with all strikes (V3 API)
  • nse_filtered_option_chain - Compact option chain around ATM strikes (~90% smaller)
  • nse_compile_option_chain - Pre-calculated analytics (ATM, max pain, PCR, OI)
  • nse_calculate_max_pain - Max pain strike price calculation
  • nse_fno_lots - F&O lot sizes for all symbols
  • nse_futures_expiry - Futures expiry dates

Corporate Information (5 tools)

  • nse_corporate_actions - Dividends, splits, bonuses
  • nse_corporate_announcements - Corporate announcements
  • nse_board_meetings - Board meeting information
  • nse_annual_reports - Company annual reports
  • nse_circulars - NSE circulars

IPO Tools (4 tools)

  • nse_current_ipos - Current/ongoing IPOs
  • nse_upcoming_ipos - Upcoming IPOs
  • nse_past_ipos - Past IPOs with date range
  • nse_ipo_details - Detailed IPO information

Market Activity (3 tools)

  • nse_block_deals - Block deals data
  • nse_bulk_deals - Bulk deals data
  • nse_holidays - Market holidays (trading/clearing)

Lists & Metadata (6 tools)

  • nse_list_indices - All NSE indices
在 GitHub 查看完整 README

安装

npx -y mcp-remote@latest http://localhost:3000/mcp --allow-http
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "nse-bse-mcp": { "command": "npx", "args": ["-y", "mcp-remote@latest", "http://localhost:3000/mcp", "--allow-http"] } } }