Open SourceWorks With Claude & ChatGPTRuns On Your Computer

Trade Just ByAsking Your AI

OpenAlgo MCP connects your AI chat app - Claude, Cursor, Windsurf, or ChatGPT - to your OpenAlgo trading account. Place orders, check positions, and pull live prices by simply talking to it.

No dashboards. No clicking. Just type what you want, and your AI gets it done through your broker.

What It Feels Like

Here's a real exchange between a trader and their AI. Notice you never touched a dashboard.

I'm seeing weakness in banking. Square off my MIS positions in BANKNIFTY options and show me the P&L.

On it. Let me pull up your BANKNIFTY MIS positions first...

→ BANKNIFTY 52000 CE: +50 @ ₹185 (MIS)
→ BANKNIFTY 51800 PE: -50 @ ₹142 (MIS)

Closing both now...

Done. Realised P&L today: + ₹4,250

Example conversation. Your AI does the lookup and executes - you just confirm and watch.

Why Traders Like It

Made for traders who'd rather just say what they want than click through seven screens.

Talk, Don't Click

"Buy 100 RELIANCE at market." That's it. No forms, no menus - just tell your AI what to do.

One Instruction, Many Steps

Say "check my positions and close the losers" and your AI does both in one go.

Live Prices On Demand

Ask for quotes, market depth, or historical charts right inside your chat. Real numbers, real time.

Your Data Stays With You

Everything runs on your own computer. Your API key and trades never leave your machine.

Same Chat, Any Broker

Works with every broker OpenAlgo supports. Switch brokers without learning anything new.

25+ Built-In Actions

Place orders, check funds, track trades, search symbols - your AI already knows how.

How It Works

You talk, your AI acts, OpenAlgo runs it, your broker executes. Four steps - and you only handle the first one.

Step 1

You Ask

"Show my open positions and close the losing ones."

Step 2

AI Understands

Claude, Cursor, Windsurf, or ChatGPT figures out what you want.

Step 3

OpenAlgo Acts

Your OpenAlgo running on your computer handles the request.

Step 4

Broker Executes

The order goes to your broker and hits the exchange - same as always.

Things You Can Just Ask

Any of these work straight away once you've set things up. No special phrasing required - speak naturally.

Place a buy order for 100 shares of RELIANCE at market price

Show me my current positions and today's P&L

What's the latest quote for NIFTY?

Cancel all my pending orders

How much margin do I have available?

Get 5-minute historical data for BANKNIFTY for the last trading day

Find all weekly NIFTY options expiring this Thursday

Close all my MIS positions before 3:15 PM

Everything You Can Do

Anything OpenAlgo can do, your AI can now do for you. Grouped the way traders actually think.

Placing & Managing Orders

  • Place an order - Market, limit, or stop-loss - regular or intraday
  • Smart order - Automatically adjusts to your existing position size
  • Basket orders - Send multiple orders in one go (like option spreads)
  • Split big orders - Break a large order into smaller slices to get better fills
  • Modify an order - Change price or quantity of a pending order
  • Cancel orders - One at a time, or all of them at once

Positions & Holdings

  • Check open position - Your current position in any stock or contract
  • Square off all - Close every open intraday position at once
  • Position book - See everything you're currently holding
  • Long-term holdings - Your delivery / demat holdings
  • Funds & margins - Cash balance and margin available to trade

Orders & Trades Summary

  • Order status - See if a specific order was filled, pending, or rejected
  • Today's order book - All orders placed during the day
  • Trade book - All orders that actually got filled

Live Market Data

  • Live quote - Current price, bid, ask, and day's high/low
  • Market depth - Top 5 buy/sell levels in the order book
  • Historical charts - Past candles for any timeframe - daily, hourly, 5-min, etc.

Finding Instruments

  • Search any symbol - Across NSE, BSE, F&O, commodity - all exchanges
  • Symbol details - Lot size, tick size, expiry, strike, and more
  • Expiry dates - Upcoming expiries for options and futures
  • Available intervals - Which chart timeframes your broker supports

Helpful Extras

  • OpenAlgo version - Which version is running on your computer
  • Valid order types - Quickly check what your broker accepts

Works With Your Favourite AI

Use the chat app you already like. No need to switch or learn a new tool.

Claude Desktop

Anthropic's native MCP-first desktop app.

Cursor

Trade from within your editor.

Windsurf

MCP-enabled AI IDE from Codeium.

ChatGPT

Works wherever MCP is supported.

Getting Started

Three quick steps - a one-time setup, and you're talking to your trading account.

1

Have OpenAlgo Running With Your Broker

  • Make sure OpenAlgo is running on your computer and your broker is logged in.
  • Open OpenAlgo, go to Settings → API Keys, and copy your key. Keep it handy.
  • Download the MCP setup files from GitHub. The full setup guide walks through this in under a minute.
New to OpenAlgo? Start here
2

Tell Your AI About OpenAlgo

Pick your operating system below, copy the settings, and paste them into your AI app's config file. Replace the paths and API key with your own.

{
  "mcpServers": {
    "openalgo": {
      "command": "D:\\openalgo-mcp\\openalgo\\.venv\\Scripts\\python.exe",
      "args": [
        "D:\\openalgo-mcp\\openalgo\\mcp\\mcpserver.py",
        "YOUR_API_KEY_HERE",
        "http://127.0.0.1:5000"
      ]
    }
  }
}

Where the settings file lives:

Claude Desktop%APPDATA%\Claude\claude_desktop_config.json
Windsurf%APPDATA%\Windsurf\mcp_config.json
Cursor%APPDATA%\Cursor\User\settings.json

Need help with the exact paths? See the detailed setup guide.

3

Restart Your AI App and Start Trading

Close and reopen Claude Desktop, Cursor, or Windsurf. OpenAlgo will be connected automatically. Try asking something simple first:

you > “Show me my funds and open positions”

Exchanges You Can Trade

Whatever your broker lets you trade through OpenAlgo, you can trade by chat.

NSE
NSE Equity
NFO
NSE F&O
CDS
NSE Currency
BSE
BSE Equity
BFO
BSE F&O
BCD
BSE Currency
MCX
Commodity
NCDEX
NCDEX

A Few Things To Know

  • Everything runs on your own computer. Your orders and account info never leave your machine.
  • Your API key stays local - it's never uploaded or shared.
  • AI can sometimes make mistakes. Always read what it's about to do before you say yes - especially for orders.

Let your AI handle the clicks.

Set it up once. After that, just talk. Your broker, your strategies, completely under your control.