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:
@@ -0,0 +1,20 @@
|
||||
package bridge
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestHubToolNames(t *testing.T) {
|
||||
got := HubToolNames([]string{
|
||||
"mcp__mcphub__espocrm_get_record",
|
||||
" espocrm_search_records ",
|
||||
"mcp__mcphub__",
|
||||
"",
|
||||
"nextcloud_list_files",
|
||||
})
|
||||
want := []string{"espocrm_get_record", "espocrm_search_records", "nextcloud_list_files"}
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
t.Fatalf("HubToolNames = %q, want %q", got, want)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user