Introduction
The Tradejini MCP (Model Context Protocol) server enables Claude — Anthropic's AI assistant — to communicate directly with your Tradejini brokerage account. Once connected, you can ask Claude questions in natural language and it will fetch live data from your account on your behalf.
Examples of what you can ask Claude once connected:
- Show me my current holdings.
- What orders did I place today?
- List my open positions with P&L.
- What are my available funds and margins?
- Show my pending GTT/OCO orders.
| Key Facts | |
|---|---|
| MCP Server URL | https://mcp.tradejini.com/mcp |
| Protocol | Model Context Protocol (MCP) — SSE transport |
| Authentication | OAuth 2.0 (redirects to Tradejini login page) |
| Claude Interface | Claude.ai web / desktop / mobile |
| Data Access | Read-only portfolio & market data; no order placement |
Prerequisites
Before connecting Tradejini MCP, confirm you have all of the following:
Tradejini Account
- An active Tradejini trading account (https://www.tradejini.com).
- Your registered mobile number or Client ID and MPIN / password for login.
- 2FA (OTP) enabled on your account (required for OAuth).
Claude Account
- A Claude.ai account (Free, Pro, or Team plan).
- Access to the Claude web interface at https://claude.ai or the Claude mobile/desktop app.
Browser / Network
- A modern web browser (Chrome 110+, Firefox 115+, Safari 16+, Edge 110+).
- A stable internet connection — the OAuth redirect requires loading the Tradejini login portal.
Connecting Tradejini MCP to Claude
Open Claude Settings
- Navigate to https://claude.ai and sign in.
- Click your profile avatar (bottom-right corner) and select "Settings".
- Go to the "Connectors" or "Integrations" section in the left sidebar.
Add a New MCP Connector
- Click "+ Add connector" or "Connect an app".
- Choose "Add by URL".
- Paste the MCP server URL: https://mcp.tradejini.com/mcp
- Click "Connect" to proceed.
Authenticate with Tradejini (OAuth)
Claude will open a pop-up or redirect you to the Tradejini OAuth login portal. Follow these steps:
- Enter your Tradejini Client ID or registered mobile number.
- Enter your MPIN or password and click Log In.
- Approve the OTP sent to your registered mobile number.
- On the permissions screen, click "Allow" to grant Claude access to your account data.
- You will be redirected back to Claude automatically. The connector should now show as Connected.
Verifying the Connection
Once authentication completes, verify the integration is working:
- In Claude.ai, start a new chat and type: "Show my Tradejini holdings."
- Claude will call the tradejini-mcp tool and return a list of your equity, F&O, or commodity holdings.
- If you see portfolio data, the connection is successful. If you see an error, see Section 7 (Troubleshooting).
Available MCP Tools & Capabilities
The following tools are exposed by the Tradejini MCP server. Claude selects and calls them automatically based on your natural-language requests — you do not need to know their names.
| Tool Name | Endpoint | Description |
|---|---|---|
| login | OAuth authorize | Initiates OAuth authentication flow. Called automatically when a session expires. |
| getHoldings | GET /api/oms/holdings | Returns a list of all current holdings (equity, F&O, commodities) in your demat account. |
| getPositions | GET /api/oms/positions | Returns open positions with MTM P&L, realised P&L, net quantity, average price, and LTP. |
| getOrders | GET /api/oms/orders | Lists all orders placed in the current trading session (pending, executed, rejected, cancelled). |
| getOrderHistory | GET /api/oms/history | Returns the modification/status history of a specific order ID. |
| getTrades | GET /api/oms/trades | Returns a list of executed trade records for the current session. |
| pendingGTTOrders | GET /api/oms/orders/gtt | Lists all pending GTT (Good Till Triggered) and OCO (One Cancels Other) orders. |
| retrieveFundsLimits | GET /api/oms/limits | Returns available cash, collateral margins, used margins, and fund limits. |
| getIntervalChartData | GET /api/mkt-data/chart/interval-data | Fetches OHLCV (Open, High, Low, Close, Volume) chart data for a given symbol and interval. |
Example Prompts
The following are natural-language prompts you can type directly to Claude after connecting:
Portfolio & Holdings
"Show me all my current holdings with current value and P&L."
"Which of my holdings have a loss greater than 10%?"
"What is my total portfolio value today?"Positions & P&L
"List my open intraday positions and their MTM P&L."
"What is my total realised P&L for today?"
"Show me my F&O positions with unrealised P&L."Orders & Trades
"Show all orders I placed today."
"Which orders are still pending execution?"
"Show me the modification history for order ID 123456."
"List all executed trades for today."GTT / OCO Orders
"What GTT orders do I have pending?"
"List all my OCO orders."Funds & Margins
"What are my available funds and margin limits?"
"How much margin have I used today?"Market Data
"Fetch the 5-minute OHLCV chart data for RELIANCE NSE for today."
"Show me the last 30 candles of NIFTY 50 on a 15-minute chart."Troubleshooting
| Common Issues & Fixes | |
|---|---|
| Session expired / auth error | Ask Claude: "Re-authenticate with Tradejini." Claude will call the login tool and present a fresh OAuth link. |
| Connector not visible in Claude | Go to Settings → Connectors and verify the MCP URL is saved. Delete and re-add if needed. |
| OAuth pop-up blocked | Allow pop-ups for claude.ai in your browser settings, then retry the connection. |
| Empty data returned | Ensure you are connected during market hours or that you have holdings/orders to fetch. Paper/dummy accounts may return empty arrays. |
| OTP not received | Check that your registered mobile number is active. Contact Tradejini support if OTP delivery fails. |
| Connector shows Connected but Claude can't fetch data | Disconnect and reconnect the MCP connector to refresh the OAuth token. |
Security & Privacy
- OAuth tokens are stored securely by Claude.ai and are never exposed in chat conversations.
- Your Tradejini password is never seen, stored, or logged by Claude or Anthropic.
- You can revoke Claude's access at any time from: Tradejini Portal → Profile → Third-Party Apps → Revoke.
- All API calls are made over HTTPS (TLS 1.2+).
- The MCP server only exposes read-only data endpoints; it has no ability to trade on your behalf.
Disconnecting Tradejini MCP
To remove the connector from Claude:
- In Claude.ai, go to Settings → Connectors.
- Find "Tradejini" and click "Disconnect" or the trash icon.
- Confirm the removal. Claude will immediately lose access to your account data.
To also revoke the OAuth grant from the Tradejini side:
- Log in to https://www.tradejini.com and go to Profile → Security → Third-Party Access.
- Find "Claude / Anthropic" and click Revoke.