All articles
Agents & API·8 min read

Inspect and deploy with your coding agent through MCP.

Connect an agent to Helicarrier, choose a deliberate scope, inspect a real service, and verify an explicitly authorized Git deployment.

Helicarrier team · · Updated

Inspect and deploy with your coding agent through MCP.

Your agent can read the code in a repository, but that does not tell it which release is running, whether a migration succeeded, or which environment contains the database. Helicarrier’s hosted MCP server gives a connected agent those operations through tools such as whoami, get_project, and get_deployment_logs.

This guide walks through a real example: inspect a Next.js service, redeploy a specific Git commit, and verify that it still reads its PostgreSQL data. Start with the Next.js and PostgreSQL walkthrough if you need a disposable application to use.

Tested workflow. We verified the deployments in Codex using an existing account connection. On October 21, we separately created a temporary project/environment-scoped observer key and tested authentication, project reads, access refusals, and revocation through the hosted MCP endpoint. That check used a small HTTPS client; it was not a fresh Codex or OAuth setup. The scope screenshot shows the review screen before key creation.

1. Choose access for the task

Separate the resources an agent can reach from the actions it can perform. A project-scoped key can be restricted to selected environments. A service-scoped key reaches one service. Each has permission categories; write access includes read access.

For a project-level deployment investigation, open Project actions → API keys → Create API key. Give it a recognizable name and set Deployments and Logs to Read only. Leave other categories at No access unless the investigation needs them. Select only the relevant environment, then choose Review permissions.

Project API key review restricted to the tutorial environment with read-only deployment and log permissions
A review screen for an observer key. The example project's environment happens to be named Production; choose the intended environment in your own project. Select the image to view it at full size.

Review the project, environment, and permissions before choosing Create key. Save the token in your client’s supported secret storage when it is shown. Never include a real key in a prompt, a repository, a screenshot, or a shared configuration file. Keys can be revoked from the same dashboard panel.

For one service, use its Agents & API section instead. A narrowly scoped key does not gain access to billing, team management, platform-owner operations, or arbitrary other services. See API-key scopes for the exact boundaries.

2. Connect the hosted MCP server

In a client that supports a remote HTTP MCP server, use this endpoint:

Hosted MCP endpoint
https://app.helicarrier.xyz/mcp
Helicarrier’s hosted MCP endpoint shown in the service’s Agents and API section
The endpoint is shared; the authenticated key determines which resources and tools are available. Select the image to view it at full size.

For a scoped key, configure an Authorization: Bearer header using your client’s secret mechanism. The following is a configuration shape, not a file that works unchanged in every client:

Illustrative client configuration · replace through secret storage
{
  "mcpServers": {
    "helicarrier": {
      "url": "https://app.helicarrier.xyz/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

If your client supports Helicarrier’s OAuth connection flow, it can open a consent screen instead of using a manually supplied key. Read the account and permission grant there; an account-level OAuth grant is not the same as a project/environment-scoped key. Use the connection documentation for the available methods, and your client’s current documentation for its exact configuration format.

3. Check identity before doing work

Make the first request specific and read-only:

Call whoami. Tell me which Helicarrier account this connection belongs to and whether it is restricted to a project, service, or environment. Do not print credentials or change anything.

For a scoped key, the response identifies its scope and permissions. If the returned account or scope is wrong, stop and reconnect correctly. If you expected a narrow key but the response represents account access, do not assume the restriction is present.

In our fresh-key check, whoami reported a project key for Helicarrier Tutorials Demo, one allowed environment, and deployments: read / logs: read. Reading that project succeeded. Account-wide project listing and a different project were refused; an empty project-update request returned HTTP 403. No service was created or changed during this check.

Next, name the project and environment explicitly. The tutorial used:

Read the intended environment
get_project({
  "slug": "helicarrier-tutorials-demo",
  "env": "production"
})

get_project returns services for one environment at a time. Omitting env reads the default environment, which may not be the one you want. If needed, use list_environments to find its slug. A service-scoped key should use the service ID reported by whoami rather than trying to list the whole account.

4. Inspect before deploying

In Helicarrier Tutorials Demo, inspect tutorial-launch-board in the production environment. Read the latest deployment and its build/release logs. Explain whether the release command succeeded. Do not deploy, restart, edit variables, or delete anything.

The useful tool sequence is:

  1. get_project to resolve the correct service ID.
  2. list_deployments for its recent deployment IDs and statuses.
  3. get_deployment_logs for the relevant build and release.
  4. get_logs if you need runtime output after the release.

When following a running build, pass the last sequence number as after on the next log request. This avoids repeatedly fetching the entire build. Logs can contain application data; ask the agent for a concise, sanitized diagnosis rather than a raw dump.

In this example, the release log confirmed npm run db:migrate succeeded. That evidence explains the database setup; the active status alone does not prove that every application route works.

5. Authorize one deliberate deployment

The observer key cannot deploy. If you want the agent to release code, create a separate appropriately scoped key with Deployments → Read & write and the read permissions needed to inspect its result. Do not add Variables, Project structure, or account-wide access just to redeploy an existing service.

Give the agent the exact service, environment, Git ref, and intended action. For example:

Deploy commit COMMIT_SHA from the existing GitHub repository to tutorial-launch-board in Helicarrier Tutorials Demo / production. Do not change the tracked branch or create other resources. Follow the deployment, then verify /health and the four sample records. Stop and report any failure.

After resolving the service ID, the relevant tool call is:

One deployment of an explicit Git ref
deploy_service({
  "id": "SERVICE_ID_FROM_GET_PROJECT",
  "ref": "COMMIT_SHA"
})

This builds the requested ref for one deployment; it does not change the branch the service tracks. The response returns a deployment ID. Follow that deployment’s logs and status instead of interpreting the initial response as success. The source must already be committed and pushed to the intended GitHub repository.

Live deployment history showing an active release of commit 6a8c7e8 triggered through an API key
The actual MCP-triggered release of the example. The earlier deployment is superseded; the same Git commit remains active. Select the image to view it at full size.

6. Verify the application outcome

Our repeat release of commit 6a8c7e8 completed successfully. Its release migration ran, the startup check received a successful response from /health, and the page still showed four sample records. The migration had not duplicated its seed data.

Use those same independent checks in your workflow: deployment status, relevant release log, HTTP health response, and an application behavior that exercises its dependency. A green build alone is not the full result.

The tool catalog can include actions outside a project key’s permissions. In our test, tools/list still advertised write tools. Their presence is not an access grant: the server checks each request. An MCP refusal may arrive as HTTP 200 with isError: true and an error in the result; inspect the tool result, not just the HTTP status.

If a tool returns 403, inspect the key’s scope and permissions before granting more access. A missing service may be in another environment. If a deployment fails, preserve its log and diagnose the failing stage; do not repeatedly deploy or reset a database without understanding the cause. Some clients cache the tool list, so reconnect after changing credentials or permissions.

Finish the access lifecycle

Revoke a temporary key when the workflow is over. After removing our observer key, a new MCP initialization request using the same key returned HTTP 401. The dashboard also showed no remaining project keys. If you created the sample stack only for this exercise, remove those demo resources after verification. Keep useful instructions and source in Git; keep credentials in secret storage.

MCP makes the platform available to an agent, while scope and explicit intent keep the work understandable. Continue with the MCP tool reference for exact inputs or the REST API guide to turn a tested workflow into automation.

Keep exploring

Another useful next step.

Ready when you are

Make something.
We’ll keep it running.

Bring your code. Give your next idea a home on Helicarrier Cloud.