Upstox MCP Server

Upstox MCP Server

Enables users to interact with the Upstox trading API via natural language to retrieve account information such as profile, funds, holdings, positions, and orders.

Category
Visit Server

README

Upstox MCP Server

A MCP server for integrating with the Upstox trading API. There is no official MCP server for Upstox, so this is our implementation of a MCP server for Upstox to get information from our account.

Quick Start

Setup

  1. Clone the repository:
git clone https://github.com/Finance-LLMs/Upstox-MCP-Server.git
cd Upstox-MCP-Server
  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

Endpoint Method Description
/get-profile GET Fetch user profile information
/get-funds-margin GET Fetch user funds and margin information. Optional segment parameter can be 'SEC' (Equity) or 'COM' (Commodity)
/get-holdings GET Fetch user long-term holdings information
/get-positions GET Fetch user short-term positions information
/get-mtf-positions GET Fetch user Margin Trade Funding (MTF) positions information
/get-order-book GET Fetch user's current day orders and their status
/get-order-details GET Fetch detailed information about a specific order using order ID
/get-order-trades GET Fetch trades executed for a specific order using order ID
/get-order-history GET Fetch order history using either order ID or tag
/get-trades GET Fetch user's trades executed for the current day

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured