@sdkrun/platform-oracle
v0.3.1
Published
The Platform API Oracle - MCP server serving ground-truth native SDK knowledge from NativeScript metadata
Downloads
85
Readme
@sdkrun/platform-oracle
The Platform API Oracle — an MCP server that gives AI agents ground truth about native platform APIs: does a symbol exist, with exactly what signature, on which OS versions, inherited from where. Machine-generated from SDK headers by NativeScript's metadata pipeline, not scraped documentation. Backs sdk.run.
Verdicts describe the platform, not JavaScript — native ObjC selectors and JNI signatures ride along, so agents writing Swift, Kotlin, Objective-C, or C# get the same certainty as ones writing JS/TS.
MCP tools
| Tool | What it answers |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| check_symbol | Deterministic existence/signature verdicts: exists · member_exists · member_inherited (names the declaring ancestor) · exists_case_mismatch · member_not_found · not_found — with availability, native names, and nearest-name suggestions on a miss |
| search_platform_apis | Ranked task-phrase search over entire SDKs ("recognize text in an image") |
| get_typings | Token-budgeted .d.ts slices for prompt grounding |
| capability_graph | Superclasses, protocols, referenced and referencing types |
| list_frameworks | Coverage map per platform |
Usage
# stdio MCP server (register with any MCP-capable agent)
claude mcp add platform-oracle -- npx -y @sdkrun/platform-oracle serve --db platforms.db
# hosted mode: stateless Streamable HTTP
sdkrun-oracle serve --db platforms.db --http 8787 # POST /mcp · GET /healthz
# one-shot CLI
sdkrun-oracle check NSWindow.makeKeyAndOrderFront --db platforms.db
sdkrun-oracle check android.view.View.setAlpha --platform android --db platforms.db
sdkrun-oracle search "scan for bluetooth low energy devices" --platform android --db platforms.db
# PlatformAPIBench: grade API-existence claims (JSONL) → hallucination rate
sdkrun-oracle bench claims.jsonl --db platforms.dbThe database is built with @sdkrun/metadata-index from generated platform typings (macOS, iOS, Android). --db may be replaced by the NS_ORACLE_DB environment variable. Requires Node ≥ 24.
To execute native code locally rather than look it up, see @sdkrun/agent-runtime.
