Skip to main content
Glama
Angel One Mcp

Angel One Mcp

by ameernoufil

Angel One MCP Server

npm MCP Registry

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

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 start

If running from source, point your MCP client to build/index.js.

Environment Variables

Required:

  • ANGEL_API_KEY

  • ANGEL_CLIENT_ID

  • ANGEL_PASSWORD

  • ANGEL_TOTP_SECRET

Optional safety limits:

  • SOFT_MAX_ORDER_QTY default 25

  • HARD_MAX_ORDER_QTY default 100

  • SOFT_MAX_ORDER_VALUE default 10000

  • HARD_MAX_ORDER_VALUE default 100000

Example .env:

ANGEL_API_KEY=your_smartapi_key
ANGEL_CLIENT_ID=your_client_id
ANGEL_PASSWORD=your_mpin
ANGEL_TOTP_SECRET=your_base32_totp_secret

Safety 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_order

  • modify_order

  • create_gtt_rule

  • modify_gtt_rule

  • convert_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 start

Architecture Notes

  • Entry point: src/index.ts

  • API client and auth flow: src/api.ts

  • Config and safety limits: src/config.ts

  • Order guard: src/guards.ts

  • Tool registration: src/tools/index.ts

  • Tool implementations: src/tools/*.ts

License

MIT

Available Tools

32 tools
cancel_gtt_ruleA
Destructive

Cancel an existing GTT rule by ID.

Inputs: id (required), exchange (required), symboltoken (required).

cancel_orderA
Destructive

Cancel a pending order by order ID and variety.

Inputs: orderid (required), variety (required).

convert_positionA
Destructive

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_ruleA
Destructive

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_ruleA
Destructive

Modify an existing GTT rule. Change price, quantity, or trigger price.

Inputs: id (required), qty (required), price (required), exchange (required), +8 more.

modify_orderA
Destructive

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_orderA
Destructive

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

    B3.4/5.0

    Scored across 32 tools

    Disambiguation3/5

    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.

    Naming Consistency4/5

    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.

    Tool Count2/5

    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.

    Completeness5/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      An MCP server implementation that integrates with Angle One APIs to provide standardized access to financial market data, trading operations, and portfolio management.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      FastMCP server exposing brokerage and market tools (Angel One, Coinbase, News) via the Model Context Protocol, enabling portfolio queries and trade execution through natural language.
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server for Zerodha Kite Connect that enables AI agents to execute trades, manage portfolios, fetch market data, and perform technical and fundamental analysis.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for Tradernet/Freedom24 trading platform API, enabling portfolio management, order placement, quotes, ticker search, and price alerts via AI assistants.
      53 npm
      1
      MIT