DhanHQ MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DHAN_API_KEY | Yes | Your DhanHQ API key (valid for 12 months) | |
| REDIRECT_URL | Yes | The redirect URL configured in your DhanHQ API settings | http://localhost:3000/callback |
| DHAN_CLIENT_ID | Yes | Your DhanHQ client ID | |
| DHAN_API_SECRET | Yes | Your DhanHQ API secret (valid for 12 months) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| start_authenticationA | Initiates the DhanHQ authentication flow (Step 1). Returns a login URL that you must open in your browser to authenticate. |
| get_login_instructionsA | Gets the login instructions and URL for Step 2 (browser-based login). You must complete this step manually by opening the URL in your browser. |
| complete_authenticationA | Completes the authentication flow (Step 3). Takes the tokenId from the redirect URL after browser login and exchanges it for an access token. |
| check_auth_statusA | Checks the current authentication status and returns details about the active access token if available. |
| reset_authenticationB | Clears the current authentication state and resets the session. |
| get_fund_limitA | Retrieves account fund limit information including available balance, margins, collateral, and withdrawable balance. Requires authentication. |
| place_orderC | Places a new order on DhanHQ. Requires authentication. Supports MARKET, LIMIT, STOP_LOSS, and STOP_LOSS_MARKET orders. |
| modify_orderC | Modifies a pending order. Can change price, quantity, order type, and other parameters. Requires authentication. |
| cancel_orderA | Cancels a pending order. Requires authentication and a valid order ID. |
| get_order_bookB | Retrieves all orders placed during the day with their current status. Requires authentication. |
| get_order_by_idC | Retrieves the details and status of a specific order by order ID. Requires authentication. |
| get_order_by_correlation_idB | Retrieves order status using the user-specified correlation ID. Requires authentication. |
| get_trade_bookA | Retrieves all trades executed during the day. Useful for tracking fills and execution prices. Requires authentication. |
| get_order_tradesB | Retrieves all trades for a specific order. Useful for partial fills or bracket/cover orders. Requires authentication. |
| place_super_orderC | Places a smart super order combining entry, target, and stop-loss legs. Supports trailing stop loss. Requires authentication. |
| modify_super_orderC | Modifies any leg of a pending or part-traded super order. Requires authentication. |
| cancel_super_order_legB | Cancels a specific leg of a super order (ENTRY_LEG, TARGET_LEG, or STOP_LOSS_LEG). Requires authentication. |
| get_super_order_bookB | Retrieves all super orders placed during the day with nested leg details. Requires authentication. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 18 tools
Each tool has a clearly distinct purpose with no ambiguity. Tools are well-organized into authentication, order management, and super order categories, with clear boundaries between similar tools like get_order_book vs get_super_order_book and cancel_order vs cancel_super_order_leg.
All tools follow a consistent verb_noun pattern with snake_case throughout. Authentication tools use verbs like start, complete, check, reset; order tools use get, place, modify, cancel; and naming is predictable across the entire set.
18 tools is slightly high but reasonable for a comprehensive trading API server. The count covers authentication, order placement, modification, cancellation, and status retrieval thoroughly without obvious bloat, though it's at the upper end of typical scoping.
The tool set provides complete coverage for the trading domain with full authentication flow, CRUD operations for orders and super orders, status retrieval, and trade tracking. There are no apparent gaps in the surface for the stated purpose.