Angel One

io.github.ameernoufil由 GitHub 帳號 ameernoufil 發布v1.0.10更新於 Oct 24, 2026

Angel One SmartAPI MCP for orders, portfolio, market data, GTT rules, charges, and margin.

已驗證STDIO僅桌面金融資料與分析

概覽

AI 產生的概覽

讓助理在 Angel One SmartAPI 帳戶上交易與查詢:下單、持倉、行情、GTT 規則與保證金估算。

可以做什麼
這是一個本機 stdio MCP 伺服器,串接 Angel One SmartAPI。功能涵蓋驗證(登入/登出)、投資組合查詢(持股、部位、資金、部位轉換)、訂單操作(下單、改單、取消、訂單簿與成交查詢)、行情資料(搜尋、最新價、報價、K 線、未平倉合約、希臘值、漲跌榜、PCR)、GTT 規則(建立、修改、取消、列表、檢視),以及保證金與手續費估算。它採用延遲登入與權杖更新,並可用 base32 密鑰自動產生 TOTP 驗證碼。
適用情境
適合讓助理直接操作 Angel One 交易帳戶的情境:查看持股、部位與資金,取得報價與 K 線,或在聊天用戶端下單、管理訂單與 GTT 規則。它面向個人交易流程,而非僅供讀取的行情研究。
執行需求
以 stdio 方式在本機執行,通常透過 npx 使用 npm 套件 angel-one-mcp,或從原始碼執行並需要 Node.js 18+。需要 Angel One SmartAPI 的 app key、客戶代碼、密碼或 MPIN,以及 base32 TOTP 密鑰,分別以環境變數 ANGEL_API_KEY、ANGEL_CLIENT_ID、ANGEL_PASSWORD、ANGEL_TOTP_SECRET 提供。選用的訂單數量與金額上限也由環境變數設定。需要能連線至 Angel One 的網路。
安裝前請注意
伺服器保存真實交易憑證與 TOTP 密鑰,能讀取用戶端設定的人即可操作該帳戶。它可以下單、改單、取消、轉換部位並管理 GTT 規則,會實際動用資金。軟上限預設會攔阻,但可用 force: true 覆寫;硬上限只能透過修改環境變數並重新啟動來調整。市價單在送出前會依最新價做金額檢查,但該檢查並非保證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Angel One,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

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.

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:

json
{  "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

bash
git clone https://github.com/ameernoufil/angel-one-mcp.gitcd angel-one-mcpnpm installcp .env.example .envnpm run buildnpm 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:

env
ANGEL_API_KEY=your_smartapi_keyANGEL_CLIENT_ID=your_client_idANGEL_PASSWORD=your_mpinANGEL_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:

bash
npm installnpm run buildnpm run lintnpm run lint:fixnpm run formatnpm run devnpm 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

來源:README.md,提交 c5b9081

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.10最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分