mcpField
M
mcp-server-upstox-api

mcp-server-upstox-api

Local
github.com/PradeepJaiswarDeveloper Tools3Updated 81w ago

About mcp-server-upstox-api

mcp-server-upstox-api is an MCP server for Upstox users who want to query trading account data through natural-language prompts. It covers account details, positions, orders, and trades.

Key features

  1. 01Retrieve profile and funds/margin
  2. 02View long-term holdings and positions
  3. 03Query MTF positions
  4. 04Inspect orders, status, and history
  5. 05Retrieve order executions and daily trades

Use cases

  1. 01Check account details and available margin
  2. 02Review holdings and current position P&L
  3. 03Check today's orders and their progress
  4. 04Inspect order executions and daily trades

MCP support

The MCP server exposes Upstox API endpoints for account, funds, positions, orders, and trades to MCP clients. The README describes connecting it to Claude Desktop and Cursor.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"upstox-api": {
"command": "npx",
"args": [
"-y",
"mcp-remote"
]
}
}
}
Run commandnpx -y mcp-remote

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmmcp-remote

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

mcp-server-upstox-api

A MCP server for integrating with the Upstox trading API.

Quick Start

Setup
  1. Clone the repository:
git clone https://github.com/yourusername/mcp-server-upstox-api.git
cd mcp-server-upstox-api
  1. Install dependencies:
npm install
Run the Server

To start the MCP server:

npm run start

Your MCP server will be running at http://localhost:8787

MCP Configuration

Claude Desktop Configuration

To use this MCP server with Claude Desktop, add the following configuration to your Claude Desktop settings:

{
  "mcpServers": {
    "mcp-server-upstox-api": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:8787/sse"
      ]
    }
  }
}
Cursor MCP Configuration

To use this MCP server with Cursor, add the following configuration to your Cursor MCP settings (usually located at ~/.cursor/mcp.json):

{
  "mcpServers": {
    "mcp-server-upstox-api": {
      "url": "http://localhost:8787/sse"
    }
  }
}

These configurations allow Claude Desktop and Cursor to connect to your local MCP server and use the Upstox API endpoints.

Using with Claude and Cursor

You can interact with the Upstox API through natural language prompts. Here are some example prompts for each command:

Profile Information
  • "What's my Upstox profile information?"
  • "Show me my active segments and products in Upstox"
  • "What's my user ID and email in Upstox?"
Funds and Margin
  • "What's my available margin in Upstox?"
  • "Show me my equity segment funds and margin details"
  • "What's my commodity segment margin availability?"
Holdings
  • "What stocks do I currently hold in Upstox?"
  • "Show me my long-term holdings with their current values"
  • "What's the total value of my holdings in Upstox?"
Positions
  • "What are my current open positions in Upstox?"
  • "Show me my intraday positions with their P&L"
  • "What's my total unrealized P&L from current positions?"
MTF Positions
  • "What are my Margin Trade Funding positions?"
  • "Show me my MTF positions with their current values"
  • "What's the total MTF exposure in my account?"
Order Book
  • "Show me my current day's orders in Upstox"
  • "What are my pending orders in Upstox?"
  • "Show me my order history for today"
  • "What's the status of my recent orders?"
  • "List all my completed orders for today"
Order Details
  • "Show me the details of order ID xxxxxxxxxxxxxxx"
  • "What's the status of my order with ID xxxxxxxxxxxxxxx"
  • "Get the complete information for order xxxxxxxxxxxxxxx"
  • "Check the execution status of order xxxxxxxxxxxxxxx"
  • "View the details of my recent order xxxxxxxxxxxxxxx"
Order History
  • "Show me the history of order ID xxxxxxxxxxxxxxx"
  • "Get all status updates for order xxxxxxxxxxxxxxx"
  • "What's the progression of order xxxxxxxxxxxxxxx"
  • "Show me all stages of order xxxxxxxxxxxxxxx"
  • "Get order history for tag xxxxxxxxxxxxxxx"
Order Trades
  • "Show me the trades for order ID xxxxxxxxxxxxxxx"
  • "What trades were executed for order xxxxxxxxxxxxxxx"
  • "Get the trade details for my order xxxxxxxxxxxxxxx"
  • "List all trades associated with order xxxxxxxxxxxxxxx"
  • "Show me the execution details for order xxxxxxxxxxxxxxx"
Trades
  • "Show me my trades for today"
  • "What trades have I executed today?"
  • "Get my daily trade history"
  • "List all my completed trades for the day"
  • "Show me my trade details with execution prices"

Available Endpoints

EndpointMethodDescription
/get-profileGETFetch user profile information
/get-funds-marginGETFetch user funds and margin information. Optional segment parameter can be 'SEC' (Equity) or 'COM' (Commodity)
/get-holdingsGETFetch user long-term holdings information
/get-positionsGETFetch user short-term positions information
/get-mtf-positionsGETFetch user Margin Trade Funding (MTF) positions information
/get-order-bookGETFetch user's current day orders and their status
/get-order-detailsGETFetch detailed information about a specific order using order ID
/get-order-tradesGETFetch trades executed for a specific order using order ID
/get-order-historyGETFetch order history using either order ID or tag
/get-tradesGETFetch user's trades executed for the current day

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.