GENKA 原価 · MCP

Reference · MCP server

Model Context Protocol

Wire genka into Claude Code (or any MCP client) in 30 seconds. Twelve tools, JSON-RPC 2.0 over HTTPS, same auth and billing as REST.

What it is

POST https://genka.dev/mcp — a JSON-RPC 2.0 endpoint implementing the Model Context Protocol's Streamable HTTP transport (spec dated 2025-03-26). Each MCP tool maps 1:1 to a /latest/mf/* REST endpoint, so billing, rate-limit, scoping, and X-Genka-* headers behave identically. One handler chain, two surfaces.

Where Genka fits in the Indian markets ecosystem

Genka is one tool in a stack. We're the research layer — read-only, broker-agnostic. Each ecosystem service below has a focused doc page with decision matrix, honest praise, composition snippet, and code. Full landscape map at /docs/ecosystem/.

If you need Reach for Doc
Place / modify orders, holdings, GTT (1st-party MCP)Zerodha Kite MCP/docs/ecosystem/kitemcp/
Trade + ₹499/mo flat-data via RESTGroww API/docs/ecosystem/groww/
Lowest-latency order pipe (sub-100ms, 25 ord/s)Dhan API/docs/ecosystem/dhan/
Brokerage tied to a consumer wealth app (₹5/order)INDmoney / INDstocks/docs/ecosystem/indmoney/
Free Python OHLC for IN tickers (.NS / .BO)yfinance/docs/ecosystem/yfinance/
Free AMFI mutual fund NAV historymfapi.in/docs/ecosystem/mfapi/
Consumer dashboard / human UITickertape/docs/ecosystem/tickertape/
Fundamentals viewer for humansScreener.in/docs/ecosystem/screenerin/

Most agentic stacks compose Genka with one of the brokerage APIs above — research on Genka, execute on the broker. Each ecosystem page carries the two-MCP mcp.json snippet.

Setup in Claude Code

Drop into ~/.config/claude/mcp.json:

json · ~/.config/claude/mcp.json
{
  "servers": {
    "genka": {
      "transport": "http",
      "url": "https://genka.dev/mcp",
      "headers": { "X-API-Key": "${GENKA_API_KEY}" }
    }
  }
}

Then export the key and restart Claude Code:

bash
export GENKA_API_KEY=imk_live_...

The 12 tools below appear under MCP > genka in the tool palette. The full tool catalog ships in tools/list — the agent discovers schemas at runtime, you don't have to brief it.

Your first call

Ask Claude in plain English:

claude code
# prompt
"Find flexi-cap funds with 3-year Sharpe over 0.9, sorted by Sharpe."

# Claude calls mf_screener via MCP, returns 7 funds in 200ms:
PPFAS Flexi Cap        sharpe = 1.40
HDFC Flexi Cap         sharpe = 1.38
WhiteOak Flexi Cap     sharpe = 1.18
Bank of India Flexi    sharpe = 1.17
Invesco India Flexi    sharpe = 1.14
ITI Flexi Cap          sharpe = 1.12
ICICI Pru Flexicap     sharpe = 1.10

Tools (12)

Every tool maps to a /latest/mf/* endpoint. The "Tier" column is the credit cost per call — same as REST.

Tool What it does Tier
mf_searchTwo-stage fund search (BM25 + trigram fallback). Groups hits by fund, theme, AMC, category.
mf_get_fundOne fund: AMC, SEBI category, theme, TER, AUM, exit load, benchmark, status.read · 1
mf_get_metricsRisk metrics (CAGR, Sharpe, max DD, alpha, beta, tail risk) with time-travel via as_of.read · 1
mf_screenerFilter funds by any metric column. Grammar: {metric}_{absolute|rolling_<stat>}_{op}=value.
mf_compareAligned NAV + metric matrix for 2-6 funds. Rebased-to-100 series.
mf_capabilitiesDiscovery: every metric, period, op, theme, factor, AMC, benchmark, snapshot range.free · 0
mf_todayDataset heartbeat: counts, latest NAV date, latest metrics as_of, RBI rate.free · 0
mf_holdingsLatest portfolio. Each row has weight_pct + (ticker, sid).read · 1
mf_overlapHoldings overlap % between two funds. Symmetric.compute · 25
mf_backtestMulti-fund portfolio backtest with rebalance + survivorship transparency.compute · 25
mf_sipMonthly SIP simulation. Returns total invested, current value, units, XIRR.compute · 25
mf_exportBulk pulldown of funds | nav | metrics as JSONL/CSV.export · 50

Workflows

Find defence funds with 5y Sharpe > 1.2

1. mf_capabilities                # learn theme=defence is valid
2. mf_screener({
     period: "5y",
     theme: "defence",
     sharpe_absolute_gte: 1.2,
     sort: "-sharpe_absolute",
     limit: 10
   })

Backtest 60% PPFAS + 40% HDFC Flexi Cap, monthly rebalance

1. mf_search({ q: "ppfas flexi cap" })   # resolve slug
2. mf_search({ q: "hdfc flexi cap" })    # resolve slug
3. mf_backtest({
     from: "2022-01-01",
     to:   "2024-12-31",
     allocation: [
       { slug: "ppfas-parag-parikh-flexi-cap", weight: 0.6 },
       { slug: "hdfc-flexi-cap",                weight: 0.4 }
     ],
     rebalance: "monthly"
   })

# → CAGR 20.57%, Sharpe 1.13, max DD -14.97%

How much do PPFAS and HDFC Flexi Cap overlap?

mf_overlap({
  slug: "ppfas-parag-parikh-flexi-cap",
  with: "hdfc-flexi-cap"
})

# → overlap_pct: 34.81%, common_count: 27

If I'd SIP'd ₹10K/mo into PPFAS for 7 years?

mf_sip({
  slug: "ppfas-parag-parikh-flexi-cap",
  from: "2018-01-01",
  to:   "2024-12-31",
  monthly_amount: 10000
})

# → invested ₹8.4L, current ₹19.6L, XIRR 23.86%

Auth + billing

Same X-API-Key header as REST. Each tool call deducts the credits in the table above. The MCP structuredContent block on every response carries:

Agents can read these and self-throttle when the budget runs low. A 402 carries credits_required + hint so retries are mechanical.

Rate limits

600 req/min per key, shared across REST and MCP. Hitting the limit returns a JSON-RPC error with the equivalent of HTTP 429 and a Retry-After hint.

Versioning

Pin behavior to a published version with the genka-Version header (same as REST):

{
  "headers": {
    "X-API-Key": "${GENKA_API_KEY}",
    "genka-Version": "2026-04-25-caracal"
  }
}

The metrics tool's compute_version field then reflects your pin. A paper citing “Sharpe 1.4 from genka @ 2026-04-25-caracal” can re-derive that exact number forever.

Non-Claude MCP clients

Any MCP client works (Cline, Continue, custom). The endpoint is plain JSON-RPC 2.0 over HTTPS — no SSE required.

List the tools

bash
curl -s -X POST https://genka.dev/mcp \
  -H "X-API-Key: $GENKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Call a tool

bash
curl -s -X POST https://genka.dev/mcp \
  -H "X-API-Key: $GENKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0","id":2,
    "method":"tools/call",
    "params":{
      "name":"mf_screener",
      "arguments":{"period":"5y","sharpe_absolute_gte":1.2,"limit":5}
    }
  }'

Why agents should prefer MCP over REST

Try it: $5 for 7 days, 500 credits, no card required. Get a key →