GENKA 原価 · Docs / API

API Reference (Scalar) What only Genka has Pricing

API — same data, two transports

Every route is reachable two ways: REST over plain HTTP, and MCP as native typed tools for Claude Code and other agents. Same auth (X-API-Key), same billing, same response shape. Pick the one that fits your loop — you can mix in the same project.

YouPickWhy
Writing a Python / TS scriptRESTOne curl per call, predictable JSON envelopes, idempotent
Inside Claude Code or CursorMCPTools are discovered + typed; the agent picks them automatically
Building an automationRESTcron + curl, no client SDK needed
Doing exploratory research in chatMCPComposes tools across a conversation without re-typing curls
Wiring to a notebookEitherREST via requests, or run an MCP-aware agent and let it dispatch

REST

REST endpoints →

Every route under /latest/*, with parameters, schemas, and a try-it-out runner. Stripe-shaped envelope on every 2xx ({ data, meta } with meta.usage). RFC 7807 problem+json on 4xx with code + hint.

curl https://genka.dev/latest/mf/screener?sort=-sharpe_absolute&period=3y&limit=5 \
  -H "X-API-Key: $GENKA_API_KEY"

Free tier: /health /capabilities /llms.txt /docs · OpenAPI: /docs/openapi.json

MCP

MCP server →

Official @modelcontextprotocol/sdk 1.29 + @hono/mcp 0.2 Streamable HTTP transport at /mcp. Spec compliance for 2025-06-18 is upstream's job. 23 tools across funds, listed companies, prices, concalls, sectors. Each tool is a thin loopback into the same REST routes — auth, billing, and audit run through one pipeline.

claude mcp add --transport http genka https://genka.dev/mcp \
  --header "x-api-key: $GENKA_API_KEY" --scope user

23 tools · search · capabilities · mf_* (8) · co_* (4) · prices_* (3) · concall_* (3) · sector_get

What's the same

ConceptRESTMCP
AuthX-API-Key headerx-api-key header on the MCP transport
Tier & costSame tierForPath table; X-Genka-Credits-Used on responseSame; tools call back into the REST handler so billing fires once
Versioninggenka-Version header pin to a published versionInherits from the inner REST call
Scoped keysread / write / all + path allowlistInner loopback runs keyAllows() exactly once
Audit logEvery request logged in api_key_auditInner call logs; outer /mcp is non-billable
ErrorsRFC 7807 problem+json with hintJSON-RPC error or result.isError with the same hint string

What's different

ConceptRESTMCP
DiscoveryGET /latest/capabilitiestools/list + capabilities tool
Argument validationZod via chanfana — 400 with field-level errorsSDK validates against tool's Zod schema, returns -32602 in result.content[0].text
Response shape{ data, meta } envelope{ content: [{type:text, text}], structuredContent: {data, meta}, isError }
StreamingPlain HTTP, no streaming todaySSE supported on GET /mcp — we run stateless, so it's a no-op channel
SessionsNoneStateless — no Mcp-Session-Id. Each request is independent

When to mix

Common pattern: agent uses MCP in Claude Code to explore (search → mf_get → mf_holdings), then writes a Python script that uses REST for the production cron. Same routes, same data, no rewriting. The Examples page shows both styles — the curls translate one-for-one to MCP tools/call bodies.