
manitgupta/nse-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
MCP 서버는 인도 증권 시장을위한 구조화 된 데이터를 당겨
개요
MCP (Model Context Protocol) 서버는 Claude Desktop, Cursor, VS Code 및 기타 MCP 호환 호스트와 같은 LLM 클라이언트에서 인도 재고 시장 데이터를 노출합니다. OpenInsider-MCP 후 모델링하지만 NSE 인도의 공공 데이터 API를 완전히 구축했습니다. 모든 도구 반환 타입 JSON. scoring 없음, 권고 없음 — 순수한 자료 층. 서버는 기본 fetch API 및 AbortSignal.timeout()를 사용하며 Node 18+를 요구합니다. Node 20는 활성 LTS이며 권장됩니다. src/ 에 dist/ 를 컴파일한다. 항목은 dist/index.js입니다. 서버는 (표준 입력/출력)에 전달합니다 - 그것은 MCP 메시지를 기다리고 있기 때문에 걸려 나타납니다. 그것은 정확합니다. Ctrl + C를 눌러 종료합니다. 서버는 필요한 구성을 가진 상자에서 작동합니다. 1개의 선택적인 환경 변수는 유효합니다: MCP 클라이언트 설정에서 인라인 설정할 수 있습니다 (아래 참조).
개요(AI 번역)
MCP (Model Context Protocol) 서버는 **국 증권 거래소 (NSE)**에서 LLM 클라이언트가 Claude Desktop, Cursor, VS Code 및 기타 MCP 호환 호스트와 같은 라이브 인디언 재고 시장 데이터를 노출합니다.
OpenInsider-MCP 후 모델링하지만 NSE 인도의 공공 데이터 API를 완전히 구축했습니다.
그것이 제공하는 것
다섯 가지 범주의 17 도구 :
| 도구 |
|—|||
| 벌크 / 블록 / 인더스트리 상품 | get_bulk_deals, get_block_deals, get_latest_bulk_deals, get_top_bulk_buys, get_top_bulk_sells, search_by_symbol]
| 기관 교류 | [T7] |
| 시가정보 | [T8]], get_market_status, get_nifty_indices, get_top_gainers, [T12]], get_most_active
| 회사소개 | [T14], get_corporate_actions
| 짧은 자료 | [T16] |
모든 도구 반환 타입 JSON. scoring 없음, 권고 없음 — 순수한 자료 층.
요구 사항
| 문의 | 버전 | |—||| 인포메이션 | npm | ≥ 8 (노트 20 번) | | 기타 | 최근 버전 |
왜 노드 20? 서버는 기본
fetchAPI와 `AbortSignal을 사용합니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
NSE MCP
An MCP (Model Context Protocol) server that exposes live Indian stock market data from the National Stock Exchange (NSE) to LLM clients like Claude Desktop, Cursor, VS Code, and any other MCP-compatible host.
Modelled after OpenInsider-MCP but built entirely around NSE India’s public data APIs.
What it provides
17 tools across five categories:
| Category | Tools |
|---|---|
| Bulk / Block / Insider deals | get_bulk_deals, get_block_deals, get_insider_trading, get_latest_bulk_deals, get_top_bulk_buys, get_top_bulk_sells, search_by_symbol |
| Institutional flows | get_fii_dii_activity |
| Market data | get_quote, get_market_status, get_nifty_indices, get_top_gainers, get_top_losers, get_most_active |
| Corporate events | get_nse_announcements, get_corporate_actions |
| Short data | get_short_selling |
All tools return typed JSON. No scoring, no recommendations — pure data layer.
Requirements
| Requirement | Version |
|---|---|
| Node.js | ≥ 20 |
| npm | ≥ 8 (bundled with Node 20) |
| Git | Any recent version |
Why Node 20? The server uses the native
fetchAPI andAbortSignal.timeout(), both of which require Node 18+. Node 20 is the active LTS and is recommended.
Installation
1. Clone the repository
git clone https://github.com/manitgupta/nse-mcp.git
cd nse-mcp
2. Install dependencies
npm install
3. Build
npm run build
This compiles the TypeScript source in src/ to dist/. The entry point is dist/index.js.
4. Verify it starts
node dist/index.js
The server communicates over stdio (standard input/output) — it will appear to hang because it is waiting for MCP messages. That is correct. Press Ctrl+C to exit.
Configuration
The server works out of the box with no required configuration. One optional environment variable is available:
| Variable | Default | Description |
|---|---|---|
NSE_MCP_UA |
Chrome 120 UA string | Override the User-Agent sent to NSE and Yahoo Finance. Useful if NSE starts blocking the default UA. |
Setting the environment variable
macOS / Linux
export NSE_MCP_UA="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 Chrome/121.0.0.0 Safari/537.36"
Windows (PowerShell)
$env:NSE_MCP_UA = "Mozilla/5.0 ..."
You can also set it inline in your MCP client config (see below).
How NSE session auth works
NSE India’s API requires browser-like cookies. On the first request the server automatically:
- Fetches
https://www.nseindia.comto obtain initial cookies. - Fetches the live-equity-market page with those cookies to complete the session.
- Caches the session for ~7 minutes, then refreshes transparently.
No manual login or API key is needed.
Adding to an MCP client
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"nse-mcp": {
"command": "node",
"args": ["/absolute/path/to/nse-mcp/dist/index.js"]
}
}
}