LABSCO 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.
Setup effort
Build from source — git clone https://github.com/upstox/mcp-server-upstox-api.git
USE CASES
Asking what your portfolio is actually doing
Long-term holdings with current values alongside open positions and their unrealised P&L, without opening the terminal app.
Checking whether you can place the trade at all
Available margin by segment, equity or commodity, and the Margin Trade Funding exposure already committed.
Following one order through to its fills
The order's current status, every stage it passed through, and the trades that executed against it.
Keeping up with IPOs worth applying to
Open and upcoming issues filtered by mainboard or SME, then the lot size, price band, registrar and listing timeline for the one you care about.
Finding out what happened to an application
Your own IPO applications with their bids, allotment result, UPI mandate state and how much money is still blocked.
BEFORE YOU INSTALL
What to know first
Requires
- UPSTOX_CLIENT_ID in your environment
- UPSTOX_CLIENT_SECRET in your environment
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
Setup
git clone https://github.com/upstox/mcp-server-upstox-api.git
cd mcp-server-upstox-api
npm installCreate a regular Upstox API app in the Upstox developer portal (Apps -> My apps -> + New App) and set the Redirect URL to http://localhost:8787/callback
Create a file named .dev.vars in the project root and add UPSTOX_CLIENT_ID and UPSTOX_CLIENT_SECRET
npm startAdd the mcpServers block pointing at http://localhost:8787/mcp
Hosted endpoint
https://mcp.upstox.com/mcpAdd this hosted endpoint to your MCP client using the credentials listed under Requirements.
MCP Clients
Claude Desktop, Claude.ai
Open Settings → Plugins (or Customize → Plugins)
Under Personal plugins, click +, then Add marketplace
In the URL field, enter the repository:
upstox/upstox-plugin-marketplaceClick Sync, then install the upstox-mcp plugin
Open the installed plugin and go to its Connectors tab. Click Install (or Connect) next to the upstox connector
Claude opens your browser for the Upstox OAuth consent. Approve access to link your account. Re-authorize once per day
Claude Code
/plugin marketplace add upstox/upstox-plugin-marketplace
/plugin install upstox-mcp@upstox-plugins-officialChatGPT
Open Settings (or Workspace Settings for teams), then go to the Apps section
In Apps, open Advanced settings and enable Developer mode
Click Create app and fill the form with the Upstox MCP server details. Use endpoint:
https://mcp.upstox.com/mcpOnce the MCP connection succeeds and the confirmation pop-up appears, go to Chat and select Upstox MCP from Connectors
Cursor — remote
{
"mcpServers": {
"Upstox MCP": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.upstox.com/mcp"
]
}
}
}VS Code
{
"inputs": [],
"servers": {
"Upstox MCP": {
"url": "https://mcp.upstox.com/mcp"
}
}
}Claude Desktop — local
{
"mcpServers": {
"mcp-server-upstox-api": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/mcp"
]
}
}
}Cursor — local
{
"mcpServers": {
"mcp-server-upstox-api": {
"url": "http://localhost:8787/mcp"
}
}
}