angleone-mcp-sever
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@angleone-mcp-severShow my current holdings"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
angleone-mcp-sever
An MCP (Model Context Protocol) server that exposes Angel One's SmartAPI as tools for Claude Code (or any MCP client) — login, portfolio data, market quotes, historical candles, and order placement/modification/cancellation.
⚠️ Order-related tools (
place_order,modify_order,cancel_order) execute real trades on your Angel One account. Use with care.
Prerequisites
Python 3.10+
An Angel One trading account with SmartAPI access
An API key generated at https://smartapi.angelbroking.com/apps
TOTP enabled on your SmartAPI login (you'll need the base32 TOTP secret, not a 6-digit code)
Claude Code CLI, if you want to connect this as an MCP server
Related MCP server: Kite MCP Server
Setup
Clone the repo and install dependencies:
git clone https://github.com/bns218/angleone-mcp-sever.git cd angleone-mcp-sever pip install -r requirements.txtCopy the env template and fill in your credentials:
cp .env.example .envEdit
.env:SMARTAPI_API_KEY=your_api_key SMARTAPI_CLIENT_CODE=your_client_code SMARTAPI_PASSWORD=your_password SMARTAPI_TOTP_SECRET=your_totp_base32_secret.envis gitignored — never commit it.Sanity-check the server starts:
cd mcp_server python -c "import server; print('tools loaded ok')"
Connecting to Claude Code
Register the server with the Claude Code CLI. Use --scope project to make it available only in this directory, or --scope user to make it available in every Claude Code session on your machine.
claude mcp add angleone-smartapi --scope user -- python "/absolute/path/to/angleone-mcp-sever/mcp_server/server.py"Verify it connected:
claude mcp listYou should see angleone-smartapi ... ✓ Connected.
Available tools
Tool | Description |
| Authenticate with SmartAPI using |
| Terminate the current session. |
| Get account profile details. |
| Get current demat holdings. |
| Get today's open positions. |
| Get available margin/funds (RMS limits). |
| Get today's orders and statuses. |
| Get today's executed trades. |
| Get last traded price for an exchange/symbol/token triple. |
| Get live LTP for a tracked stock/index by plain name (e.g. |
| Get historical OHLCV candles by exchange/token. |
| Get historical OHLCV candles by plain name. Supports daily ( |
| List available derivative expiry dates for a stock/index. |
| Get the CE/PE option chain (strikes + LTP) around spot for a stock/index. |
| Place a real order. Executes a real trade. |
| Modify an existing open order. Affects a real order. |
| Cancel an open order. Cancels a real order. |
get_price, get_historical_by_symbol, list_option_expiries, and get_option_chain resolve
symbols against a local lookup (mcp_server/instruments.json + derivatives.json) covering:
The tracked NSE F&O stock list (208 symbols)
Main tradable indices with F&O contracts: NIFTY, BANKNIFTY, FINNIFTY, MIDCPNIFTY (NSE), SENSEX (BSE)
NSE sectoral indices, spot quote only, no F&O: NIFTY AUTO, NIFTY FMCG, NIFTY IT, NIFTY MEDIA, NIFTY METAL, NIFTY PHARMA, NIFTY PSU BANK, NIFTY PVT BANK, NIFTY REALTY, NIFTY ENERGY, NIFTY INFRA, NIFTY COMMODITIES, NIFTY CONSUMPTION, NIFTY MNC, NIFTY SERV SECTOR, NIFTY CPSE, NIFTY PSE
No live scrip search needed for any of the above — use the exact multi-word name for sectoral indices
(e.g. "NIFTY PSU BANK").
Claude Code Skill
A companion skill at ~/.claude/skills/nse-fo-quotes/SKILL.md (user scope) tells Claude to answer
price/candle/option-chain questions for the tracked symbol list directly using these tools, without
asking for exchange/token details first. It's independent of this repo — copy the skill file if you
set the server up on another machine.
Project structure
mcp_server/
server.py # FastMCP server exposing SmartAPI operations as MCP tools
smartapi_client.py # Thin wrapper around the smartapi-python SDK
instruments.json # Local symbol -> {exchange, tradingsymbol, token} lookup
derivatives.json # Local option/future contract lookup per underlying
build_instruments.py # Regenerates the two files above from Angel One's instrument master
requirements.txt
.env.example # Credential template (copy to .env)
.mcp.json # Claude Code project-scope MCP registrationUpdating the tracked symbol list
instruments.json and derivatives.json are static snapshots. To refresh them (new F&O stocks
added/removed, or the derivatives file goes stale near month-end rollovers):
Edit
FNO_STOCKS/INDEX_NAMESinmcp_server/build_instruments.pyif the symbol list changed.Download the current instrument master and rebuild:
cd mcp_server python -c "import requests; open('OpenAPIScripMaster.json','wb').write(requests.get('https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json').content)" python build_instruments.py rm OpenAPIScripMaster.json
Notes
Login re-authenticates and replaces the session each time it's called; safe to call repeatedly — and every tool auto-logs in on first use if no session exists yet.
For symbols outside the tracked list, use SmartAPI's scrip search (or the Angel One instrument master) to look up tokens, then call
get_ltp/get_historical_candledirectly with exchange + token.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -license-quality-maintenanceAn MCP server implementation that integrates with Angle One APIs to provide standardized access to financial market data, trading operations, and portfolio management.Last updated
- Alicense-qualityCmaintenanceAn MCP server for integrating with Zerodha Kite API that provides Claude with tools to interact with your Kite trading account, enabling portfolio management, market data access, and order execution.Last updated345MIT
- Flicense-qualityCmaintenanceMCP server exposing Tradier brokerage tools to Claude, enabling account balance checks, position management, order operations, and market data queries.Last updated
- Alicense-qualityBmaintenanceMCP server for Angel One SmartAPI. Lets AI clients trade Indian stocks, manage orders and GTT rules, read holdings/positions/funds, fetch quotes/candles/OI/Greeks, and estimate margin/brokerage with TOTP login and built-in safety guards.Last updated101MIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
Open-source MCP server for Zerodha Kite Connect. Portfolio, market data, backtesting, alerts.
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bns218/angleone-mcp-sever'
If you have feedback or need assistance with the MCP directory API, please join our Discord server