Tilakraj0308/angelone-mcp
If you are the rightful owner of angelone-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
Angel One MCP Server is a Model Context Protocol server designed to facilitate interaction with the Angel One trading platform through natural language commands.
Angel One MCP Server
A Model Context Protocol (MCP) server for interacting with Angel One (Angel Broking) trading platform. This server enables AI assistants like Claude to access your Angel One account, view holdings, place orders, and manage your portfolio through natural language commands.
Features
- Portfolio Management: View current holdings and portfolio summary
- Order Management: Place buy/sell orders with various order types (SL-L, SL-M, Target)
- Order Tracking: View and cancel pending orders
- Historical Data: Fetch OHLCV data for stocks
- Smart Symbol Resolution: Automatically resolves company names to trading symbols
Prerequisites
- Python 3.12 or higher
- Angel One trading account with API access
- Angel One API credentials (API key, username, password, TOTP token)
Installation
Option 1: Using uv (Recommended)
uv is a fast Python package installer and resolver.
-
Install uv: Follow the installation instructions at https://docs.astral.sh/uv/getting-started/installation/
-
Clone and setup the project:
git clone https://github.com/Tilakraj0308/angelone-mcp.git cd angelone-mcp uv sync -
Download latest market mappings:
uv run python scripts/downloadLatestMappings.py
Option 2: Using pip
-
Clone the repository:
git clone https://github.com/Tilakraj0308/angelone-mcp.git cd angelone-mcp -
Create a virtual environment:
python -m venv .venv # Activate it # On macOS/Linux: source .venv/bin/activate # On Windows: .venv\Scripts\activate -
Install dependencies:
pip install -e . -
Download latest market mappings:
python scripts/downloadLatestMappings.py
Configuration
-
Create a
.envfile in the project root:cp .env.example .env -
Fill in your Angel One credentials:
api_key = "your_api_key" username = "your_client_id" pwd = "your_password" token = "your_totp_token" threshold = "80"Configuration Parameters:
api_key: Your Angel One API keyusername: Your Angel One client IDpwd: Your Angel One passwordtoken: Your TOTP token from Angel One mobile appthreshold: Fuzzy matching threshold for company name resolution (0-100)
Running the Server
Standalone Mode
# Using uv
uv run angelone-mcp
# Using pip (with venv activated)
angelone-mcp
With Claude Desktop
-
Locate your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Add the MCP server configuration:
If using uv:
{ "mcpServers": { "angelone": { "command": "uv", "args": [ "--directory", "/absolute/path/to/angelone-mcp", "run", "angelone-mcp" ] } } }If using pip:
{ "mcpServers": { "angelone": { "command": "/absolute/path/to/angelone-mcp/.venv/bin/angelone-mcp", "args": [] } } }On Windows with pip, use:
{ "mcpServers": { "angelone": { "command": "C:\\absolute\\path\\to\\angelone-mcp\\.venv\\Scripts\\angelone-mcp.exe", "args": [] } } } -
Restart Claude Desktop

Available Tools
The MCP server provides the following tools to Claude:
| Tool | Description |
|---|---|
get_exchanges | Get list of available exchanges (NSE, BSE) |
current_holdings | View your current stock holdings and portfolio summary |
get_pending_orders | View all pending orders |
get_stock_details | Fetch historical OHLCV data for a stock |
buy_stock_sll | Place a Stop Loss Limit buy order |
buy_stock_slm | Place a Stop Loss Market buy order |
sell_stock_sll | Place a Stop Loss Limit sell order |
sell_stock_slm | Place a Stop Loss Market sell order |
target_sell | Place a target sell order |
cancel_order | Cancel a pending order |
Usage Examples
Once configured with Claude Desktop, you can use natural language commands like:
- "Show me my current holdings"
- "What are my pending orders?"
- "Get the historical data for Reliance Industries from last week"
- "Place a stop loss buy order for 10 shares of TCS at trigger price 3500 and limit 3505"
- "Sell all my HDFC Bank shares when price reaches 1600"
- "Cancel order with ID 123456"
Example Conversation

Security Notes
⚠️ Important:
- Never commit your
.envfile to version control - Keep your API credentials secure
- The
.envfile is already in.gitignorefor your protection - Review all orders before confirming through Claude
- This tool has access to place real trades - use with caution
Troubleshooting
Common Issues
-
Symbol not found: The server uses fuzzy matching to resolve company names. If it fails, try using the exact trading symbol (e.g., "SBIN-EQ" for State Bank of India)
-
Session expired: The server automatically manages sessions, but if you encounter authentication errors, restart the server
-
Missing mappings: Run the
downloadLatestMappings.pyscript to refresh market datauv run python scripts/downloadLatestMappings.py # or with pip python scripts/downloadLatestMappings.py -
Claude Desktop not detecting server:
- Verify the absolute path in your config file
- Check that the server runs in standalone mode first
- Restart Claude Desktop completely
-
Import errors: Make sure you've installed the package with
pip install -e .oruv sync
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
MIT License - see file for details
Disclaimer
⚠️ IMPORTANT DISCLAIMER
This software is provided for educational and informational purposes only. Trading in financial markets involves substantial risk of loss and is not suitable for every investor.
- This tool can place real trades with real money
- The authors and contributors are not responsible for any financial losses
- Always verify orders before execution
- Test thoroughly with small amounts first
- Understand the risks involved in algorithmic trading
- This is NOT financial advice
- Use at your own risk