> ## Documentation Index
> Fetch the complete documentation index at: https://docs.horizon.prefect.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Sign up, link a GitHub repo, and deploy your first FastMCP server on Horizon.

By the end of this guide you will have a Python MCP server running on Horizon at
a stable, protected URL like `https://weather-mcp.fastmcp.app/mcp`, ready for any
MCP client to call. Horizon builds the server from your GitHub repository,
publishes it behind the gateway, and keeps the endpoint live across future
pushes.

The path is short: point Horizon at a repository and an entrypoint, and each push
to your default branch becomes a new build and deployment. You write the MCP
server; Horizon owns everything from source to a protected URL.

## A server to deploy

A Horizon hosted server is a Python [FastMCP](https://gofastmcp.com) server in a
Git repository. Horizon reads one file, the **entrypoint**, to start the server
and to discover the tools, resources, and prompts it exposes. Anything your
entrypoint imports at startup is available to the running server.

This is a complete server you can deploy. It exposes a single `get_weather` tool:

```python main.py theme={null}
from fastmcp import FastMCP

mcp = FastMCP("Weather MCP")


@mcp.tool
def get_weather(city: str) -> str:
    """Get current weather for a city."""
    return f"It is always sunny in {city}."


if __name__ == "__main__":
    mcp.run()
```

Commit this as `main.py` at the root of a repository. `main.py` is the entrypoint
Horizon looks for by default, so a repository shaped this way needs no extra
configuration. To use a different file, or to point at a named server object,
configure the entrypoint as `server.py` or `server.py:mcp` when you create the
server. For how Horizon resolves the entrypoint, Python version, and
dependencies, see [Build system](/platform/build-system).

The server above has no third-party dependencies beyond FastMCP, which Horizon
installs for you. When your server imports other packages, commit a
`requirements.txt` or `pyproject.toml` and Horizon installs them during the
build. For configuring secrets and settings your code needs at runtime, see
[Environment variables](/environment-variables).

## Deploy on Horizon

<Steps>
  <Step title="Sign in and create an organization">
    Sign in at [horizon.prefect.io](https://horizon.prefect.io). On first sign-in
    you create an organization, which owns your servers, members, and access
    settings. Every server you deploy belongs to one organization.
  </Step>

  <Step title="Connect GitHub and choose a repository">
    Horizon builds from source in GitHub, so the first step is linking a GitHub
    installation. Authorize the Horizon GitHub App and grant it access to the
    repositories you want to deploy. The repository picker then lists those
    repositories with their default branch. Select the one holding your server.
    For how the GitHub connection works and what each event triggers, see
    [GitHub](/git-integrations/github).
  </Step>

  <Step title="Configure the server">
    Name the server, then confirm the entrypoint. The name determines the
    deployment URL, previewed as `{name}.fastmcp.app` while you type. Leave the
    entrypoint as `main.py` for the server above, or point it at your file.
    Optionally set a dependency file and environment variables. New servers have
    **Horizon authentication enabled** by default, so the endpoint starts behind
    an access check.
  </Step>

  <Step title="Watch the first build">
    When you create the server, Horizon resolves your default branch to an exact
    commit, installs dependencies, packages the server, and inspects it with
    FastMCP to discover its tools, resources, and prompts. Build logs show each
    step. A build is tied to the commit it resolved, so moving the branch
    afterward does not change that build.
  </Step>

  <Step title="The server goes live">
    A successful build produces an artifact, and Horizon deploys it to your
    server's stable URL. The Deployments page shows the live URL and status. From
    here, every push to the default branch creates a new build and, when it
    succeeds, updates the live deployment.
  </Step>
</Steps>

## Confirm it is live

Open the server's [Deployments](/deployments) page. The stable production URL
sits at the top, ending in `/mcp`, and the status reads `Live` once the first
deployment is serving. This URL stays constant as you push new versions; Horizon
changes the artifact behind it through promotion and rollback without asking
clients to reconfigure.

Because Horizon authentication is enabled, callers authenticate before a request
reaches your code. The gateway verifies the caller, checks access, and only then
forwards the request to your Python handler. To make a server public or to let
your own code own authentication, disable Horizon authentication, described in
[Authentication](/platform/authentication).

With the server live, you are ready to point an MCP client at it.
[Connect a client](/connect-a-client) walks through configuring Claude, Cursor,
ChatGPT, and the CLI clients against your new endpoint.
