Skip to main content
Hosted servers are the Horizon-managed path for Python MCP and FastMCP servers you keep in Git. Point Horizon at a repository and entrypoint, and each build turns one source revision into an artifact that can be served from a stable MCP URL, promoted, previewed, or rolled back. The important boundary is simple: Horizon owns the path from source to a protected deployment URL. Your server code still owns the MCP behavior behind that URL, including tools, resources, prompts, upstream API calls, durable state, and application errors.

Build from a commit

Resolve a branch, pull request, or manual selection to an exact Git commit before packaging the server.

Serve one MCP URL

Give clients a Horizon deployment URL, usually ending in /mcp, instead of exposing a process or runtime address.

Protect before Python runs

Check Horizon authentication, server access, and capability policy before a protected request reaches your handlers.

Debug by boundary

Use build logs, request logs, server logs, sessions, clients, and user activity to see where a request stopped.

When hosted is the right shape

Choose a hosted server when the server code should be built, deployed, and run by Horizon. Hosted works well when:
  • You are creating a new Python MCP or FastMCP server and want the deployment lifecycle attached from the start.
  • The source lives in Git and each deployment should point to a specific commit.
  • Pull request previews should test code, manifests, and environment changes before production promotion.
  • Clients should use a shared Horizon endpoint with server and capability access checks in front of the code.
  • Operators need build logs, request logs, server logs, sessions, clients, and users connected to the same server record.
If the server already runs somewhere else and should stay there, register it as an external server. If clients should connect to one curated endpoint made from selected capabilities across multiple servers, use a remix server.

Client contract

To clients, a hosted server is a Horizon MCP endpoint. Clients call the live or preview deployment URL. Horizon identifies the selected deployment, checks access when the endpoint is protected, and routes accepted MCP requests to the artifact selected for that deployment.
ConcernWhat clients and operators can expect
SourceA build uses a specific Git commit. Moving a branch after the build starts does not change that artifact.
EndpointClients call the Horizon deployment URL, not an internal runtime address.
Build outputA successful build creates an artifact, a discovered MCP manifest, and build logs.
DeploymentA live or preview deployment selects one successful artifact to serve behind a stable URL.
AuthenticationHosted servers have Horizon authentication enabled by default. Disabling it is available on .
AuthorizationServer access and capability policies are evaluated before protected hosted server code runs.
RuntimePython handlers run with a -second request window and MB of memory.
StateLocal memory and files are ephemeral. Store durable application state outside the local filesystem.
ObservabilityHorizon records hosted traffic across requests, sessions, clients, users, builds, and server logs.
Most hosted-server debugging starts by locating the boundary. Build failures happen before an artifact exists. Gateway denials happen before Python code runs. Runtime failures happen after Horizon has forwarded the request to your deployed server.

Ownership boundary

Hosted does not make Horizon the owner of every part of the application. It separates platform mechanics from server behavior.
AreaHorizon ownsYou own
Source and buildsResolving commits, installing dependencies, packaging artifacts, and recording build logs.Repository content, entrypoint behavior, dependency declarations, and code review.
DeploymentsSelecting which successful artifact serves live or preview traffic.Deciding what to promote, test, or roll back.
GatewayDeployment URLs, Horizon authentication, server access, capability policy, and session routing.Choosing who should have access and which capabilities are sensitive.
RuntimeStarting the hosted Python process and enforcing the request window and memory allocation.Handler behavior, startup work, upstream calls, application errors, and durable storage choices.
ObservabilityHorizon-side request, session, client, user, build, and server log records.Interpreting application output and adding useful server logs.

Lifecycle

1

Connect source

Link the Git repository that contains the Python MCP or FastMCP server. Choose the entrypoint and dependency file Horizon should use for builds.
2

Create a build

Horizon resolves the requested branch, pull request, or manual selector to an exact commit, installs dependencies, packages the server, and inspects the MCP surface area.
3

Publish an artifact

A successful build produces an immutable artifact and manifest. A failed build leaves the currently selected live artifact unchanged.
4

Serve a deployment

A live or preview deployment selects one successful artifact. Promotion and rollback change the artifact behind the same deployment URL.
5

Route client traffic

MCP clients call the deployment URL. Horizon identifies the deployment, checks access, preserves MCP session routing for up to hours, and forwards accepted requests to the hosted runtime.
6

Run your handlers

Tool, resource, and prompt handlers execute in your Python process. Horizon captures request outcomes and stdout or stderr emitted by the running server.

Authentication model

Hosted servers expose one authentication control, Horizon Authentication, which is either enabled or disabled.
Horizon AuthenticationUser experienceRequest behavior
EnabledThe MCP client completes Horizon sign-in or sends a Horizon API key.Horizon validates the caller, checks server and capability access, then forwards accepted requests.
DisabledThe MCP client sends whatever the server code expects, or no credential if the server is public.Horizon forwards without validating a Horizon bearer credential; the server owns authentication and authorization.
Horizon authentication is enabled by default for shared and production hosted servers. When a client supports interactive sign-in, the user completes a Horizon authorization flow and the client receives a Horizon credential for that hosted endpoint. Non-interactive clients can send a Horizon API key as a bearer token. Disabling Horizon authentication is for endpoints that are intentionally public or for servers whose code implements the full authentication and authorization model. It is available on , and the change applies after a new deployment uses the updated setting. Hosted servers do not have the second remote-credential layer that external servers have. If a hosted tool calls another API, your Python code chooses how to authenticate that upstream call: deployment environment variables, a user-facing authorization flow you implement, or a rejected request when the handler cannot proceed.

What changes when

Builds, deployments, gateway metadata, and client manifests update on different timelines. When a change appears stale, check which boundary owns it.
ChangeWhen clients see it
Source code, dependency, entrypoint, or Python version changeAfter a new build succeeds and that artifact is selected by a deployment.
Environment variable changeAfter a new build and deployment selection for hosted runtime behavior.
Authentication mode changeAfter a new deployment uses the updated server setting.
Server explicit grant or default role changeAfter Horizon updates live access metadata; no code change is required.
Capability policy changeAfter the policy is saved and the hosted server is redeployed with updated policy metadata.
Live deployment promotion or rollbackAs soon as the deployment selects the new artifact, subject to client-side caching.
Client manifest refreshAfter the client reconnects or lists capabilities again. Some clients cache tools and prompts.

Manifest and discovery

Horizon inspects the hosted server during build and stores the discovered MCP manifest for the artifact. The dashboard, Inspector, ChatMCP, remix composition, and capability policy setup use the manifest from the relevant build or deployment. A deployment serves one selected artifact at a time. A new tool, resource, or prompt is not visible to clients until the code that registers it is built and the resulting artifact is selected by the deployment the client is using. Register capabilities during import or startup instead of after a request-time side effect. If a tool is registered only after a handler runs, Horizon may not see it during build inspection. If registration depends on environment variables, preview and production builds can intentionally produce different manifests.

Troubleshooting

Check your build logs for dependency installation, entrypoint loading, import-time, or inspection errors. A failed build does not replace the live artifact.
Check Deployments. The successful artifact may belong to a preview deployment, may not have been promoted, or may have been superseded by another selected artifact.
The request stopped before Python code ran. Check Authentication, Authorization, server access, capability policy, and request logs.
Gateway routing succeeded. Check your server logs, handler code, upstream calls, and any application errors written to stdout or stderr.
The handler or startup path exceeded the -second request window. Move long work out of the request path, reduce startup work, or return earlier and continue work asynchronously.
The server used ephemeral local state as durable state. Store durable application state outside the local filesystem.
Confirm the live deployment selects the build whose manifest contains the tool. Then reconnect the client or list capabilities again, because some clients cache tools and prompts.

Before clients use the server

Before sharing a hosted endpoint, check the parts of the contract clients will depend on:
  • The live deployment selects the intended successful build artifact.
  • Inspector can list capabilities and call representative tools through the Horizon endpoint.
  • Authentication matches the audience: Horizon authentication enabled for shared servers, disabled only when server code owns authentication.
  • Server access and capability policies cover sensitive actions.
  • Environment variables are scoped correctly for production and previews.
  • Request logs and server logs make it clear whether failures stop at the gateway or inside Python code.

Builds

Understand build inputs, states, artifacts, and manifest inspection.

Deployments

Serve successful artifacts as live or preview deployments.

Compute model

Review request timeouts, memory, startup, sessions, and ephemeral state.

Environment variables

Configure production, preview, and branch-scoped values.

Authentication

Learn how clients and API keys authenticate to hosted endpoints.

Connect a client

Configure an MCP client for a Horizon deployment URL.