# Hermes Agent + VidMachine MCP

> Add one remote server to config.yaml, then run the loop from Hermes.

Hermes reads MCP servers from `~/.hermes/config.yaml` and resolves `${env:NAME}` inside headers, so the key stays in `~/.hermes/.env`. Add VidMachine once and every Hermes session — CLI, desktop, or gateway — can list projects, edit scenes, and schedule posts.

Page: https://vidmachine.ai/hermes

## Connect

Create an API key under [API & MCP](https://vidmachine.ai/api-keys), then add the server and the key.

```yaml
mcp_servers:
  vidmachine:
    url: "https://vidmachine.ai/api/mcp"
    headers:
      Authorization: "Bearer ${env:VIDMACHINE_API_KEY}"
```

Put the key in `~/.hermes/.env`:

```bash
VIDMACHINE_API_KEY=vidm_...
```

Run `hermes mcp test vidmachine` to confirm it connects. In an open session, run `/reload mcp` after editing the config.

- The key lives in `~/.hermes/.env`; the config only names the variable.
- The same key works for the [REST API](https://vidmachine.ai/docs/api.md).
- The agent gets 28 tools in five groups: find, build, render, post, brand.

## The loop: find, inspect, make, schedule

### 1. Find — find out what's already there

Ask for a project or a video in plain language. The read tools answer with real IDs, statuses, and the first missing stage — and cost nothing.

Tools: `search_documentation`, `get_documentation`, `list_projects`, `list_videos`

### 2. Inspect — inspect before spending credits

Read the script, scenes, and cover, then quote the credits the remaining stages will cost and check the balance. Every paid step is priced before it runs.

Tools: `get_video_content`, `estimate_video_cost`, `get_credit_balance`

### 3. Make — make your version

Rewrite a scene, regenerate just that scene's media, and resume the pipeline. Work that already exists is reused, so a one-scene change does not redo the video.

Tools: `update_scene`, `generate_scene_media`, `generate_video`, `export_video`

### 4. Schedule — schedule it and get the link

Set the post time and status, then have the final URL handed back to you. The scheduler publishes it with the same rules as the dashboard.

Tools: `update_video`, `export_video`

## Three prompts to try

1. Find the Fast Brain project, tell me what's left to render, and quote the credits.
2. Rewrite scene 3 with a tighter hook and regenerate only that scene.
3. Schedule the finished clip for Friday 9:00 and send me the export link.

## Full tool list

Every tool, input schema, protocol version, and header rule: [MCP server docs](https://vidmachine.ai/docs/mcp.md).
