Angel One Mcp
Angel One MCP Server
TypeScript Model Context Protocol server for Angel One SmartAPI.
Use it from Claude, Cursor, Copilot, or any MCP client to:
place and manage orders
read holdings, positions, and funds
fetch market data, candles, OI, Greeks, and movers
manage GTT rules
estimate charges and margin
Highlights
Direct
fetch()integration. No Angel One SDK dependency.Auto TOTP generation from your base32 secret.
Lazy login with token refresh in API layer.
Safety guard for trading mutations with soft and hard limits.
stdio MCP server. Works well with
npx.
Related MCP server: Broker Buddy MCP Server
Discoverability
npm package:
angel-one-mcpOfficial MCP Registry:
io.github.ameernoufil/angel-oneGitHub repo:
ameernoufil/angel-one-mcp
If your client supports registry-based discovery, search for io.github.ameernoufil/angel-one.
If your client prefers package installs, use angel-one-mcp from npm.
Quick Start
Option A: Use with npx (recommended)
Add this to your MCP client config:
{
"mcpServers": {
"angel-one": {
"type": "stdio",
"command": "npx",
"args": ["-y", "angel-one-mcp"],
"env": {
"ANGEL_API_KEY": "your_smartapi_key",
"ANGEL_CLIENT_ID": "your_client_id",
"ANGEL_PASSWORD": "your_mpin",
"ANGEL_TOTP_SECRET": "your_base32_totp_secret"
}
}
}
}Option B: Run from source
git clone https://github.com/ameernoufil/angel-one-mcp.git
cd angel-one-mcp
npm install
cp .env.example .env
npm run build
npm startIf running from source, point your MCP client to build/index.js.
Environment Variables
Required:
ANGEL_API_KEYANGEL_CLIENT_IDANGEL_PASSWORDANGEL_TOTP_SECRET
Optional safety limits:
SOFT_MAX_ORDER_QTYdefault25HARD_MAX_ORDER_QTYdefault100SOFT_MAX_ORDER_VALUEdefault10000HARD_MAX_ORDER_VALUEdefault100000
Example .env:
ANGEL_API_KEY=your_smartapi_key
ANGEL_CLIENT_ID=your_client_id
ANGEL_PASSWORD=your_mpin
ANGEL_TOTP_SECRET=your_base32_totp_secretSafety Model
Trading mutations are guarded.
Soft limits block by default and can be overridden with force: true.
Hard limits cannot be bypassed without changing env vars and restarting the server.
Guarded operations include:
place_ordermodify_ordercreate_gtt_rulemodify_gtt_ruleconvert_position
For MARKET orders, the server attempts LTP-based value checks before allowing the request.
Tool Coverage
Auth: login and logout
Portfolio: holdings, positions, funds, conversion
Orders: place, modify, cancel, book lookup, trade lookup
Market: search, LTP, quotes, candles, OI, Greeks, movers, PCR
GTT: create, modify, cancel, list, inspect
Calculator: margin and brokerage estimates
User: profile
For an agent-focused onboarding prompt, see docs/llm-setup.md.
Development
Requirements:
Node.js 18+
Commands:
npm install
npm run build
npm run lint
npm run lint:fix
npm run format
npm run dev
npm startArchitecture Notes
Entry point:
src/index.tsAPI client and auth flow:
src/api.tsConfig and safety limits:
src/config.tsOrder guard:
src/guards.tsTool registration:
src/tools/index.tsTool implementations:
src/tools/*.ts
License
Available Tools
32 toolscancel_gtt_ruleADestructive
Cancel an existing GTT rule by ID.
Inputs: id (required), exchange (required), symboltoken (required).
cancel_orderADestructive
Cancel a pending order by order ID and variety.
Inputs: orderid (required), variety (required).
convert_positionADestructive
Convert an existing position from one product type to another (e.g. INTRADAY to DELIVERY).
Inputs: type (required), exchange (required), quantity (required), symboltoken (required), +5 more.
create_gtt_ruleADestructive
Create a GTT (Good Till Triggered) rule. When trigger price is hit, the order is automatically placed.
Inputs: qty (required), price (required), exchange (required), timeperiod (required), +7 more.
estimate_chargesA
Estimate brokerage, STT, transaction charges, GST, SEBI charges, and stamp duty for proposed trades.
Inputs: orders (required).
estimate_marginA
Calculate margin requirements for a batch of potential orders before placing them.
Inputs: positions (required).
get_all_holdingsA
Get extended portfolio holdings with total holding value, total investment, total P&L, and P&L percentage.
Inputs: no named parameters.
get_bse_intradayB
Get top BSE intraday movers data.
Inputs: no named parameters.
get_candle_dataC
Get historical OHLCV candle data for a symbol. Intervals: ONE_MINUTE, FIVE_MINUTE, FIFTEEN_MINUTE, THIRTY_MINUTE, ONE_HOUR, ONE_DAY.
Inputs: todate (required), exchange (required), fromdate (required), interval (required), +1 more.
get_fundsA
Get available funds and margins: cash, collateral, utilised margins, net value.
Inputs: no named parameters.
get_gainers_losersA
Get top gainers or losers by OI or price change percentage for derivatives.
Inputs: datatype (required), expirytype (required).
get_gtt_rule_detailsA
Get details of a specific GTT rule by ID.
Inputs: id (required).
get_gtt_rule_listB
List GTT rules filtered by status. Returns paginated results.
Inputs: page (required), count (required), status (required).
get_holdingsB
Get portfolio holdings: stocks owned, quantities, average prices, P&L, LTP.
Inputs: no named parameters.
get_ltpB
Get last traded price for a symbol. Also returns open, high, low, close.
Inputs: exchange (required), symboltoken (required), tradingsymbol (required).
get_market_quoteA
Get market quote data. Modes: FULL (all fields), OHLC, LTP. Pass exchange and token list.
Inputs: mode (required), exchange (required), symboltoken (required).
get_nse_intradayB
Get top NSE intraday movers data.
Inputs: no named parameters.
get_oi_buildupC
Get OI Buildup analysis: Long Buildup, Short Buildup, Short Covering, Long Unwinding.
Inputs: datatype (required), expirytype (required).
get_oi_dataA
Get historical Open Interest data for derivatives. Same intervals as candle data.
Inputs: todate (required), exchange (required), fromdate (required), interval (required), +1 more.
get_option_greeksA
Get option Greeks (Delta, Gamma, Theta, Vega, IV) for all strikes of a given underlying and expiry.
Inputs: name (required), expirydate (required).
get_order_bookA
Get all orders for today: pending, executed, rejected. Shows status, prices, quantities.
Inputs: no named parameters.
get_order_detailsA
Get detailed information for a specific order by its order ID.
Inputs: orderid (required).
get_positionsA
Get open positions: intraday/carryforward, buy/sell qty, avg prices, unrealised P&L.
Inputs: no named parameters.
get_profileA
Get Angel One user profile: name, email, mobile, exchanges, products, broker info.
Inputs: no named parameters.
get_put_call_ratioA
Get Put-Call Ratio data for the derivatives market.
Inputs: no named parameters.
get_trade_bookA
Get executed trades for today: fill prices, quantities, timestamps.
Inputs: no named parameters.
loginA
Authenticate with Angel One SmartAPI. Auto-generates TOTP. Stores session internally.
Inputs: no named parameters.
logoutA
End Angel One SmartAPI session and invalidate tokens.
Inputs: no named parameters.
modify_gtt_ruleADestructive
Modify an existing GTT rule. Change price, quantity, or trigger price.
Inputs: id (required), qty (required), price (required), exchange (required), +8 more.
modify_orderADestructive
Modify an existing pending order. Change price, quantity, order type, or trigger price.
Inputs: price (required), orderid (required), variety (required), duration (required), +8 more.
place_orderADestructive
Place a buy/sell order on Angel One. Supports NORMAL, STOPLOSS, AMO, ROBO varieties. Returns order ID on success.
Inputs: variety (required), duration (required), exchange (required), quantity (required), +10 more.
search_scripA
Search for trading instruments by name. Returns symbol tokens needed for other tools.
Inputs: exchange (required), searchscrip (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 32 tools
Some tools have overlapping purposes, such as get_holdings vs get_all_holdings and get_ltp vs get_market_quote, which could confuse an agent. However, the descriptions provide sufficient detail to differentiate them, so the ambiguity is moderate.
Most tools follow a consistent verb_noun pattern with underscores (e.g., get_positions, place_order, cancel_gtt_rule). Minor deviations like 'login' and 'logout' as bare verbs, and the mixed noun phrases in get_gtt_rule_details, do not disrupt overall predictability.
With 32 tools, the set is heavy and some tools could be merged (e.g., get_all_holdings into get_holdings, or consolidating the intraday movers). While the scope is broad, the count exceeds the typical threshold and feels bloated.
The tool set covers the full trading lifecycle: authentication, profile, holdings, order management, market data, derivatives analysis, GTT rules, and cost estimation. There are no obvious missing operations for a trading platform.
Maintenance
Related MCP Connectors
Open-source MCP server for Zerodha Kite Connect. Portfolio, market data, backtesting, alerts.
Hosted MCP server for Indian market quotes, option-chain Greeks and multi-broker telemetry.
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceAn MCP server implementation that integrates with Angle One APIs to provide standardized access to financial market data, trading operations, and portfolio management.-
- AlicenseNot gradedqualityDmaintenanceFastMCP server exposing brokerage and market tools (Angel One, Coinbase, News) via the Model Context Protocol, enabling portfolio queries and trade execution through natural language.1MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server for Zerodha Kite Connect that enables AI agents to execute trades, manage portfolios, fetch market data, and perform technical and fundamental analysis.-
- AlicenseNot gradedqualityDmaintenanceMCP server for Tradernet/Freedom24 trading platform API, enabling portfolio management, order placement, quotes, ticker search, and price alerts via AI assistants.53 npm1MIT