Skip to content
Conduit

mcp server

groww-mcp

πŸš€ The most complete MCP server for Groww β€” 25 tools, ⚑ automated TOTP auth, GTT/OCO smart orders, πŸ“ˆ option chain with Greeks, backtesting. πŸ€– Connect any AI assistant to your Groww trading account.

developerJai/groww-mcpcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 20, 2026

Groww MCP Server

Gem Version Gem Downloads Ruby MCP License: MIT Groww API

The most complete MCP server for Groww β€” 25 tools, automated TOTP auth, smart orders (GTT/OCO), option chain with Greeks, and local instrument search. No other Groww MCP has all of these.

A Model Context Protocol (MCP) server that connects AI assistants (Claude, GPT, Gemini) to the Groww trading platform. Trade stocks, manage your portfolio, place F&O orders, and access live market data β€” all through natural language.

Built with Ruby, powered by the official MCP Ruby SDK.

Key Highlights

  • 25 tools β€” most comprehensive Groww MCP available
  • Zero manual auth β€” automated TOTP token generation (no daily website visits)
  • Smart Orders β€” GTT and OCO support (only Groww MCP with this)
  • Option Chain β€” with Greeks (Ξ”, Ξ“, Θ, Ξ½) for options analysis
  • Works with β€” Claude Code, Claude Desktop, any MCP-compatible AI assistant

Why This MCP?

Featuregroww-mcp (this)darved2305 (TS)arkapravasinha (Python)karthik1729 (Go)
Tools2523~2015
Auto TOTP authβœ…βŒβŒβŒ
Token auto-refreshβœ…βŒβŒβŒ
3 auth methodsβœ…Token onlyAPI Key onlyToken only
Smart Orders (GTT/OCO)βœ…βŒβŒβŒ
Option Chain + Greeksβœ…βŒβŒβŒ
Instruments Search (local, CSV-based)βœ…βŒβœ…βŒ
F&O supportβœ…βŒβœ…βœ…
Subscription hintsβœ…βŒβŒβŒ
Official MCP SDKβœ…βœ…βœ…Custom
LanguageRubyTypeScriptPythonGo

Quick Start

Prerequisites

  • Ruby >= 3.1.0 (tested on 4.0.1)
  • A Groww trading account with API access

Installation

Install from RubyGems:

gem install groww-mcp

Or run from source:

git clone https://github.com/developerjai/groww-mcp.git
cd groww-mcp
bundle install

Configuration

cp .env.example .env

Edit .env with your Groww credentials (see Authentication below).

Connect to Claude Code

Add to your .mcp.json:

{
  "mcpServers": {
    "groww": {
      "type": "stdio",
      "command": "groww-mcp",
      "env": {
        "GROWW_TOTP_KEY": "your_totp_key",
        "GROWW_TOTP_SECRET": "your_totp_secret"
      }
    }
  }
}

Or use with Claude Desktop β€” add to claude_desktop_config.json:

{
  "mcpServers": {
    "groww": {
      "command": "groww-mcp"
    }
  }
}

Running from source instead of the gem? Use "command": "ruby", "args": ["/path/to/groww-mcp/bin/groww-mcp"].

Authentication

Groww MCP supports 3 authentication methods. Choose the one that fits your workflow:

Method 1: TOTP (Recommended)

Fully automated. No daily manual steps. The server generates access tokens automatically using a TOTP secret.

Setup (one-time, 2 minutes):

  1. Go to groww.in β†’ Log in

  2. Navigate to Profile β†’ Settings β†’ Trading APIs

  3. Click "Generate API key" dropdown β†’ "Generate TOTP token"

  4. You'll get two values:

    • TOTP Token (a long JWT string starting with eyJ...) β†’ This is your GROWW_TOTP_KEY
    • TOTP QR Secret (a short base32 string like UG3X...) β†’ This is your GROWW_TOTP_SECRET
  5. Add to your .env:

GROWW_TOTP_KEY=eyJraWQi...your_totp_jwt_key
GROWW_TOTP_SECRET=UG3XTATB22XLH5SGGLHHV736PEOYUZSB

That's it. The server will automatically generate fresh access tokens on every startup. No manual steps, no daily website visits.

Method 2: API Key + Secret (Approval)

Requires daily approval on the Groww website before the server can generate tokens.

Setup:

  1. Go to groww.in β†’ Settings β†’ Trading APIs
  2. Click "Generate API key" β†’ Create a key
  3. Copy the API Key and API Secret
  4. Add to .env:
GROWW_API_KEY=eyJraWQi...your_api_key
GROWW_API_SECRET=your_api_secret
  1. Daily: Visit the Trading APIs page and click "Approve" next to your key

Method 3: Direct Access Token (Manual)

For quick testing. Token expires daily at 6:00 AM IST.

  1. Go to groww.in β†’ Settings β†’ Trading APIs
  2. Click "Generate API key" dropdown β†’ "Generate Access Token"
  3. Copy the token
  4. Add to .env:
GROWW_ACCESS_TOKEN=eyJraWQi...your_access_token

⚠️ You'll need to regenerate this token every day before 6:00 AM IST.

Tools

Portfolio (Free)

ToolDescription
get_holdingsAll stocks in your DEMAT account with avg price, quantity, ISIN
get_positionsOpen intraday/F&O positions with unrealized P&L
get_marginsAvailable cash, collateral, equity & F&O margin details
calculate_marginPre-check margin requirement for a basket of orders before placing them

Orders (Free)

ToolDescription
get_ordersList all orders with status, filterable by segment
get_order_detailDetailed status of a specific order
get_order_tradesPartial fill details for a specific order
place_orderPlace BUY/SELL orders (MARKET, LIMIT, SL, SL-M)
modify_orderModify pending orders (price, quantity, type)
cancel_orderCancel open/pending orders

Smart Orders β€” GTT/OCO (Free)

ToolDescription
get_smart_ordersList all GTT and OCO orders
create_smart_orderCreate GTT (trigger-based) or OCO (stop-loss + target)
modify_smart_orderUpdate triggers, quantities, and prices
cancel_smart_orderCancel pending smart orders

GTT (Good Till Triggered): Automatically places an order when price hits your target. OCO (One Cancels Other): Sets both stop-loss AND target β€” whichever hits first executes.

Market Data (β‚Ή499/mo subscription)

ToolDescription
get_quoteLive quote with OHLC, bid/ask, volume, change %
get_ltpLast traded price for up to 50 symbols at once
get_ohlcOHLC data for up to 50 symbols
get_option_chainFull option chain for an expiry with OI, IV, and Greeks (Ξ”, Ξ“, Θ, Ξ½)
get_greeksGreeks (Ξ”, Ξ“, Θ, Ξ½, ρ) and IV for a specific option contract
get_historical_dataHistorical candlestick data for analysis (custom intervals supported)

Market data tools require the Groww Live Data subscription (β‚Ή499 + GST/month). Without it, these tools will return a clear error message explaining how to subscribe.

Instruments (Free)

Instrument lookup runs locally against Groww's public instruments CSV (cached for 24h) β€” fast, and no Live Data subscription needed.

ToolDescription
search_instrumentsFind stocks, F&O, ETFs by name or symbol (local CSV search)
get_instrument_detailLot size, tick size, expiry, contract details (local CSV lookup)
download_instrumentsComplete CSV of all tradable instruments

Note on backtesting: the Groww API does not offer a backtesting endpoint, so this server doesn't ship a run_backtest tool. Use get_historical_data to pull candles and let your AI assistant run the analysis.

Other

ToolDescription
authenticateManually trigger token refresh (auto-handled normally)
get_profileAccount info: UCC, exchanges, segments, DDPI status

Groww API Rate Limits

CategoryRequests/secRequests/min
Orders (create, modify, cancel)10250
Live Data (quote, LTP, OHLC)10300
Non-Trading (orders, holdings, positions)20500

Examples

Once connected, you can use natural language with your AI assistant:

"Show me my current holdings"
"What's my available margin?"
"Place a limit buy order for 10 shares of RELIANCE at β‚Ή2,800"
"Cancel order ORD123456"
"Get the current price of INFY" (requires Live Data subscription)

Project Structure

groww-mcp/
β”œβ”€β”€ bin/
β”‚   └── groww-mcp              # Executable entry point
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ groww_mcp.rb           # Main module, tool registry (25 tools)
β”‚   └── groww_mcp/
β”‚       β”œβ”€β”€ version.rb         # Gem version
β”‚       β”œβ”€β”€ auth.rb            # 3-method authentication (TOTP, approval, manual)
β”‚       β”œβ”€β”€ client.rb          # Groww API client (net/http, correct endpoints)
β”‚       β”œβ”€β”€ base_tool.rb       # Shared tool helpers
β”‚       └── tools/
β”‚           β”œβ”€β”€ auth_tools.rb          # authenticate
β”‚           β”œβ”€β”€ portfolio_tools.rb     # holdings, positions, margins
β”‚           β”œβ”€β”€ order_tools.rb         # place, modify, cancel, list, detail
β”‚           β”œβ”€β”€ smart_order_tools.rb   # GTT, OCO (create, modify, cancel, list)
β”‚           β”œβ”€β”€ market_tools.rb        # quote, LTP, OHLC, historical
β”‚           β”œβ”€β”€ option_chain_tools.rb  # option chain, Greeks, order trades
β”‚           β”œβ”€β”€ instrument_tools.rb    # local search, detail, CSV download
β”‚           └── user_tools.rb          # profile
β”œβ”€β”€ .env.example               # Configuration template
β”œβ”€β”€ Gemfile                    # Dependencies
β”œβ”€β”€ groww-mcp.gemspec          # Gem specification
β”œβ”€β”€ LICENSE                    # MIT
└── README.md                  # This file

Important Notes

  • Access tokens expire daily at 6:00 AM IST. TOTP auth handles this automatically.
  • SEBI compliance: Groww requires a static IP for order placement. Register yours at Trading APIs β†’ "Add static IP".
  • Live Data (quotes, LTP, OHLC, historical) requires the β‚Ή499/mo subscription.
  • Order placement executes real trades with real money. The AI will always confirm before placing orders.

Other Groww MCP Servers

Looking for alternatives? Here's every Groww MCP server available:

ProjectLanguageToolsHighlightsLimitations
groww-mcp (this)Ruby25Auto TOTP, GTT/OCO, option chain + Greeks, local instrument searchβ€”
darved2305/groww-mcpTypeScript23Mock mode, SIP/MF toolsNo auto-auth, no smart orders
arkapravasinha/groww-mcp-serverPython~2011 technical analysis toolsNo auto-auth, no smart orders
venkatakaushikvemani/groww-mcpTypeScript8npm published, intent-based routingMinimal tool set
karthik1729/groww-mcpGo15Correct API paths, margin calculatorNo auto-auth, no option chain

Built for Groww

This project is built on top of the Groww Trade API to make algorithmic and AI-assisted trading accessible to every Groww user.

@AskGroww β€” If you're from the Groww team, I'd love to collaborate. This MCP server makes your Trade API accessible to every AI assistant (Claude, GPT, Gemini) through the open MCP standard. Let's make Groww the most AI-friendly broker in India.

Contributing

Contributions are welcome! Whether it's a bug fix, new tool, documentation improvement, or feature idea β€” all PRs are appreciated.

See CONTRIBUTING.md for guidelines.

Some ideas to get started:

  • Add support for mutual fund tools (SIP, redemption, NAV)
  • Improve error messages and edge case handling
  • Add tests with mock API responses
  • Documentation and examples for different AI assistants

License

MIT

Author

Building AI-powered tools for Indian markets.

↑↓ navigate openesc close