Labsco
MCP SERVER · OFFICIAL PROJECT

Upstox MCP server

by upstox

Ask about your Upstox holdings, positions, orders and IPO applications in the assistant — read-only, against your own account.

Equity & Fund Market DataOfficial source
Summary
Read-only by design — placing an order is a different product.

What this surface answers is questions: what you hold, what is open, what filled, what an IPO application did. Upstox is explicit that trading is not part of it — the connector reads, and a separate agent skill running in a coding environment with the Python SDK is what executes. Which route to take is the real decision before you start: this repository is a local server you run with your own developer app and a callback on localhost, while the hosted connector installs from Upstox's plugin marketplace and asks for re-authorisation once a day. The IPO tools are the part that is hardest to get anywhere else — your own application status, allotment and UPI mandate state sitting next to the market's open and upcoming issues.

What it is

An MCP server for the Upstox trading API. This repository is the one you run yourself: it starts on localhost:8787, authenticates with an Upstox developer app you create, and exposes profile, funds and margin, holdings, positions, MTF positions, the order book, order details and history, trades, and the IPO surface. Upstox also ships a hosted connector installed from its own plugin marketplace, covering holdings, orders, positions, mutual funds, funds and profile read-only over OAuth.

What you get
  • Account state: /get-profile, /get-funds-margin with a segment of SEC for equity or COM for commodity, /get-holdings for long-term holdings and /get-positions for short-term ones
  • /get-mtf-positions covers Margin Trade Funding exposure as its own view
  • /get-order-book returns the current day's orders with their status; /get-order-details, /get-order-history by order id or by tag, and /get-order-trades open a single order; /get-trades lists the day's executions
  • /get-ipos lists public IPOs filtered by status — open, closed, listed or upcoming — and by issue type of regular or sme, paginated up to 30 records a page
  • /get-ipo-details returns lot size, cut-off price, prospectus links, registrar information and the allotment and listing timeline for one issue
  • /get-ipo-orders returns your own applications with bids, allotment, UPI mandate and payment status, and /get-ipo-order-details opens a single application
Requirements

Node and npm. Create a regular Upstox API app in the developer portal with the redirect URL http://localhost:8787/callback, put UPSTOX_CLIENT_ID and UPSTOX_CLIENT_SECRET into a .dev.vars file, and npm start — the server then runs at http://localhost:8787, with clients reaching /mcp directly or through mcp-remote when they only speak stdio. Upstox's hosted route instead installs from the upstox/upstox-plugin-marketplace and authorises over OAuth, which has to be re-authorised once a day and needs an active, non-dormant Upstox account. That hosted connector is read-only; the separate upstox-skill agent skill is what places and manages orders, and it runs inside a coding agent with the Python SDK rather than in a chat window.