Quick Start
Targets and Selectors
app.target(name, target)
Registers a reusable logical target. cloud is built in and reserved.
edge(options)
Creates an edge target with a device selector and optional pool strategy.
Selectors:
edge.sessionDevice()edge.userDefaultDevice()edge.namedDevice(alias)edge.pool(name)selector.or(fallback)
least-loaded, round-robin, and random.
.target(name)
Available on global, group, and user MCP handles:
app.user(id) records subject-scoped configuration. It does not create or authenticate an identity.
Runtime Inputs and Setup
Useruntime.input(name) for local/scalar values and runtime.secret(name) for secrets.
Setup builders:
edge.folder({ access })edge.file({ access })edge.secret()edge.string()edge.boolean()edge.number({ min, max })edge.select({ options })
EDGE_UNRESOLVED_RUNTIME_INPUT. StdioTransportOptions.runtimeValues can provide explicit cloud-side string values.
Core Runtime Adapters
McpProxyOptions.edge accepts:
deviceResolversessionBindingStoresessionBindingExpirysessionBindingListenertransportcapabilityCachetelemetry
EdgeTransport, EdgeWebSocketGateway, InMemorySessionBindingStore, control-plane stores, and EdgeCapabilityCache.
Agent APIs
@fentaris/edge exports:
EdgeAgentandEdgeEnrollmentServiceLocalSetupManagerandTerminalSetupProviderEdgeWorkloadSupervisorExecutableAllowlistPolicy- platform, credential, process, and connection adapter contracts
{ deployment, downstream session }.
Protocol Compatibility
EDGE_PROTOCOL_VERSION and EDGE_MCP_ENVELOPE_VERSION are currently 1. Hello negotiates a mutually supported protocol version. Every accepted connection is bound to tenant, edge node, credential, protocol version, and a monotonically increasing connection generation.
Messages cover hello, heartbeat, desired state, setup status, capability manifests, lifecycle, MCP requests/results/errors, and cancellation.
Servers must reject routing claims that do not match server-side device, deployment, subject, target, and session state.
Errors
Stable edge codes:EDGE_PLACEMENT_AMBIGUOUSEDGE_UNAUTHORIZED_TARGETEDGE_SETUP_REQUIREDEDGE_UNAVAILABLEEDGE_CAPACITYEDGE_PROTOCOLEDGE_WORKLOADEDGE_GRANTEDGE_UNRESOLVED_RUNTIME_INPUT
Events and Health
EdgeTelemetry emits structured redacted events for target resolution, session binding, connection generations, desired-state reconciliation, setup, workloads, request duration, timeout, cancellation, and failure.
edgeHealth(...) adds checks for gateway, target resolution, device/pool availability, deployment readiness, and capability cache age.
Sensitive metadata is removed by redactEdgeProtocolValue(...) before telemetry reaches its sink.