Dhan Server
БесплатноНе проверенEnables AI assistants to manage orders, portfolios, and market data via Dhan's trading APIs.
Описание
Enables AI assistants to manage orders, portfolios, and market data via Dhan's trading APIs.
README
An MCP (Model Context Protocol) server that exposes Dhan trading APIs as tools, enabling AI assistants to manage orders, view portfolios, fetch market data, and more.
Prerequisites
- Node.js 18+
- A Dhan account with API access
- Access token from Dhan's developer portal
Setup
1. Get your Dhan API credentials
- Log in to Dhan Web
- Go to Profile → DhanHQ Trading APIs
- Generate an Access Token and note your Client ID
2. Install and build
npm install
npm run build
3. Configure environment
Copy .env.example to .env and fill in your credentials:
cp .env.example .env
DHAN_ACCESS_TOKEN=your_jwt_access_token_here
DHAN_CLIENT_ID=your_dhan_client_id_here
Usage
Run directly
DHAN_ACCESS_TOKEN=<token> DHAN_CLIENT_ID=<clientId> node dist/index.js
Configure with Claude Desktop
Add to your Claude Desktop config.json:
{
"mcpServers": {
"dhan": {
"command": "node",
"args": ["/path/to/dhan-mcp-server/dist/index.js"],
"env": {
"DHAN_ACCESS_TOKEN": "your_access_token",
"DHAN_CLIENT_ID": "your_client_id"
}
}
}
}
Available Tools
Orders
| Tool | Description |
|---|---|
place_order |
Place a new order (equity, F&O, currency, commodity) |
place_slice_order |
Place a large order split into smaller chunks automatically |
get_orders |
Get all orders for today |
get_order_by_id |
Get a specific order by ID |
get_order_by_correlation_id |
Get order by client correlation ID |
modify_order |
Modify a pending order |
cancel_order |
Cancel a pending order |
Trades
| Tool | Description |
|---|---|
get_trades |
Get all executed trades for today |
get_trades_by_order_id |
Get trades for a specific order |
Portfolio
| Tool | Description |
|---|---|
get_holdings |
View equity holdings from previous sessions |
get_positions |
View open positions for today |
convert_position |
Convert position between product types (e.g. INTRADAY → CNC) |
Funds & Margin
| Tool | Description |
|---|---|
get_fund_limits |
View available margin, used margin, collateral |
calculate_margin |
Calculate margin required for a potential order |
Market Data
| Tool | Description |
|---|---|
get_market_quote_ticker |
Real-time LTP for given securities |
get_market_quote_ohlc |
OHLC data for given securities |
get_market_quote_full |
Full market depth (bid/ask, volume, OI) |
get_option_chain |
Complete option chain for an underlying |
get_expiry_list |
Available expiry dates for an underlying |
get_historical_candle |
Historical daily OHLCV candles |
get_intraday_candle |
Intraday OHLCV candles (1/5/15/25/60 min) |
Statements
| Tool | Description |
|---|---|
get_ledger_report |
Account ledger for a date range |
get_trade_history |
Historical trade records |
Profile & Auth
| Tool | Description |
|---|---|
get_profile |
User profile information |
renew_token |
Renew the access token |
EDIS
| Tool | Description |
|---|---|
generate_edis_form |
Generate EDIS slip for selling holdings |
get_edis_inquiry |
Check EDIS status for an ISIN |
Exchange Segments
| Segment | Description |
|---|---|
NSE_EQ |
NSE Equity |
NSE_FNO |
NSE Futures & Options |
NSE_CURRENCY |
NSE Currency Derivatives |
BSE_EQ |
BSE Equity |
BSE_FNO |
BSE Futures & Options |
BSE_CURRENCY |
BSE Currency Derivatives |
MCX_COMM |
MCX Commodity |
Product Types
| Type | Description |
|---|---|
CNC |
Cash and Carry (delivery) |
INTRADAY |
Intraday MIS |
MARGIN |
Margin |
MTF |
Margin Trading Facility |
CO |
Cover Order |
BO |
Bracket Order |
Установка Dhan Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/vibeoski/dhan-mcp-serverFAQ
Dhan Server MCP бесплатный?
Да, Dhan Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Dhan Server?
Нет, Dhan Server работает без API-ключей и переменных окружения.
Dhan Server — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Dhan Server в Claude Desktop, Claude Code или Cursor?
Открой Dhan Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Dhan Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
