newTejHQ MCP is live: backtest Indian market data with your own AI agent
TEJHQ
model context protocol · nse · bse · f&o

Indian market data,
inside your AI agent.

Add one URL to Claude, Cursor, VS Code or Windsurf and your agent can pull NSE and BSE history, option chains with Greeks, unusual activity and a screener on its own, then backtest on real numbers. In Claude, option chains and price charts show up as interactive cards right in the chat. No code, no downloads.

tools
18
since
2010-01-04
transport
HTTP
auth
your API key
server url
https://api.tejhq.dev/mcp

Send your key as Authorization: Bearer tej_live_.... Without a key the free tools still work. Get a free key at /keys.

TejHQ or NSE's MCP?

NSE now runs its own MCP server with recent raw prices and delayed quotes. The two do different jobs, and you can add both to the same agent.

Use NSE's server for

  • Quotes during market hours, about 1 to 3 minutes delayed.
  • Raw end-of-day prices for the last 5 years.
  • Learning and exploring: NSE offers it for educational and informational use.

Use TejHQ for

  • NSE history for every trading day since 2010-01-04, with delisted and renamed stocks kept.
  • Prices adjusted for splits, bonuses and dividends, so a 1:1 bonus does not look like a 50% crash in a return or backtest.
  • Corporate actions and symbol and ISIN history.
  • NSE F&O end of day since 2010 with IV and Greeks, PCR and max pain, on any past date.
  • Unusual activity, a screener, delivery % and BSE from 2024-07-08.

TejHQ is end of day only, so for live or delayed prices use NSE's server.

Set it up

Claude · claude.ai, easiest

  1. Open claude.ai → Customize → Connectors and click Add custom connector.
  2. Name it TejHQ and paste the URL https://api.tejhq.dev/mcp.
  3. Under Authentication, keep No sign-in.
  4. Click Add header: name Authorization, value Bearer tej_live_... with your key. Skip this for the free tools only.
  5. Click Add, then switch TejHQ on from the tools menu in a new chat.

Custom connectors need a paid Claude plan. Ask "show the NIFTY option chain" or "show TCS prices for the last 6 months" and the answer comes with an interactive card.

Claude Code

terminal
claude mcp add --transport http tejhq https://api.tejhq.dev/mcp \
  --header "Authorization: Bearer $TEJ_API_KEY"

Cursor

~/.cursor/mcp.json
{
  "mcpServers": {
    "tejhq": {
      "url": "https://api.tejhq.dev/mcp",
      "headers": { "Authorization": "Bearer tej_live_..." }
    }
  }
}

VS Code

.vscode/mcp.json
{
  "inputs": [
    { "type": "promptString", "id": "tej-key", "description": "TejHQ API key", "password": true }
  ],
  "servers": {
    "tejhq": {
      "type": "http",
      "url": "https://api.tejhq.dev/mcp",
      "headers": { "Authorization": "Bearer ${input:tej-key}" }
    }
  }
}

Windsurf

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "tejhq": {
      "serverUrl": "https://api.tejhq.dev/mcp",
      "headers": { "Authorization": "Bearer tej_live_..." }
    }
  }
}

Claude Desktop (local config)

claude_desktop_config.json
{
  "mcpServers": {
    "tejhq": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.tejhq.dev/mcp",
               "--header", "Authorization: Bearer ${TEJ_API_KEY}"],
      "env": { "TEJ_API_KEY": "tej_live_..." }
    }
  }
}

Only if you prefer a local config file: the claude.ai connector above is simpler. Needs Node.js.

ChatGPT

Add https://api.tejhq.dev/mcp as a connector with no authentication to use the free tools; answers come back as text. For keyed access from ChatGPT, use the TejHQ setup for ChatGPT.

Tools

ohlcv, snapshot, actions, status
Daily prices as printed, a whole exchange on one day, corporate actions, latest date
No key
adjusted, delivery, symbols
Split and bonus adjusted prices, delivery %, ticker history through renames
Free key
fo_chain, fo_contract, fo_expiries, fo_futures
NSE option chains with IV, delta, gamma, theta and vega, contract and futures history since 2010
Retail
fo_stats
PCR, max pain, buildup, rollover, ATM IV and skew per expiry, every day since 2010
Retail
unusual, unusual_history
Stocks far outside their own normal on a day, and one stock's unusual days since 2010
Retail
screener, metrics, universe, resolve
Filter every stock by returns and 52-week levels, daily metrics, liquid100/250/500, name to symbol
Retail

Each tool call counts as one API call against your plan's daily limit. Large results come back in pages, and the agent is told how to fetch the next one.

Things to ask

  • How did NIFTY's at-the-money IV behave in the week of the March 2020 crash, and how does today compare?
  • Which liquid250 stocks are within 5% of their 52-week high with 21-day returns above 10%?
  • Show me DIVISLAB's unusual days since 2015 and what its price did over the next 20 sessions after each.
  • Backtest buying NIFTY's at-the-money straddle every Monday in 2024 and holding to Thursday, using settle prices.

The data is end of day only, no intraday or live prices. The agent gets facts, not tips: nothing here is investment advice.

₹599 / month

Retail unlocks F&O with Greeks, unusual activity, the screener and metrics in every tool, with 10,000 calls a day. Pro (₹4,999) for commercial use.

Built from the end-of-day files NSE and BSE publish. Use is covered by the data terms.