Nubra MCP Server

Nubra MCP Server

Enables interaction with the Nubra trading platform for authentication, instrument lookup, quotes, historical data, options analytics, portfolio management, report generation, screening, backtesting, and order placement via UAT environment.

Category
Visit Server

README

Nubra MCP Server

This repository is the main GitHub/source repository for the Nubra MCP server.

It provides authentication, instrument lookup, quotes, historical data, options analytics, portfolio and account tools, report generation, screening utilities, backtesting, and order placement through UAT.

Setup and Start

Follow the steps below to run the MCP locally.

1. Prerequisites

Ensure the following are available:

  • Python 3.11
  • PowerShell
  • network access to install Python dependencies

2. Clone the repository

git clone https://github.com/socials-zanskar/nubra-mcp-server.git
cd nubra-mcp-server

3. Bootstrap the environment

powershell -ExecutionPolicy Bypass -File .\bootstrap.ps1

This script performs the following actions:

  • creates .venv if it does not exist
  • upgrades pip
  • installs packages from requirements.txt
  • creates .env from .env.example if .env is missing

After this step, the repository should contain:

  • .venv
  • .env

4. Configure .env

Edit .env and set the required values:

PHONE=
MPIN=
NUBRA_ENV=UAT
NUBRA_DEFAULT_EXCHANGE=NSE
LOG_LEVEL=INFO
HOST=127.0.0.1
PORT=8000
MCP_PATH=/mcp
AUTH_STATE_FILE=auth_state.json

Recommended settings:

  • start with NUBRA_ENV=UAT
  • keep HOST=127.0.0.1
  • keep MCP_PATH=/mcp unless you need a custom path

5. Start the MCP

For MCP clients that use stdio:

.\run_stdio.ps1

For local HTTP testing:

.\run_http.ps1

Equivalent direct commands:

python server.py --transport stdio
python server.py --transport streamable-http
python server.py --transport sse

6. Verify the server

When using HTTP transport, the default local endpoints are:

  • health: http://127.0.0.1:8000/health
  • mcp: http://127.0.0.1:8000/mcp

Import smoke test:

.\.venv\Scripts\python.exe -c "import server; print('server-import-ok')"

Run tests:

.\.venv\Scripts\python.exe -m unittest discover -s tests -v

MCP Client Integration

This repository includes project-local MCP configuration in .mcp.json.

Standard repo-based setup:

  1. Open the nubra-mcp-server folder in your MCP client.
  2. Run .\bootstrap.ps1.
  3. Fill in .env.
  4. Allow the client to start .\run_stdio.ps1 through .mcp.json.

For clients that require manual registration, use one of the following:

  • mcp-client-config.example.json
  • or the HTTP endpoint http://127.0.0.1:8000/mcp after starting .\run_http.ps1

Authentication

Protected tools should use the following flow:

  1. call auth_status
  2. if login is required, ask for phone number
  3. call begin_auth_flow
  4. ask for OTP and call verify_otp
  5. ask for MPIN and call verify_mpin
  6. continue with the original request

Authentication uses the OTP -> MPIN flow.

What This Repo Provides

The server includes tools for:

  • authentication and session handling
  • instrument search and ref-id resolution
  • quotes and historical market data
  • option chain analytics and Greeks
  • funds, holdings, positions, and portfolio summaries
  • HTML and image report generation
  • CSV export workflows
  • screening and indicator-based tooling
  • backtesting utilities
  • order placement through UAT

For PROD, order placement is temporarily blocked. Other supported operations continue to work.

Repo Structure

  • server.py: MCP entrypoint
  • config.py: configuration loading
  • nubra_client.py: Nubra client and service logic
  • tools/: MCP tool registration modules
  • tests/: test suite
  • bootstrap.ps1: setup script
  • run_stdio.ps1: stdio launcher
  • run_http.ps1: HTTP launcher

First Use

Common tasks after startup include:

  • check authentication status
  • search for an instrument
  • get the current price for a symbol
  • fetch historical data
  • review option chain data
  • generate a portfolio report

Example first prompt:

  • Use nubra mcp and check auth status

Local Notes

  • start with UAT when validating setup and workflows
  • keep .env, auth state files, and local artifacts out of source control
  • build outputs such as dist/, build/, and *.egg-info/ should remain uncommitted

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