npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

angel-one-mcp

v1.0.10

Published

MCP server for Angel One SmartAPI — trade stocks, track portfolio, analyze markets & manage orders via LLM clients like Claude, Cursor & Copilot

Readme

Angel One MCP Server

npm

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.

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