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

# Coding agent access

> Give coding agents in your CI read-only access to your deployments and logs through Henry.

Henry can act as an MCP server for coding agents running in your CI pipeline. A coding agent fixing a production bug can list your Vercel deployments and read runtime and build logs through Henry, scoped to your workspace, read-only, without holding your Vercel credentials.

## The token

A workspace admin reveals the token in **Settings → Team settings → Coding agent access**. Store it as the `HENRY_AGENT_MCP_TOKEN` secret in each repository that needs it.

* The token is read-only and reaches nothing else in your workspace.
* **Regenerate** invalidates the current token immediately. Every repo using it must update its secret.
* Format: `hmcp_<workspace-id>.<signature>`.

## Prerequisites in Henry

Connect **Vercel** in **Integrations**, granting **All Projects** when Vercel asks. Optionally connect Supabase at team scope for read-only database tools.

## Point your agent at Henry

Add Henry to your agent's MCP configuration:

```json theme={null}
{
  "mcpServers": {
    "henry": {
      "type": "http",
      "url": "https://app.usehenry.ai/api/agent-mcp",
      "headers": { "Authorization": "Bearer <HENRY_AGENT_MCP_TOKEN>" }
    }
  }
}
```

Tools appear to the agent under the `henry` server:

| Tool                      | Arguments                                                                                                                              |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `vercel_list_projects`    | none                                                                                                                                   |
| `vercel_list_deployments` | `project` (name or `prj_` id), optional `limit`                                                                                        |
| `vercel_get_runtime_logs` | `project`, optional `deploymentId` (defaults to the newest production deployment)                                                      |
| `vercel_get_build_logs`   | `deployment` (`dpl_` id or URL)                                                                                                        |
| `SUPABASE_*`              | Read queries and schema. Writes are refused unless a workspace admin has armed a time-boxed grant; destructive SQL is always rejected. |

The endpoint is stateless JSON-RPC over a single POST and supports `initialize`, `ping`, `tools/list`, and `tools/call`. Batch requests are rejected.

## Smoke test

```bash theme={null}
curl -s -X POST https://app.usehenry.ai/api/agent-mcp \
  -H "Authorization: Bearer $HENRY_AGENT_MCP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"vercel_list_projects","arguments":{}}}'
```

| Response                          | Meaning                                                      |
| --------------------------------- | ------------------------------------------------------------ |
| `401 unauthorized`                | Stale or mistyped token. Reveal it again in Settings.        |
| `503 agent MCP not configured`    | Coding agent access is not enabled on this Henry deployment. |
| "No authorized Vercel connection" | Connect Vercel in Integrations.                              |
| "no projects visible"             | Reauthorize Vercel and choose **All Projects**.              |

## Workspace skills for the agent

`GET https://app.usehenry.ai/api/agent-mcp/skills` with the same bearer token returns the workspace's shared skills as `{ enabled, generatedAt, context, files }`, so an agent can load your team's conventions before it starts. Personal skills are never included. When skills are off for the workspace it returns `enabled: false`.

## A dispatch pipeline

Teams that dispatch coding agents from chat typically wire a `workflow_dispatch` GitHub Action that takes a ticket id, title, and description, works on a branch named after the ticket, opens a pull request, and runs an automated review. Henry can trigger such a workflow through your GitHub integration; the dispatch is a write action and stages an approval card like any other. Nothing merges on its own.

<Warning>
  Never enable step debugging or full-output logging on workflows that use this token. Run logs would then contain production logs and live query results.
</Warning>

Email [support@usehenry.ai](mailto:support@usehenry.ai) for the reference workflow files.
