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:
@@ -64,7 +64,7 @@ Back up `~/.local/share/supermarket` to keep everything.
|
||||
|
||||
## Hermes and your Core
|
||||
|
||||
Supermarket never talks to your Core's MCP hub itself. CoreDesktop's Hermes agent does: it holds the hub's password, and carries out the CRM work Supermarket queues (from Phase 2). The two meet through Supermarket's own MCP endpoint at `http://127.0.0.1:8470/mcp`, which requires a bearer token.
|
||||
Supermarket never talks to your Core's MCP hub itself. CoreDesktop's Hermes agent does: it holds your own token for the hub, and carries out the CRM work Supermarket queues (from Phase 2). The two meet through Supermarket's own MCP server. Hermes runs in CoreDesktop's sandbox, which has its own network (`127.0.0.1:8470` there isn't your computer's), so Hermes reaches Supermarket through a Unix socket in the data folder, `~/.local/share/supermarket/mcp.sock`, using `socat`. Other agents, such as Claude Code, use `http://localhost:8470/mcp` with the bearer token from `supermarket token`.
|
||||
|
||||
`install.sh` (or `supermarket hermes`) adds both MCP servers to `~/.hermes/config.yaml`:
|
||||
|
||||
@@ -72,22 +72,21 @@ Supermarket never talks to your Core's MCP hub itself. CoreDesktop's Hermes agen
|
||||
mcp_servers:
|
||||
mcphub:
|
||||
url: "https://mcphub.<your Core's domain>/sse?as_user=<your user name>"
|
||||
transport: sse
|
||||
headers:
|
||||
Authorization: "Basic ${MCPHUB_AUTH}"
|
||||
supermarket:
|
||||
url: "http://127.0.0.1:8470/mcp"
|
||||
headers:
|
||||
Authorization: "Bearer ${SUPERMARKET_MCP_TOKEN}"
|
||||
command: socat
|
||||
args: ["STDIO", "UNIX-CONNECT:/home/<you>/.local/share/supermarket/mcp.sock"]
|
||||
```
|
||||
|
||||
Hermes fills in each `${...}` from `~/.hermes/.env` when it connects, so `config.yaml` holds no password:
|
||||
Hermes fills in `${MCPHUB_AUTH}` from `~/.hermes/.env` when it connects, so `config.yaml` holds no secret:
|
||||
|
||||
```
|
||||
MCPHUB_AUTH=<base64 of user:password>
|
||||
SUPERMARKET_MCP_TOKEN=<from supermarket token>
|
||||
MCPHUB_AUTH=<your own hub token from your Core: the part after "Basic ">
|
||||
```
|
||||
|
||||
Hermes runs in CoreDesktop's sandbox, so it can only reach the hub and Supermarket once they're in `network.allowedDomains` in `~/.config/coredesktop/sandbox/hermes.json`. The script asks before adding them, then restarts Hermes' gateway.
|
||||
Hermes' sandbox can only reach the hub once it's in `network.allowedDomains` in `~/.config/coredesktop/sandbox/hermes.json`. The script asks before adding it, then restarts Hermes' gateway. To enter a different hub token: `supermarket hermes --reconfigure`.
|
||||
|
||||
To check the connection, open **Core & Hermes** in Supermarket and ask Hermes the question shown there. Hermes lists the hub's tools and reports them back to Supermarket, which shows when it last heard from Hermes.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user