mcpField
A
Angel One

Angel One

Local
github.com/ameernoufilFinance1Updated 23w ago

About Angel One

Angel One is a TypeScript MCP server for using Angel One SmartAPI through MCP clients. It covers trading, portfolio and market data, with guarded trade mutations and automatic TOTP generation.

Key features

  1. 01Place and manage orders
  2. 02Read holdings, positions, and funds
  3. 03Retrieve quotes, candles, OI, and Greeks
  4. 04Manage GTT rules
  5. 05Estimate charges and margin
  6. 06Guard trading actions with limits

Use cases

  1. 01Submit or review orders from an MCP client
  2. 02Check portfolio holdings and available funds
  3. 03Inspect market quotes and derivatives data
  4. 04Estimate trade costs or required margin

MCP support

Exposes Angel One SmartAPI authentication, portfolio, order, market, GTT, and calculation tools to MCP clients over stdio. Trade-changing operations have configurable soft and hard limits.

Configuration

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

mcp.json · Universal config
{
"mcpServers": {
"ameernoufil-angel-one": {
"command": "npx",
"args": [
"-y",
"angel-one-mcp"
],
"env": {
"ANGEL_API_KEY": "<ANGEL_API_KEY>",
"ANGEL_CLIENT_ID": "<ANGEL_CLIENT_ID>",
"ANGEL_PASSWORD": "<ANGEL_PASSWORD>",
"ANGEL_TOTP_SECRET": "<ANGEL_TOTP_SECRET>",
"SOFT_MAX_ORDER_QTY": "<SOFT_MAX_ORDER_QTY>",
"HARD_MAX_ORDER_QTY": "<HARD_MAX_ORDER_QTY>",
"SOFT_MAX_ORDER_VALUE": "<SOFT_MAX_ORDER_VALUE>",
"HARD_MAX_ORDER_VALUE": "<HARD_MAX_ORDER_VALUE>"
}
}
}
}
Run commandnpx -y angel-one-mcp
Environment variables to set
ANGEL_API_KEYSecretAngel One SmartAPI app key
ANGEL_CLIENT_IDSecretAngel One client code
ANGEL_PASSWORDSecretAngel One password or MPIN
ANGEL_TOTP_SECRETSecretBase32 TOTP secret used to generate login OTPs
SOFT_MAX_ORDER_QTYSoft max order quantity
HARD_MAX_ORDER_QTYHard max order quantity
SOFT_MAX_ORDER_VALUESoft max order value in INR
HARD_MAX_ORDER_VALUEHard max order value in INR

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
npmangel-one-mcp1.0.10

Tools

32

Saved tool list · updated 2w ago

This tool takes no parameters.

Details

From the project 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:

{
  "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_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:

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_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:

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

MIT

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.