SCOPI Connect (MCP)
Connect Stathfin data tools to AI apps that support MCP over Streamable HTTP, with OAuth or a personal API key.
Before you start
For personal use, generate an API key on the Connections page; no onboarding is needed. For OAuth app access, request the endpoint, client ID, and approved callback URI during beta onboarding. Both paths need a verified account with active Plus or Pro access. Automatic client registration is not yet supported.
Endpoint and authentication
- Transport: Streamable HTTP, JSON-RPC exchange via POST /api/mcp.
- Canonical URL: https://stathfin.id/api/mcp; use the endpoint confirmed during onboarding.
- Authentication: OAuth authorization code with PKCE S256, scope data:read.
- API keys: generate one on the Connections page and send it as an Authorization Bearer token. Keys read public data only, live until you revoke them, and spend only where you allow it on the same page.
- Spending: approve a credit limit separately on the Connections page or the /api/external/spending page, which shows the exact rates. Connecting an app or key does not by itself allow it to spend credits.
- Public clients do not need a client secret. Access tokens last 12 hours; re-authenticate when needed.
Configuration in Claude Code
The following example applies once your beta client is registered. Replace YOUR_BETA_CLIENT_ID and port 8080 with your onboarding values. The callback must match exactly, including localhost or 127.0.0.1 and the port number. With a personal API key instead, register the server with an Authorization header and skip the browser sign-in.
- 1
Start authentication
Open Claude Code, run /mcp, select the Stathfin connection, then follow the browser sign-in flow.
- 2
Review the consent
Check the app name and scope before granting permission. A saved configuration does not prove data access is active.
- 3
Check the tools
Make sure company__get_metrics appears. If a read is rejected or returns unavailable, stop the request and contact the Stathfin team; do not change the token or try internal endpoints.
claude mcp add --transport http --scope user --client-id YOUR_BETA_CLIENT_ID --callback-port 8080 stathfin https://stathfin.id/api/mcp
claude mcp get stathfin
# Or with a personal API key from the Connections page (no sign-in flow):
claude mcp add --transport http --scope user --header "Authorization: Bearer YOUR_API_KEY" stathfin-key https://stathfin.id/api/mcpReferences: Claude Code MCP documentation
Available tools
Your app lists one tool per data operation. Every call takes that tool's own arguments plus a request_id of 1–100 characters; other fields are rejected. Use a new request_id for new work and the same one to retry, so a retry returns the original result and charge.
- company__get_metrics — headline metrics for one ticker: price, market cap, P/E, P/BV, ROE, leverage, liquidity, CFO vs net income, growth. Each value carries its own date. Key arguments: ticker, metrics.
- company__compare_metrics — the same metrics across 2-6 tickers, never for a single ticker. Key arguments: tickers, metrics.
- company__get_statement_series — time series of statement line items (revenue, net income, operating cash flow), newest first, for trend questions. Key arguments: ticker, statement, periodType.
- company__compare_statements — biggest line-item movers between the two latest periods of one statement. Key arguments: ticker, statement, periodType.
- company__get_dividend_history — split-adjusted dividend history; dpsHistory holds the verified fiscal-year totals and payments must not be summed. Key arguments: ticker.
- company__profile_ownership — sector, controlling group, free float, foreign/retail/local mix, and top holders. Key arguments: ticker.
- company__get_earnings_quality — whether profit is backed by cash: CFO vs net income (TTM), accruals, Sloan ratio. Key arguments: ticker.
- company__compare_earnings_quality — the same quality signals across 2-6 tickers. Key arguments: tickers.
- company__get_forensic_scores — Altman Z, Beneish M, and Montier C screens with their own applicability notes. Key arguments: ticker.
- company__get_banking_metrics — CASA, LDR, NIM, and NPL gross/net for one bank with report dates; non-banks return not-applicable. Key arguments: ticker.
- company__compare_banks — the same bank ratios across 2-6 tickers. Key arguments: tickers.
- company__get_peer_valuation — own P/E and P/BV against sector peer medians, with premium/discount percentages. Key arguments: ticker.
- company__explain_market_move — why one ticker moved over 1, 5, 20, or 60 trading days, with official evidence. Key arguments: ticker, lookbackTradingDays.
- sector__compare_metric — one statement-derived ratio (margins, ROIC, gearing, coverage, working-capital days) across 2-6 tickers, computed identically. Key arguments: tickers, metricIds.
- sector__compare_coal_cost — reviewed cash-cost rows for coal issuers; pass coal tickers or allCoal for the full set. Key arguments: ticker.
- scopi__get_issuer_agenda — upcoming RUPS, dividend, and disclosure events for one ticker. Key arguments: ticker, optional windowDays (1-90).
- company__get_operating_kpis — physical operating series from annual reports and Public Expose (production, cash cost, OER, occupancy, store count, order book, and more). Omit metricKeys to list every recorded series first. Key arguments: ticker, optional metricKeys, maxYears (1-15).
- market__run_preset_screen — members of one named thematic preset with latest prices; preset names are exact. Key arguments: preset, optional limit.
- market__run_custom_screen — screen the IDX cross-section by 1-8 metric filters with one sort and a 1-50 limit; ratios are decimals. Key arguments: metric, op, value.
- market__run_custom_bank_screen — screen bank tickers by NIM, NPL, CASA, and LDR plus P/E and P/BV. Key arguments: metric, op, value.
- market__get_broker_summary — top net buyers and sellers of one ticker over up to 366 days. Activity, not a signal. Key arguments: ticker, from, to.
- market__get_broker_activity — what one broker bought and sold most across stocks over up to 92 days. Key arguments: broker, from, to.
- market__get_broker_accumulation — weekly and cumulative broker positions in one ticker over up to 366 days. Key arguments: ticker, from, to.
- macro__get_snapshot — latest values of named macro series (IHSG, USD/IDR, BI rate, yields, CPI); keys must come from the enum. Key arguments: series.
- macro__get_sbn_ownership — foreign ownership of tradable government securities: holdings, share, and change. A stock, never a flow. Takes no arguments.
- macro__get_probability_cone — a range projection for the IHSG, or one ticker, 1-90 days or 1-60 sessions. Not a forecast promise. Key arguments: horizonCount, horizonUnit, optional ticker.
- search_issuers — find an issuer by name or ticker; a cheap first call to confirm the right ticker.
- get_issuer_summary — one sourced summary of an issuer. Key arguments: ticker.
- Saved research (Pro only): get_saved_research and changes_since_review read your own saved research, and only after you share the text you choose. They work once My Research is open to your account.
- scopi__get_saved_valuation_methods (Pro only) — saved DCF and multiples estimates for one ticker with their valuation day. Model output, not a price target. Key arguments: ticker.
- company__get_valuation_band (Pro only) — rating band from very_expensive to very_attractive, from saved-model medians against the current price. Key arguments: ticker.
{
"ticker": "BBCA",
"metrics": ["price", "pe_ttm", "pbv"],
"request_id": "metrics-001"
}Plans, limits, and credits
- Plus: all data tools except fair value, up to 10 requests per minute.
- Pro: all data tools, up to 30 requests per minute, or 90 with Priority traffic where approved.
- Check status, source dates, and the usage receipt in each result. A successful connection does not mean every result is complete.
- Scopi chat, resources, and prompts are not available through SCOPI Connect at this time.
Pricing
SCOPI Connect calls use the same SCOPI credits as Chat. You pay per successful call: a fixed price for the call's class, plus 1 credit for each KiB of data returned. Priority calls cost twice the Standard price.
| Class | What it covers | Standard | Priority |
|---|---|---|---|
| Basic | Issuer search, issuer summary, single-company data, macro data, shared saved research | 30 credits + 1 per KiB | 60 credits + 2 per KiB |
| Heavy | Screeners, multi-company and sector comparisons, peer valuation, market moves, broker summary | 60 credits + 1 per KiB | 120 credits + 2 per KiB |
| Premium | Fair value (Pro plan only) | 1,000 credits + 1 per KiB | 2,000 credits + 2 per KiB |
| Call | Data returned | Cost |
|---|---|---|
| Basic call, Standard | 6 KiB | 30 + 6 = 36 credits |
| Heavy call, Standard | 20 KiB | 60 + 20 = 80 credits |
| Heavy call, Priority | 20 KiB | 120 + 40 = 160 credits |
| Largest possible Basic call, Standard | 128 KiB (maximum) | 30 + 128 = 158 credits |
Disconnect
Use the account connections page to revoke an app's access. Do not share tokens in conversations, public documents, or repositories.