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.
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
.venvif it does not exist - upgrades
pip - installs packages from
requirements.txt - creates
.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.json
Recommended settings:
- start with
NUBRA_ENV=UAT - keep
HOST=127.0.0.1 - keep
MCP_PATH=/mcpunless 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:
- 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.json- or the HTTP endpoint
http://127.0.0.1:8000/mcpafter starting.\run_http.ps1
Authentication
Protected tools should use the following flow:
- call
auth_status - if login is required, ask for phone number
- call
begin_auth_flow - ask for OTP and call
verify_otp - ask for MPIN and call
verify_mpin - 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 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 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。