Skip to main content
@mcpjam/sdk/host-compat is the shared host-compatibility engine. It answers “does this MCP server work on host X?” by joining a server’s derived requirements against per-host capability profiles to produce works / degraded / blocked verdicts. The same engine powers the Inspector’s Compatibility destination, the CLI, and the public API.

Import


deriveServerRequirements()

Derives what a server demands of a host from its tools list, optional widget-usage scan, and optional connection facts.

Parameters

HostCompatToolsInput

Returns: ServerRequirements

Example


evaluateHostCompat()

Evaluates a server’s requirements against a single host profile and returns a HostCompatReport.

Parameters

Returns: HostCompatReport

CompatVerdict


evaluateAllHosts()

Evaluates a server against multiple host profiles in one call.

Parameters

Returns: HostCompatEvaluation

Example


scanWidgetSource()

Scans widget HTML source to detect which MCP Apps capabilities the widget uses.

Parameters

Returns: WidgetUsage

A map from capability name to the list of tool names whose widgets use that capability. An empty object {} means the HTML was scanned and no capability usage was found — this is conclusive. undefined means the scan hasn’t run yet.

scanWidgetMeta()

Scans a tool’s _meta bag to detect widget bridge type and app-only status without fetching the HTML.

detectHostCompatBridgeFromMeta()

Detects which widget bridge protocol a tool uses from its _meta bag.

HostCompatBridge


Types

HostCompatProfile

Describes a host’s capabilities for evaluation purposes. Supply your own profiles or use the Inspector’s built-in catalog.

CompatProvenance

ConnectionFacts