Skip to the page
Download coming soon

Connect Codex and Hermes

Codex and Hermes Agent can edit your Astro projects the same way Claude Code does. Each one needs the Astro app running and a token of its own.

The quick way

  1. Open the Astro app.
  2. Open Settings, then Connect agents.
  3. Choose the Codex tab or the Hermes tab. If the card says to install or sign in first, do that, then press Check again.
  4. Press Connect automatically.

Astro creates a token for the agent on this computer, saves a copy of the agent's settings file, and adds itself to that file. The card shows Waiting for connection… until the agent really reaches Astro, then Connected.

If Astro can't change the settings file, the card shows a command with your token in it. Press Copy, paste it into PowerShell (Terminal on a Mac), and run it. The card turns to Connected by itself. Show the command instead gives you the same command without trying first.

By hand

Create a token first: Settings, Connect agents, Create token. Copy it. It starts with astro_.

Codex

Codex keeps its settings in a file named config.toml inside a folder named .codex in your home folder. Add this block to the end of the file:

[mcp_servers.astro]
url = "http://127.0.0.1:41417/api/cut/mcp"
http_headers = { Authorization = "Bearer astro_YOUR_TOKEN" }
default_tools_approval_mode = "approve"

The last line lets Codex use Astro's tools without asking each time; without it, an edit Codex runs on its own stops at the first tool.

Save the file and start Codex again.

Hermes Agent

Run these three commands:

hermes config set mcp_servers.astro.url http://127.0.0.1:41417/api/cut/mcp
hermes config set mcp_servers.astro.headers.Authorization "Bearer astro_YOUR_TOKEN"
hermes config set mcp_servers.astro.enabled true

Start Hermes again.

Any other agent

Any program that speaks MCP over HTTP can connect. Give it:

SettingValue
Addresshttp://127.0.0.1:41417/api/cut/mcp
TransportHTTP
HeaderAuthorization: Bearer astro_YOUR_TOKEN

The MCP reference lists what an agent can do once it is connected.

Using them from inside Astro

You do not need a terminal to use these agents. In the Assistant panel, open the agent menu and pick Codex or Hermes Agent. Astro runs the agent on this computer with the plan you already have, and no Astro credits are used.

Hermes runs on the AI provider you set up in Hermes. A Claude plan's limits don't cover Hermes: Anthropic bills apps like Hermes to the extra usage on your Claude account. Run hermes model in a terminal to choose another provider, or add extra usage at claude.ai/settings/usage.

One token per agent

Connect automatically gives each agent on each computer a token of its own, named like Codex – YOUR-PC. Connecting again replaces it. By hand, create a separate token for each agent and name it after the agent. Then you can turn one off without touching the others, and the last used time tells you which agent has been active.