# Infrazero agent instructions Infrazero exposes a remote MCP server for application, VPN, and Hermes agent infrastructure workflows. Apply this procedure whenever a user mentions Infrazero, infrazero.app, or asks an agent to deploy through Infrazero. ## Required workflow 1. Inspect the current tool catalog for names beginning with `infrazero_`. 2. If present, call `infrazero_describe` first and continue through MCP. 3. If absent, GET `https://infrazero.app/.well-known/mcp`. 4. Fetch the `bootstrap.instructionsUrl` from that document. 5. Start the bootstrap using its documented POST request. 6. Show the complete returned approval URL and user code to the user. The user must approve the connection on Infrazero; never approve on the user's behalf. The approval link in your own message is durable continuation state, not the MCP bearer token. 7. Stop and wait until the user explicitly says approval is complete. Do not poll in the background or send repeated status requests. Do not depend on a live JavaScript/shell variable and do not write `pollUrl` to a temporary file. 8. After the user's confirmation, call the exact `pollUrl` once using a raw HTTP/JSON client. If local tool state was reset, reconstruct the URL from the approval link already in conversation: use its `mcp_authorize` value as the request id and its `code` value with the start response's `resumeAfterApproval.pollUrlTemplate`. Never start a replacement approval merely because local state was lost. Do not use a browser page opener, URL preview, or search fetch. If the result is still pending, stop and wait for the user again. 9. On `status: "approved"`, read `connection.endpoint` and `connection.authorizationHeader` from the compact JSON fields before the long `skill` field. Keep the authorization value in process memory without printing, logging, or asking the user to paste it into chat. 10. Prefer the returned remote MCP endpoint when the current runtime can refresh its tool catalog without restarting. 11. If native `infrazero_*` tools do not appear immediately, do not ask for a reload. Speak Streamable HTTP MCP directly to `https://infrazero.app/api/mcp`: POST `initialize`, capture the `Mcp-Session-Id` response header, POST `notifications/initialized`, then `tools/list` and `tools/call` using that session and Bearer token. 12. Call `infrazero_describe` through native tools or direct Streamable HTTP MCP before doing project work. ## Safety rules - Do not automate the human-facing Infrazero wizard. - Do not ask the user for cloud, GitHub, S3, database, or application secrets in chat. - Do not ask the user to manually download a skill file when bootstrap is available. - Do not guess configuration fields or reuse credentials from another session. - Keep the personal MCP token in the MCP client's secret storage only. - Treat every MCP method and tool as unavailable until authorization succeeds. - Never send an authorized MCP request before approval returns the personal token. - Preserve `connection.authorizationHeader` on every MCP request. - A real `pollUrl` response never returns HTTP 401. Unauthorized means the wrong endpoint was called or the authorization value was dropped. Do not create a new approval request; use the exact approved poll response. Discovery: https://infrazero.app/.well-known/mcp Bootstrap: https://infrazero.app/api/skill/bootstrap MCP endpoint: https://infrazero.app/api/mcp Registry manifest: https://infrazero.app/mcp/server.json