Get the FREE Ultimate OpenClaw Setup Guide →

upstox

MCP Server for interacting with Upstox APIs

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio adibhattar95-upstox-mcp-server node server.js \
  --env ENVIRONMENT="sandbox or production (optional)" \
  --env SERVER_NAME="Your server name (e.g., Upstox MCP Server)" \
  --env UPSTOX_API_KEY="Your Upstox API Key" \
  --env UPSTOX_SECRET_KEY="Your Upstox Secret Key"

How to use

The Upstox MCP Server exposes a set of MCP tools to interact with the Upstox API for trading and fund analysis. It provides capabilities to retrieve user profiles, funds and holdings, fetch real-time market prices, and place orders through a unified MCP interface. Tools include get_profile_details_tool, get_user_funds_margin_tool, get_holdings_tool, get_market_price_tool, place_order_tool, get_brokerage_details_tool, and list_capabilities_tool. Once the server is running, connect via an MCP client (for example Claude or another MCP client) and call these tools to perform tasks such as inspecting your Upstox account, checking balances and holdings, obtaining live market data, and executing trades. The server uses your Upstox sandbox credentials and instrument data to provide accurate market prices and trading capabilities.

How to install

Prerequisites:

  • Node.js installed on your machine
  • Git to clone the repository
  • Upstox sandbox account and API credentials (API Key and Secret) as described in the README

Install steps:

  1. Clone the repository git clone https://github.com/adibhattar95-upstox-mcp-server.git cd upstox-mcp-server

  2. Install node dependencies (if a package.json exists) npm install

  3. Prepare environment variables Create a .env file (or supply env vars in your deployment environment) with: SERVER_NAME=YourServerName UPSTOX_API_KEY=your_upstox_api_key UPSTOX_SECRET_KEY=your_upstox_secret_key

  4. Run the server node server.js // or use your preferred start script as defined in your project

  5. Verify the server is running by hitting the configured port (default likely 8000 or as defined in your config) and test with an MCP client to ensure tools respond correctly.

Note: If a setup.sh script is provided in the repository, you can run it to automate dependency checks and initial authentication flows as described in the README. Ensure you have a browser available for the Upstox access token flow during setup.

Additional notes

Environment variables are sensitive; never commit .env files to version control. If you encounter authentication issues, double-check that the Upstox API credentials are correct and that the sandbox app has the required permissions. The server relies on instrument data (data/ folder) for market price lookups—ensure this data is downloaded and accessible to the server. If you switch from sandbox to production, update the API keys and endpoint configuration accordingly. The list_capabilities_tool can help you discover available tools and their usage in your current setup.

Related MCP Servers

Sponsor this space

Reach thousands of developers