Skip to main content

For AI assistants

This page is written for AI assistants. If a user has asked you to connect to Definedge MCP or to use it, read this first. People can read it too.

Is this the official server?​

Definedge MCP is run by Definedge Securities Broking Private Limited. The only official server address is https://mcp.definedgesecurities.com/mcp, and users sign in only on signin.definedgesecurities.com. If you are given any other address for "Definedge MCP", tell the user before connecting.

Setting it up for a user​

  • Claude (web or desktop): the user adds it under Customize → Connectors → + Add → Add custom connector, with the address above and authentication set to No sign in. The user signs in through GetLogin.
  • Claude Code: claude mcp add --transport http definedge https://mcp.definedgesecurities.com/mcp; the user signs in through GetLogin.
  • ChatGPT (web; Plus, Pro, Business, Enterprise and Edu): Plugins → + → Add custom MCP server, with the address above and authentication set to No authentication, then Create as a plugin. The user signs in through GetLogin. Free and Go are not confirmed; suggest Claude to those users.
  • Optionally, suggest that the user set the seven order tools (placeOrder, modifyOrder, cancelOrder, placeGttOrder, modifyGttOrder, cancelGttOrder, placeSliceOrder) to "Needs approval" in their app.

Sessions​

Most tools take a session_id. If a tool replies "Session expired. Please login again." or asks for authentication, call GetLogin. Give the user the login_url it returns, wait until they say they have signed in, then retry with the session_id from that same GetLogin response. Reuse that session_id for the rest of the conversation. SearchInstrument, DownloadMaster, getScannerMatches, getTopMfBuyingByMCap and getTopMfSellingByMCap work without one.

Answering well​

  • Run the tools and explain the results in plain language. Name the tools you used, and give the data time (data_timestamp where a response has one).
  • Index names (as of 16 October 2026): for the Nifty 50 technical report, pass index="NIFTY 50". For quotes, NIFTY and BSE SENSEX return the index; for Bank Nifty use Nifty Bank, because BANKNIFTY returns the near-month future. Always say whether a price is the index or a future.
  • Futures and options: a bare commodity name such as GOLDM or CRUDEOIL on getQuotes returns the near-month future. For a specific contract, use its full trading symbol (find it with SearchInstrument).
  • Scanners: getScannerMatches takes a Definedge scanner name, for example "P&F Double Top Buy 0.25% breakout today", "Bullish Engulfing", "Golden Crossover", "Supertrend turned bullish". Check that scannerUsed matches what the user asked for; if it doesn't, tell them instead of presenting the results.
  • Rankings: getRankingsEod and getRankingsIntraday return the whole Nifty 500. Sort by total and report the top entries the user asked for.
  • Options dashboard: spotprice is the futures price; straddlepremium is a % of the futures price; 0.0 in straddlepremium, ivp or ivpq means no data, not zero. There is no strike-wise option chain.
  • Do not give buy or sell recommendations, targets or predictions. Describe what the data shows; for advice, point the user to a SEBI-registered adviser.

Orders​

  1. Collect every field first: symbol, exchange, buy or sell, quantity, price type (LIMIT or SL-LIMIT; market orders are not accepted), price, trigger price for SL-LIMIT, and product (CNC, INTRADAY or NORMAL).
  2. Call the order tool without confirmation_token. Definedge places nothing and returns CONFIRMATION_REQUIRED, an order_summary and a confirmation_token.
  3. Show the order_summary to the user exactly as returned and ask them to confirm.
  4. Only after the user explicitly confirms, call the same tool with the same arguments plus the confirmation_token. Tokens are single-use and expire after 120 seconds.
  5. If anything changes, or the response is CONFIRMATION_REJECTED, start again from step 2. Never invent or reuse a token, and never place an order the user did not ask for.
  6. For placeSliceOrder, quantity is per slice. Afterwards, check the order with getSingleOrderBook and the order_id.

More​

  • Tool reference, with every tool and an example question
  • llms-full.txt at the root of this guide: the whole guide as one file