Connect your AI

Deploy with GitHub Copilot

Connect Copilot in VS Code to Deploy Hatch, then ask it to build and deploy in ordinary language.

1. Create a project and credential

Create a Deploy Hatch project connected to the repository open in VS Code. From the project, create a project-scoped Agent credential and grant only the scopes the agent needs.

Treat the credential as a secret. Do not paste it into source code, Git history, or the model prompt.

2. Add Deploy Hatch to VS Code

For the normal local VS Code agent workflow, create .vscode/mcp.json and use an interactive input so the bearer credential is not hardcoded.

{
  "inputs": [
    {
      "type": "promptString",
      "id": "deployhatch-agent-token",
      "description": "Deploy Hatch project-scoped agent credential",
      "password": true
    }
  ],
  "servers": {
    "deployhatch": {
      "type": "http",
      "url": "https://deployhatch.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${input:deployhatch-agent-token}"
      }
    }
  }
}

This configuration contains a secret prompt, not the secret itself. VS Code can also store MCP configuration in your user profile. Interactive ${input:...} servers are not forwarded unchanged to every Agent Host environment, so this quickstart is specifically for the local VS Code workflow.

3. Start the MCP server

  • Open the Command Palette and use MCP: List Servers, or use the inline controls in mcp.json.
  • Start or restart the deployhatch server and enter the Agent credential when VS Code prompts for it.
  • Open Copilot Chat in Agent mode and confirm the Deploy Hatch tools are available.

4. Ask Copilot normally

Copilot should discover Deploy Hatch capabilities and its credential-bound project. You normally should not need to provide a project UUID, deployment UUID, worker, node, or other Deploy Hatch internal identifier.

Build this application and deploy it to production using Deploy Hatch. Handle the deployment process yourself and give me the live URL when it is healthy.

5. Let the machine contract drive recovery

If a deployment fails, Copilot should diagnose the exact deployment and follow Deploy Hatch's returned next action. Source failures can be repaired by the coding agent in the repository; configuration or platform recovery must stay within the scopes and bounded recovery rules advertised by Deploy Hatch.

6. Require a real terminal result

A request being accepted, a build succeeding, or a container starting is not enough. For a normal web app, the agent should follow the live contract until the exact deployment is running, application health is healthy, and Deploy Hatch returns the public URL.