TradeSathi
Powers Alexa+ with live Indian (NSE) stock-market skills as an MCP client: real-time quotes for any NSE symbol, market open/closed status with the next open time, top gainers and losers, a spoken-style daily brief (NIFTY/SENSEX/NIFTY BANK levels + top movers), and a PAPER-trading account for buying and selling shares with virtual cash and viewing portfolio holdings and P&L.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
TradeSathi π£οΈπ
"Alexa, ask TradeSathi the price of Reliance."
TradeSathi is a self-hosted MCP server that gives Alexa+ live Indian stock-market (NSE) skills: real-time quotes, market status, top movers, a spoken morning brief β and a PAPER-trading account so users can practise buying and selling shares with βΉ1,00,000 of fake money. No broker, no real money, ever.
Built for the Amazon Developer Hackathon β "Build, Ship, Shape", Alexa+ track.
MCP protocol: 2025-11-25, verified
The server implements the Model Context Protocol over Streamable HTTP
(endpoint /mcp) using the official Python MCP SDK (mcp 2.3.0,
MCPServer). The initialize handshake negotiates protocol version
2025-11-25 β this is not just claimed, it is tested: test_mcp.py speaks
raw JSON-RPC to the server, requests 2025-11-25, and asserts the server
negotiates exactly that version before exercising the tools.
Related MCP server: mcp-indian-stocks
Architecture
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Alexa+ (simulated) β
β static/index.html β chat UI that shows β
β the live MCP tool call + raw JSON result β
βββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β POST /api/chat (intent parse)
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββ
β simulator.py (port 8600) β
β keyword intent parsing β raw JSON-RPC β
β MCP client (session, version 2025-11-25) β
βββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β Streamable HTTP POST /mcp
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββ
β server.py (port 8000) β MCP server β
β official MCP SDK (MCPServer), 7 tools β
βββββββββ¬βββββββββββββββββββββββ¬ββββββββββββββββ
β yfinance β JSON ledger
βΌ βΌ
Yahoo Finance paper_state.json
(NSE tickers *.NS) (PAPER cash βΉ1,00,000)In production, Alexa+ connects to the same /mcp endpoint directly as an
MCP client; the simulator exists so anyone can see and try the exact same
tool calls in a browser, with the MCP layer fully visible.
Tools
Tool | What it does |
| Is the NSE open now? (MonβFri 09:15β15:30 IST; holiday calendar noted as not applied) + next open time |
| Latest price, day change %, open/high/low/previous close, volume for any NSE symbol |
| Top 5 gainers + top 5 losers by day change % across ~20 large Nifty-50 names |
| PAPER buy at the live price against the paper ledger |
| PAPER sell (rejects sales beyond holdings) |
| Holdings at live prices, invested value, unrealised P&L, cash |
| Spoken-style brief: NIFTY / SENSEX / NIFTY BANK levels + top movers |
Setup
python3 -m venv .venv
.venv/bin/pip install -r requirements.txtRun the MCP server (terminal 1):
.venv/bin/python server.py # http://127.0.0.1:8000/mcpRun the Alexa+ simulator (terminal 2), then open http://127.0.0.1:8600 :
.venv/bin/python simulator.py # http://127.0.0.1:8600The paper ledger (paper_state.json) is created automatically on first
use with βΉ1,00,000 PAPER cash. Set TRADESATHI_STATE_FILE to use a
different ledger file, PORT / SIM_PORT / MCP_URL to change ports.
Try the MCP endpoint directly
Initialize handshake (note the negotiated protocolVersion):
curl -s -X POST http://127.0.0.1:8000/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-D - \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{
"protocolVersion":"2025-11-25","capabilities":{},
"clientInfo":{"name":"curl","version":"1.0"}}}'Verified response (2026-10-23):
{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2025-11-25",
"capabilities":{...},"serverInfo":{"name":"TradeSathi","version":""}}}Then, with the Mcp-Session-Id header from the handshake (and an
MCP-Protocol-Version: 2025-11-25 header), call a tool:
curl -s -X POST http://127.0.0.1:8000/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'Mcp-Session-Id: <session-id>' \
-H 'MCP-Protocol-Version: 2025-11-25' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{
"name":"get_quote","arguments":{"symbol":"RELIANCE"}}}'Verified live result (2026-10-23, after market close):
{"symbol":"RELIANCE","exchange":"NSE","currency":"INR","price":1184.5,
"day_change_pct":-2.03,"open":1206.2,"high":1208.0,"low":1184.5,
"previous_close":1209.0,"volume":14931109}Tests
.venv/bin/python test_mcp.pyStarts the server on a scratch port with a throwaway ledger and asserts:
the 2025-11-25 handshake, all 7 tools in tools/list, a live
get_quote("RELIANCE"), and a paper buy β portfolio β sell round-trip.
Expected tail: RESULT: ALL PASS.
Screenshots
β οΈ Paper-trading disclaimer
TradeSathi is an educational demo. All trades are PAPER β simulated
against live prices with fake money in a local JSON file. There are no
broker integrations, no order placement, and no real-money functionality
of any kind. Market data comes from Yahoo Finance via yfinance and may be
delayed; nothing here is investment advice.
Built with
Python 3.12 Β· official MCP Python SDK (mcp 2.3.0) Β· yfinance Β·
httpx Β· vanilla HTML/JS for the simulator UI.
License
MIT β see LICENSE. Copyright (c) 2026 Swarnnim Agnihotri.
This server cannot be deployed
Maintenance
Related MCP Connectors
Paper trading for AI: live quotes, indicators, and virtual trades on stocks, crypto, and forex.
Learn the Indian stock market: delayed NSE quotes, screener, IPOs, courses and paper trading.
NSE/BSE stock data via Tickertape as JSON: index lists, screener, 10-year fundamentals.
Live market data, financial analysis, and portfolio research tools across 10,000+ tickers.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides real-time Indian stock market analysis, including live price tracking, technical indicators, and options Greeks calculations for NSE/BSE securities. It also enables news-based sentiment analysis, market scanning for NIFTY 50 stocks, and virtual portfolio management.-
- FlicenseAqualityDmaintenanceEnables real-time and historical Indian stock market data retrieval, including prices, news, recommendations, and top gainers/losers.11-
- AlicenseNot gradedqualityDmaintenanceProvides live market data from Indian Stock Exchanges (BSE & NSE) via MCP, powered by IndianAPI. Enables querying stock data, trending stocks, and more through natural language.14MIT
- FlicenseNot gradedqualityDmaintenanceEnables NSE stock market research with screening, quotes, peer comparison, watchlists, alerts, and strategies using natural language.-