Official Dhan MCP Server for Direct Cloud AI Integration & Advanced Analysis

We want to propose that Dhan develops an official Model Context Protocol (MCP) Server hosted in the cloud (or via an easy cloud deployment template) that links directly to LLMs like Claude.

Currently, community-made Dhan MCP setups require users to run a Python or Node.js server locally via command line (stdio) to route requests from Claude Desktop to the Dhan API. A direct cloud-to-cloud connection would allow traders to do heavy market analysis, option chain reading, and portfolio checks natively inside their AI tools without setting up local code environments.


:rocket: Why This is a Game-Changer for Dhan Users

1. Instant “Plug-and-Play” Analysis

Instead of configuring local files (claude_desktop_config.json), users could simply plug their Dhan API credentials into a secure cloud MCP gateway. This immediately gives Claude the “hands and eyes” to pull live market data.

2. Advanced Market & Portfolio Intelligence

With direct API access, an AI assistant can instantly perform complex analysis that would take a trader minutes to calculate manually:

  • Option Chain Analysis: “Claude, look at the Nifty option chain for the upcoming expiry. Find where the highest IV skew is and suggest a risk-defined hedging strategy.”

  • Real-time P&L Guardrails: “Analyze my current open intraday positions against today’s support levels. Alert me if the risk-to-reward ratio falls below 1:2.”

  • Historical Candle Context: “Fetch the 15-minute chart for Reliance over the last 5 days and analyze if a volume breakout is forming.”

3. True Mobility (No Local Server Needed)

Local MCP servers only work on desktops. A cloud-connected MCP API means you could use Claude on your mobile phone, tablet, or web browser to query your Dhan data and perform charts/portfolio analysis on the go.


:hammer_and_wrench: Suggested Technical Implementation

  • Secure OAuth / API Token Gateway: Dhan could provide a specific “Read-Only” or “Restricted Access” API token option specifically for AI tools to ensure account safety.

  • SSE/WebSocket or HTTPS Transport: Move away from local stdio communication to standard web-based protocols (like SSE or WebSockets supported by MCP) so Claude’s cloud servers can talk straight to Dhan’s servers securely.

  • Pre-Built Analysis Tools: Expose specific analytical endpoints as MCP tools, such as:

    • get_live_ohlcv (For chart patterns)

    • get_full_market_depth (For order book analysis)

    • get_portfolio_greeks (For overall F&O risk assessment)

    Recently, FYERS launched FYERS MCP (https://mcp.fyers.in/mcp), which allows traders to securely connect their trading account directly to advanced AI tools like Claude Desktop, Cursor, or Windsurf using the Model Context Protocol (MCP) via an SSE (Server-Sent Events) cloud link.

    I would love to request Dhan to build an official Dhan MCP Server following a similar architecture.

    Why Dhan needs an official MCP server:

    Right now, to use AI for market analysis or portfolio tracking on Dhan, users have to write custom Python/Node scripts or host community-built MCP servers locally on their machines using stdio. It requires a lot of technical overhead.

    With a native, cloud-hosted Dhan MCP URL (similar to what FYERS did), we could simply drop a JSON block into Claude or Cursor like this:

    JSON

    {
      "mcpServers": {
        "Dhan-MCP": {
          "url": "https://mcp.dhan.co/mcp",
          "type": "sse",
          "headers": {
            "Authorization": "Bearer ${DHAN_API_TOKEN}"
          }
        }
      }
    }
    
    

    Key Use Cases This Will Unlock:

    • Deep Option Chain Analysis: We can ask Claude, “Analyze the upcoming Nifty option chain via Dhan, look at the highest OI buildup, and check my open positions to see if I’m appropriately hedged.”

    • Real-time Portfolio Intelligence: “Look at my current Dhan holdings and mutual funds. Am I over-exposed to the IT sector or any single stock today?”

    • Historical Chart Context: AI can pull historical candle data to analyze technical patterns or backtest strategy rules on live symbols.

    • Security & Read-Only Peace of Mind: Just like standard API practices, it can be entirely Read-Only by design—meaning the AI can analyze funds, holdings, orders, and market data, but cannot place trades or move funds, keeping accounts 100% secure.

    Dhan has always been a pioneer in tech and API features for Indian traders (with Lightning-fast APIs and deep TradingView integrations). Bringing native, plug-and-play MCP access will make Dhan the absolute #1 broker for the new generation of AI-assisted traders.


:bullseye: Expected Impact

Dhan has always been a tech-first broker in India (pioneering TradingView integrations, instant web features, etc.). By becoming one of the first brokers to offer a native, cloud-ready MCP server, Dhan would firmly position itself as the absolute #1 ecosystem for the next generation of AI-assisted Super Traders.