Skip to content

Getting Started

Jai Rajput edited this page Jul 3, 2026 · 1 revision

Getting Started

Prerequisites

  • Ruby >= 3.1.0 (tested on 4.0.1)
  • A Groww trading account with API access enabled
  • An MCP-compatible AI assistant (Claude Code, Claude Desktop, etc.)

Installation

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 the Authentication page for detailed setup instructions.

Connect to Claude Code

Add to your project's .mcp.json:

{
  "mcpServers": {
    "groww": {
      "type": "stdio",
      "command": "ruby",
      "args": ["/path/to/groww-mcp/bin/groww-mcp"],
      "env": {
        "GROWW_TOTP_KEY": "your_totp_key",
        "GROWW_TOTP_SECRET": "your_totp_secret"
      }
    }
  }
}

Replace /path/to/groww-mcp with the actual path where you cloned the repo.

Connect to Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "groww": {
      "command": "ruby",
      "args": ["/path/to/groww-mcp/bin/groww-mcp"]
    }
  }
}

Using with RVM

If you use RVM, specify the full Ruby path and set gem environment variables:

{
  "mcpServers": {
    "groww": {
      "type": "stdio",
      "command": "/path/to/.rvm/rubies/ruby-4.0.1/bin/ruby",
      "args": ["/path/to/groww-mcp/bin/groww-mcp"],
      "env": {
        "GROWW_TOTP_KEY": "your_totp_key",
        "GROWW_TOTP_SECRET": "your_totp_secret",
        "GEM_HOME": "/path/to/.rvm/gems/ruby-4.0.1",
        "GEM_PATH": "/path/to/.rvm/gems/ruby-4.0.1:/path/to/.rvm/gems/ruby-4.0.1@global",
        "PATH": "/path/to/.rvm/gems/ruby-4.0.1/bin:/path/to/.rvm/rubies/ruby-4.0.1/bin:/usr/local/bin:/usr/bin:/bin"
      }
    }
  }
}

Verify It Works

After restarting your AI assistant, try:

"Show me my Groww holdings"
"What's my available margin?"
"Get my order history"

If authentication is set up correctly, you'll see your live account data.

Next Steps

Clone this wiki locally