Nubra MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Nubra MCP Servercheck authentication status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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-server3. Bootstrap the environment
powershell -ExecutionPolicy Bypass -File .\bootstrap.ps1This script performs the following actions:
creates
.venvif it does not existupgrades
pipinstalls packages from
requirements.txtcreates
.envfrom.env.exampleif.envis 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.jsonRecommended settings:
start with
NUBRA_ENV=UATkeep
HOST=127.0.0.1keep
MCP_PATH=/mcpunless you need a custom path
5. Start the MCP
For MCP clients that use stdio:
.\run_stdio.ps1For local HTTP testing:
.\run_http.ps1Equivalent direct commands:
python server.py --transport stdio
python server.py --transport streamable-http
python server.py --transport sse6. Verify the server
When using HTTP transport, the default local endpoints are:
health:
http://127.0.0.1:8000/healthmcp:
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 -vRelated MCP server: Angel One MCP Server
MCP Client Integration
This repository includes project-local MCP configuration in .mcp.json.
Standard repo-based setup:
Open the
nubra-mcp-serverfolder in your MCP client.Run
.\bootstrap.ps1.Fill in
.env.Allow the client to start
.\run_stdio.ps1through.mcp.json.
For clients that require manual registration, use one of the following:
mcp-client-config.example.jsonor the HTTP endpoint
http://127.0.0.1:8000/mcpafter starting.\run_http.ps1
Authentication
Protected tools should use the following flow:
call
auth_statusif login is required, ask for phone number
call
begin_auth_flowask for OTP and call
verify_otpask for MPIN and call
verify_mpincontinue 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 entrypointconfig.py: configuration loadingnubra_client.py: Nubra client and service logictools/: MCP tool registration modulestests/: test suitebootstrap.ps1: setup scriptrun_stdio.ps1: stdio launcherrun_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
UATwhen validating setup and workflowskeep
.env, auth state files, and local artifacts out of source controlbuild outputs such as
dist/,build/, and*.egg-info/should remain uncommitted
This server cannot be deployed
Maintenance
Related MCP Connectors
Unified financial infrastructure connecting AI agents directly to trade live/demo brokerage accounts, Web3 non-custodial wallets, real-time market data across equities, ETFs, crypto, forex, options, DeFi swaps, and prediction markets, institutional research feeds, and algorithmic strategy backtesters.
Broad, OAuth-protected provider and financial-domain API tools for research agents.
Agentic brokerage access to a US brokerage account: quotes, orders, positions, cash and documents.
OAuth LeanTrading tools for eligible Pro, Elite, Blueprint, and Admin users.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with the Zerodha trading platform for placing stock orders, viewing portfolio holdings, and managing mutual fund investments. Provides secure OAuth authentication and real-time trading capabilities through Zerodha's official API.1-
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Angel One trading APIs to retrieve historical market data and portfolio information.10-
- FlicenseNot gradedqualityDmaintenanceEnables AI models to interact with the Zerodha trading platform for portfolio management, trading, and account operations through natural language.3-
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive trading and market data functionality for Indian equity markets through Angel One's SmartAPI, enabling portfolio management, order placement, and real-time data queries.7MIT