Connect Hermes to the Core's MCP hub and to Supermarket

Hermes runs in CoreDesktop's sandbox, with its own network, so it can't
reach 127.0.0.1:8470. The app now also serves MCP on a Unix socket in its
data folder (/data/mcp.sock), which Hermes reaches with socat. HTTP /mcp
with the bearer token remains for other agents.

hermes/setup.sh asks for the user's own hub token (the Core now issues
per-user tokens), checks it with the hub, and stores it in Hermes' .env.
The hub only speaks SSE, and Hermes' Streamable HTTP attempt can use up
its connect time, so the setup sets transport: sse. It also warns when
Hermes' gateway is still running with the old servers.

Check-ins store the hub's own tool names, without Hermes' mcp__mcphub__
prefix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 12:31:14 -07:00
co-authored by Claude Opus 5.5
parent 1a86589840
commit f3e5b9eff6
12 changed files with 393 additions and 68 deletions
+3 -3
View File
@@ -14,14 +14,14 @@
<section class="card">
<h2>Hermes bridge</h2>
<p>Hermes, CoreDesktop's agent, is the only thing that talks to your Core's MCP hub. It reaches Supermarket at <code>{{.MCPURL}}</code>.</p>
<p>Hermes, CoreDesktop's agent, is the only thing that talks to your Core's MCP hub. It reaches Supermarket through the socket <code>{{.MCPSocket}}</code>; other agents, such as Claude Code, use <code>{{.MCPURL}}</code> with the MCP token.</p>
{{with .Last}}
<p class="ok">Hermes last checked in {{ago .At}}{{if .Note}}: “{{.Note}}”{{end}}.</p>
{{if .MCPHubTools}}
<details><summary>It can use {{len .MCPHubTools}} tools from the MCP hub</summary>
<ul class="pills">{{range .MCPHubTools}}<li><span class="pill">{{.}}</span></li>{{end}}</ul>
</details>
{{else}}<p class="warn-text">It reported no tools from the MCP hub: check the hub's address and password.</p>{{end}}
{{else}}<p class="warn-text">It reported no tools from the MCP hub: check the hub's address and your hub token.</p>{{end}}
{{else}}
<p>Hermes hasn't checked in yet.</p>
{{end}}
@@ -38,7 +38,7 @@
<div class="copy"><pre id="hermes-config">{{.HermesConfig}}</pre><button type="button" class="secondary" data-copy="hermes-config">Copy</button></div>
<p>and this to <code>~/.hermes/.env</code>, so no password is in <code>config.yaml</code>:</p>
<pre>{{.HermesEnv}}</pre>
<p>Hermes runs in CoreDesktop's sandbox, so also let it reach both servers: add <code>mcphub.{{if .Core}}{{.Core.Domain}}{{else}}&lt;your Core's domain&gt;{{end}}</code> and <code>127.0.0.1:8470</code> to <code>network.allowedDomains</code> in <code>~/.config/coredesktop/sandbox/hermes.json</code>. Then restart Hermes' gateway: <code>systemctl --user restart hermes-gateway</code>.</p>
<p>Hermes runs in CoreDesktop's sandbox, so also let it reach the hub: add <code>mcphub.{{if .Core}}{{.Core.Domain}}{{else}}&lt;your Core's domain&gt;{{end}}</code> to <code>network.allowedDomains</code> in <code>~/.config/coredesktop/sandbox/hermes.json</code>. Then restart Hermes' gateway: <code>systemctl --user restart hermes-gateway</code>.</p>
<details><summary>Show the MCP token</summary><pre>{{.MCPToken}}</pre><p class="help">Also in <code>mcp-token</code> in the data folder.</p></details>
</details>
{{end}}{{end}}