Skip to main content
Limits define the contract for hosted server builds, gateway requests, compute, sessions, and configuration. Some limits protect the interactive MCP request path; others keep deployments predictable and safe to operate.

Limit contract

Limits define what Horizon will attempt to serve, not what every MCP client or upstream system can handle. Design server behavior so clients receive clear errors before a limit becomes a surprise.
Limit typeDesign response
Request timeoutReturn quickly, stream only where supported, or return a job ID and continue work asynchronously.
Memory allocationProcess data in chunks and avoid unbounded in-memory caches.
Build timeoutKeep dependency installation and import-time work lightweight.
Session TTLLet clients reinitialize sessions and avoid storing durable state in session routing.
Ephemeral filesystemStore durable files outside the local runtime filesystem.

Runtime limits

LimitValueApplies to
Request timeout secondsMCP request handlers served through Horizon.
Memory allocation MBHosted server compute.
MCP session routing TTL hoursGateway session routing metadata.
Local filesystemEphemeralFiles created by server runtime.

Build limits

LimitValue
Build timeout15 minutes
Default Python version3.12
Default entrypointmain.py
Dependency discoveryConfigured dependency file, nearest requirements.txt, or pyproject.toml

Configuration limits

AreaGuidance
Environment variablesKeep keys stable and values scoped to production, preview, or branch overrides.
SlugsTreat server and deployment slugs as client-facing identifiers. Avoid unnecessary renames.
API keysCreate separate keys per integration and rotate them when exposed.
Capability policiesPrefer small, auditable policy changes over broad access exceptions.
Organization-specific quotas, included usage, and contract terms can vary by plan.

What happens at a limit

Horizon returns an error to the client and the handler should be treated as failed. Return a job ID quickly and continue long work asynchronously.
The build fails and no new deployable artifact is produced. The previous deployment remains available unless you change it separately.
A client may need to initialize a new MCP session before sending follow-up requests.
The server instance can fail or restart. Reduce memory use, stream work in smaller chunks, or move large jobs out of the request path.

Designing within limits

WorkloadRecommended shape
Fast read or lookupRegular MCP tool handler.
Large exportReturn a job ID quickly and continue the work asynchronously.
Repeated pollingStore polling state durably and expose a status tool or resource.
Expensive startupLazy-initialize clients and caches after import when possible.
Large temporary filesUse durable external storage rather than assuming local files persist.
SignalCheck
408 or timeout in request logsHandler duration and upstream calls.
Missing server logsGateway rejected the request before compute or deployment was unavailable.
Build timeoutDependency install time and import-time work.
Session not foundClient reinitialization and session TTL behavior.
File missingEphemeral filesystem assumptions.

Compute model

Understand runtime constraints.

Build system

Understand build defaults and failure modes.

Gateway

Understand request and session behavior.