Angel One Mcp
MCP 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.
README
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.
Discoverability
- npm package:
angel-one-mcp - Official MCP Registry:
io.github.ameernoufil/angel-one - GitHub 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 start
If 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_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_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 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.