mcpField
A
Angel One Mcp Server

Angel One Mcp Server

Local
github.com/bhavesh0009Finance7Updated 66w ago

About Angel One Mcp Server

An MCP server for traders using Angel One SmartAPI, with account, trading, and market-data functions for Indian markets. Beyond order operations, it includes option Greeks, TOTP authentication, and dry-run mode.

Key features

  1. 01View holdings, family holdings, and RMS limits
  2. 02Place or modify orders and create GTT rules
  3. 03Get live prices and historical candlesticks
  4. 04Search instruments and view gainers, losers, and PCR
  5. 05Calculate option Greeks and estimate brokerage
  6. 06TOTP authentication, quantity limits, and dry-run mode

Use cases

  1. 01Review portfolios, margin, and open positions
  2. 02Place or cancel equity and derivatives orders
  3. 03Check live prices, historical data, and market indicators

MCP support

The MCP server exposes Angel One SmartAPI account, trading, and market-data tools to clients, with TOTP authentication and dry-run support.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"angel-one": {
"command": "uvx",
"args": [
"angel-one-mcp-server"
],
"env": {
"ANGEL_ONE_API_KEY": "<ANGEL_ONE_API_KEY>",
"ANGEL_ONE_CLIENT_CODE": "<ANGEL_ONE_CLIENT_CODE>",
"ANGEL_ONE_PASSWORD": "<ANGEL_ONE_PASSWORD>",
"ANGEL_ONE_TOTP_SECRET": "<ANGEL_ONE_TOTP_SECRET>"
}
}
}
}
Run commanduvx angel-one-mcp-server
Environment variables to set
ANGEL_ONE_API_KEYSecret
ANGEL_ONE_CLIENT_CODE
ANGEL_ONE_PASSWORDSecret
ANGEL_ONE_TOTP_SECRETSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypiangel-one-mcp-server

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Angel One MCP Server

Angel One Limited (formerly Angel Broking Limited) is India's leading stockbroker firm established in 1996, serving over 24.7 million clients across major Indian stock exchanges including BSE and NSE. This server provides access to Indian equity markets, commodities, and derivatives trading.

A Model Context Protocol (MCP) server that provides comprehensive trading and market data functionality for Angel One through their SmartAPI.

Features

Portfolio Management
  • View stock holdings and investment portfolio
  • Get comprehensive family account holdings
  • Check current trading positions
  • Access Risk Management System (RMS) limits
Trading Operations
  • Place buy/sell orders (market, limit, stop-loss)
  • Modify existing orders
  • Cancel orders
  • View order book and trade history
  • Create GTT (Good Till Triggered) rules
Market Data
  • Real-time Last Traded Price (LTP)
  • Historical candlestick (OHLC) data
  • Search for stocks and instruments
  • Top gainers/losers analysis
  • Put-Call Ratio (PCR) for market sentiment
Advanced Features
  • Option Greeks calculation
  • Position conversion
  • Brokerage estimation
  • Automated authentication with TOTP
  • Comprehensive error handling
  • Safety controls and dry-run mode

Installation

Development Installation (Current)
# Clone the repository
git clone https://github.com/YOUR_USERNAME/angel-one-mcp-server.git
cd angel-one-mcp-server

# Install dependencies
pip install -r requirements.txt

# Install in development mode
pip install -e .
PyPI Installation (Coming Soon)
pip install angel-one-mcp

Configuration

You can configure your Angel One credentials using either of these approaches:

Option 1: Environment Variables (Recommended)

Create a .env file in your project directory:

ANGEL_ONE_API_KEY=your_api_key
ANGEL_ONE_CLIENT_CODE=your_client_code
ANGEL_ONE_PASSWORD=your_password
ANGEL_ONE_TOTP_SECRET=your_totp_secret
MAX_ORDER_QUANTITY=10000
DRY_RUN_MODE=false

Then configure Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "angel-one-trading": {
      "command": "python",
      "args": ["-m", "angel_one_mcp.server"]
    }
  }
}
Option 2: Direct Configuration

Configure credentials directly in Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "angel-one-trading": {
      "command": "python",
      "args": ["-m", "angel_one_mcp.server"],
      "env": {
        "ANGEL_ONE_API_KEY": "your_api_key",
        "ANGEL_ONE_CLIENT_CODE": "your_client_code", 
        "ANGEL_ONE_PASSWORD": "your_password",
        "ANGEL_ONE_TOTP_SECRET": "your_totp_secret"
      }
    }
  }
}

Note: Option 1 is recommended as it keeps sensitive credentials separate from configuration files.

Usage Examples

Portfolio Management
  • "Show my current holdings"
  • "What's my available margin?"
  • "Display my open positions"
Trading
  • "Buy 100 shares of RELIANCE at market price"
  • "Place a limit order to sell 50 TCS at ₹3500"
  • "Cancel order ID 12345"
Market Data
  • "What's the current price of NIFTY?"
  • "Show me top gainers today"
  • "Get historical data for SBIN"

Security Features

  • Automatic TOTP-based authentication
  • Configurable order quantity limits
  • Dry-run mode for testing
  • Comprehensive error handling
  • No credential storage in memory

Requirements

  • Python 3.8+
  • Angel One SmartAPI account
  • Valid API credentials and TOTP setup

License

MIT License

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.