Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

Merge branch 'claude/beacon-mcp-harness-register-b8b7yz' into claude/beacon-mcp-harness-register-b8b7yz-docs

Claude8ae8b522a125
diff --cc cli/beacon/cmd/mcp_connect_test.go
index 049aae26,d1f45f5a..7d80d6dc
--- a/cli/beacon/cmd/mcp_connect_test.go
+++ b/cli/beacon/cmd/mcp_connect_test.go
@@@ -520,14 -522,40 +522,52 @@@ func TestMCPServerNamesDoNotCollide(t *
}
}
+func TestInstallSuggestsMCPConnectOnlyAfterTheWizardChoseManaged(t *testing.T) {
+ var buf bytes.Buffer
+ suggestMCPConnect(&buf, false)
+ if buf.Len() != 0 {
+ t.Fatalf("an unattended or --connect install printed %q", buf.String())
+ }
+ suggestMCPConnect(&buf, true)
+ if !strings.Contains(buf.String(), "beacon mcp connect") {
+ t.Fatalf("got %q", buf.String())
+ }
+}
++
+ // Regression: the backend names a canonical MCP URL different from the ingest URL plus /mcp, and
+ // connect writes the canonical one. status without --check makes no request, so it must compare
+ // against the URL connect wrote, not the derived one.
+ func TestMCPStatusWithoutCheckUsesTheURLConnectWrote(t *testing.T) {
+ fx := newMCPFixture(t, "cursor")
+ ingest := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "application/json")
+ _ = json.NewEncoder(w).Encode(map[string]any{"resource": fx.url})
+ }))
+ t.Cleanup(ingest.Close)
+ mcpIngestURL = func() string { return ingest.URL }
+ if _, _, err := runMCP(t, "connect", "--yes"); err != nil {
+ t.Fatal(err)
+ }
+ afterConnect := len(fx.requests.all())
+ stdout, _, err := runMCP(t, "status")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if !strings.Contains(stdout, "Beacon Managed MCP URL: "+fx.url) || strings.Contains(stdout, "other URL") {
+ t.Fatalf("status compared against the derived URL:\n%s", stdout)
+ }
+ if n := len(fx.requests.all()); n != afterConnect {
+ t.Fatalf("status made a request without --check (%d after connect, %d after status)", afterConnect, n)
+ }
+ }
+
+ func TestMCPStatusFallsBackToTheRecordedURLWithoutAnEnrollment(t *testing.T) {
+ fx := newMCPFixture(t, "cursor")
+ if _, _, err := runMCP(t, "connect", "--url", fx.url, "--yes"); err != nil {
+ t.Fatal(err)
+ }
+ stdout, _, err := runMCP(t, "status")
+ if err != nil || !strings.Contains(stdout, "Beacon Managed MCP URL: "+fx.url) || strings.Contains(stdout, "other URL") {
+ t.Fatalf("err = %v\n%s", err, stdout)
+ }
+ }