AI agents

Build and deploy with ChatGPT

The simple workflow is: your coding agent writes the app and Git revision; Deploy Hatch builds, runs, diagnoses, and safely recovers it. The remote MCP endpoint is /api/mcp.

1. Create a GitHub repository and a Deploy Hatch project connected to that repository

Create a GitHub repository and a Deploy Hatch project connected to that repository. An AI coding agent still needs permission to write the application source to GitHub; Deploy Hatch deliberately does not edit customer source.

2. In the Deploy Hatch project, create a project-scoped Agent credential

In the Deploy Hatch project, create a project-scoped Agent credential. For a fully authorized deployment agent, grant deployment:read, deployment:create, deployment:retry, configuration:read, and configuration:write. Use fewer scopes when the agent does not need them.

3. Connect an MCP-capable AI client to https://deployhatch

Connect an MCP-capable AI client to https://deployhatch.com/api/mcp and send the Agent credential as its Authorization: Bearer header. The credential is a secret: configure it as client/server authentication, never paste it into the model prompt or repository.

4. Tell the coding agent what to build and explicitly ask it to deploy through Deploy Hatch

Tell the coding agent what to build and explicitly ask it to deploy through Deploy Hatch. A good prompt is: Build this app, commit the source to GitHub, use Deploy Hatch to inspect the immutable revision and deploy it, keep working through supported source/configuration/platform failures until the exact deployment is verified healthy, and stop if human input or a secret is required.

5. The agent should call deployhatch_get_capabilities first

The agent should call deployhatch_get_capabilities first. It can then inspect the immutable workload, read trusted configuration, deploy idempotently, preserve the returned deployment ID, diagnose failures, and invoke only the recovery action authorized by diagnostics.

6. If source is broken, the coding agent fixes the GitHub source and supplies a new immutable revision

If source is broken, the coding agent fixes the GitHub source and supplies a new immutable revision. If trusted configuration is wrong and its credential permits configuration writes, it can patch configuration and recover. If Deploy Hatch reports a bounded retryable platform failure, it can invoke platform recovery.

7. If a secret or other human input is required, the agent must stop and ask you

If a secret or other human input is required, the agent must stop and ask you. Deploy Hatch does not infer secrets and does not silently turn repository suggestions into trusted configuration.

8. Success means the exact deployment—not merely the project—reaches the machine contract's success state and reports healthy

Success means the exact deployment—not merely the project—reaches the machine contract's success state and reports healthy. The agent should return the live URL/revision/deployment ID and a deterministic terminal result.