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

# Deploy to Manufact Cloud

> Deploy a TypeScript MCP server built with mcp-use to Manufact Cloud.

Deploy your TypeScript MCP server to [Manufact Cloud](https://docs.manufact.com/dashboard) when you want a hosted MCP URL, managed deployments, logs, metrics, preview environments, and client connection snippets.

The `mcp-use` TypeScript SDK is the framework you use to build the server. Manufact Cloud is the hosted platform that deploys, monitors, and distributes it.

## Prerequisites

* A TypeScript MCP server built with `mcp-use`.
* A Manufact Cloud account. Open [Manufact login](https://manufact.com/login) or log in from the CLI.
* The `mcp-use` executable. Projects created with `create-mcp-use-app` include it. For other projects, install the CLI:

```bash theme={null}
npm install -g mcp-use
```

Log in before your first deploy:

```bash theme={null}
mcp-use login
```

For non-interactive flows (web onboarding, agents), use a pre-approved device code:

```bash theme={null}
mcp-use login --device-code <CODE>
```

See the [CLI reference](https://docs.mcp-use.com/v1/typescript/api-reference/cli-reference.md#login) for `--api-key` and `--org` options.

## Deploy from your project

Run `mcp-use deploy` from the project directory:

```bash theme={null}
mcp-use deploy
```

By default, the CLI deploys from GitHub. It can help you connect the Manufact GitHub App and create a repository when needed. Use `mcp-use deployments logs <id> --build --follow` to follow the resulting build. After the first successful deploy, the CLI writes `.mcp-use/cloud/link.json` so later `mcp-use deploy` runs update the same cloud server.

Use the [Manufact CLI deploy reference](https://docs.manufact.com/cli/deploy) for the complete flag list, including `--branch`, `--root-dir`, `--region`, `--env`, `--env-file`, `--build-command`, `--start-command`, and `--dockerfile`.

For agents and CI, use `--json` for one machine-readable result. It never
answers confirmations: add `--yes` to authorize GitHub repository creation and
Git mutations, or use `--no-github` to select a managed source upload. Run
`mcp-use deploy --help` for the complete offline contract and recovery commands.

## Deploy without GitHub

You do not need a GitHub repository to deploy. Use `--no-github` to upload your local project source directly. The platform creates a managed repo and runs the normal build pipeline:

```bash theme={null}
mcp-use deploy --no-github
```

This path:

* Works without a git remote or GitHub App installation.
* Uploads your local source instead of deploying from your GitHub account.
* Creates the server in a platform-managed repository.
* Supports redeploys. Linked projects auto-detect the upload path, so `--no-github` is only required on the first deploy.
* A linked GitHub server cannot be converted to managed source in place. Create a separate server with `mcp-use deploy --no-github --new --yes`.
* JSON mode never opens a browser; use either `--json` or `--open`, not both.

You can later connect your own GitHub repository from the server dashboard if you want push-to-deploy.

> [!TIP]
>
> Web onboarding uses this sequence for a fully non-interactive first deploy:
>
> ```bash theme={null}
> mcp-use login --device-code <CODE>
> mcp-use deploy --no-github -y
> ```

## Deploy from GitHub

If your project is a GitHub repository, `mcp-use deploy` detects the repository, branch, and commit:

```bash theme={null}
mcp-use deploy
```

You'll see:

```text theme={null}
GitHub repository detected:
  Repository: your-org/your-repo
  Branch:     main
  Commit:     abc1234

Deploy from GitHub repository your-org/your-repo? (y/n):
```

This approach:

* Deploys directly from your GitHub repository.
* Automatically detects build and start commands for common MCP frameworks, including mcp-use TypeScript.
* Uses the latest pushed commit from your branch.
* Requires the mcp-use GitHub App to have access to the repository.

## Monorepos & multiple apps

If you deploy several servers from the same repository, every push to that repo is evaluated against **each** connected server. By default a server redeploys on any push to its production branch, which in a monorepo means an unrelated change can rebuild an app you didn't touch. Two per-server filters scope that down:

* **Watch paths** (`--watch-paths`): globs matched against the push's changed files. The server only auto-deploys when a changed file matches. Empty (the default) means any change triggers a deploy.
* **Branch allow list** (`--deploy-branches`): globs of branches (besides the production branch) that are allowed to trigger auto-deploys. The production branch always deploys; an empty list allows all branches.

```bash theme={null}
# Create a server that only redeploys when its own app or shared code changes
mcp-use deploy \
  --root-dir apps/iching \
  --watch-paths "apps/iching/**" --watch-paths "packages/shared/**"

# Tune an existing server's triggers (no redeploy of unrelated apps)
mcp-use servers update <id-or-slug> \
  --watch-paths "apps/iching/**" --watch-paths "packages/shared/**" \
  --deploy-branches "release/*"

# Clear the watch paths (back to "any change deploys")
mcp-use servers update <id-or-slug> --watch-paths ""
```

> [!NOTE]
>
> Watch paths and branch patterns are also editable from the dashboard — see
> [Deployments](https://docs.manufact.com/dashboard/deployments) and [Server
> settings](https://docs.manufact.com/dashboard/settings).

### Branch URLs and sessions

* The **production branch** serves the canonical URL `https://<slug>.run.mcp-use.com/mcp`. Pushing to it swaps the running container, so live MCP sessions on the canonical URL receive `mcp_session_terminated` and clients reconnect.
* Every other branch gets its own stable preview URL `https://<slug>--br-<branch>.run.mcp-use.com/mcp`, so you can test changes against real clients before merging. Preview deployments require the Hobby plan or higher.

`mcp-use servers update --branch <name>` changes which branch is the production branch after creation.

For cloud-side setup, see the Manufact docs for [creating servers](https://docs.manufact.com/dashboard/servers), [deployments](https://docs.manufact.com/dashboard/deployments), and [build runtimes](https://docs.manufact.com/dashboard/build-runtimes).

## After deployment

After deployment, the CLI prints the hosted MCP URL. Use that URL with any remote MCP-compatible client:

```text theme={null}
https://<your-slug>.run.mcp-use.com/mcp
```

The Manufact dashboard also shows your deployment status, build logs, runtime logs, environment variables, analytics, observability traces, and client connection snippets.

### Client configuration

Use the hosted MCP URL in clients that support remote MCP servers:

```json theme={null}
{
  "mcpServers": {
    "my-server": {
      "url": "https://<your-slug>.run.mcp-use.com/mcp"
    }
  }
}
```

You can also connect from the mcp-use TypeScript SDK:

```ts theme={null}
import { MCPClient } from "@mcp-use/client";

const client = new MCPClient({
  mcpServers: {
    myServer: { url: "https://<your-slug>.run.mcp-use.com/mcp" },
  },
});
```

See [Connecting clients](https://docs.manufact.com/dashboard/connect-clients) for one-click setup and generated configuration for Cursor, VS Code, Claude, Gemini CLI, Codex CLI, and the TypeScript and Python SDKs.

## Test locally first

Before deploying, build and run your server locally:

```bash theme={null}
mcp-use build
mcp-use start
```

For interactive local testing, use the Inspector with the dev server:

```bash theme={null}
mcp-use dev
```

## Cloud operations

Manufact Cloud owns the hosted deployment lifecycle. Use these pages for current cloud behavior:

> [card] [Creating servers](https://docs.manufact.com/dashboard/servers)
>
> Import from GitHub, start from a template, build with an agent, or connect
> an existing MCP server.

> [card] [Deployments](https://docs.manufact.com/dashboard/deployments)
>
> Manage automatic deploys, preview environments, manual redeploys, build
> logs, and deployment history.

> [card] [Build and runtimes](https://docs.manufact.com/dashboard/build-runtimes)
>
> See how Manufact detects Node.js, Python, package managers, pnpm versions,
> and Dockerfile builds.

> [card] [Environment variables](https://docs.manufact.com/dashboard/environment-variables)
>
> Configure production and preview secrets, import `.env` files, and redeploy
> after changes.

> [card] [Domains](https://docs.manufact.com/dashboard/domains)
>
> Use a generated gateway URL or attach a custom domain.

> [card] [Runtime logs](https://docs.manufact.com/dashboard/logs)
>
> Stream stdout and stderr from the active deployment.

> [card] [Observability](https://docs.manufact.com/dashboard/observability)
>
> Inspect live requests, traces, sessions, payload capture, and performance
> metrics.

> [card] [Connecting clients](https://docs.manufact.com/dashboard/connect-clients)
>
> Generate client configuration and connect your hosted MCP server to editors,
> CLIs, Claude, and SDK clients.

## Next steps

* [Manufact CLI deploy reference](https://docs.manufact.com/cli/deploy) - Current cloud deploy flags and examples.
* [CLI reference](https://docs.mcp-use.com/v1/typescript/api-reference/cli-reference.md#deploy) - mcp-use CLI behavior in this SDK.
* [ServerConfig API reference](https://docs.mcp-use.com/v1/typescript/api-reference/server/server-config.md) - Advanced server configuration options.
* [MCP Apps](https://docs.mcp-use.com/v1/typescript/mcp-apps.md) - Build interactive widgets for MCP clients.
* [Deploying to Google Cloud Run](https://docs.mcp-use.com/v1/typescript/server/deployment/google.md) and [Deploying to Supabase](https://docs.mcp-use.com/v1/typescript/server/deployment/supabase.md) - Alternative deployment targets.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.