Dhan Broker MCP Trades
About
Dhan Broker MCP Trades is a server that connects AI models with the Dhan brokerage system through the Model Context Protocol, enabling automated trading operations such as order placement, portfolio analysis, and fund management.
Details
- Author
- mayankthole
- Downloads
- 192
- Categories
- Other
Jump to
- Order placement and management via MCP tools
- Super orders with targets and stop-losses
- Portfolio analysis and P&L calculation
- Fund management capabilities
- After-market order execution for market open
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Dhan Broker MCP TradesCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
—
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"dhan broker mcp trades": {
"after-market-order": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/after_market_order_tool.py"
]
},
"fund-balance": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/fund_balance_tool.py"
]
},
"holdings-positions": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/holdings_positions_tool.py"
]
},
"margin-calculator": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/margin_calculator_tool.py"
]
},
"order-book": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/order_book_tool.py"
]
},
"order-placement": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/order_placement_tool.py"
]
},
"portfolio-server": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/portfolio_server.py"
]
},
"super-order": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/super-order.py"
]
}
}
}
}
McpServers
{
"after-market-order": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/after_market_order_tool.py"
]
},
"fund-balance": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/fund_balance_tool.py"
]
},
"holdings-positions": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/holdings_positions_tool.py"
]
},
"margin-calculator": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/margin_calculator_tool.py"
]
},
"order-book": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/order_book_tool.py"
]
},
"order-placement": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/order_placement_tool.py"
]
},
"portfolio-server": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/portfolio_server.py"
]
},
"super-order": {
"command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"args": [
"/Users/mayankthole/Desktop/Dhan Broker MCP trades/super-order.py"
]
}
}
Real Use Cases
What makes this so powerful? Here are some examples of what you can do:
- [ ] Buy 10 shares of HDFC at market price
- [ ] Place a super order to buy Reliance with 2% target and 1% stop-loss
- [ ] Show me my current holdings and calculate total P&L
- [ ] Buy all PSU bank stocks or Short private banking sector
- [ ] Buy companies where promoters are increasing stake
- [ ] Place after-market orders for IT stocks to execute at market open
Tech Behind It
I built this using Python with MCP (Model Context Protocol), which lets me connect AI models with external systems through a standardized interface. Each tool handles a specific aspect of trading:
Order placement and management
Super orders with targets and stop-losses
Portfolio analysis
Fund management
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



