From 986560897967eb0aa1c43e33e1c900085f715aa7 Mon Sep 17 00:00:00 2001 From: Algis Dumbris Date: Fri, 20 Nov 2026 14:54:16 +0200 Subject: [PATCH 1/3] docs: check upstream readiness before the first tool call --- README.md | 6 +++++- docs/getting-started/quick-start.mdx | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c162ba4b1..2b5237c9b 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,11 @@ mcpproxy review show context7 # 3. approve (with no --tools/--all, only read-only tools with a clean scan are allowed) mcpproxy review approve context7 --yes -# 4. one harmless read, then see it in the activity log +# 4. check that context7 is Online and has discovered tools before calling it +# If it is still connecting, rerun this command. +mcpproxy upstream list + +# 5. one harmless read, then see it in the activity log mcpproxy call tool-read -t context7:resolve-library-id -j '{"libraryName":"vue-router","query":"routing"}' mcpproxy activity list --limit 3 ``` diff --git a/docs/getting-started/quick-start.mdx b/docs/getting-started/quick-start.mdx index 105a3c277..d2347986e 100644 --- a/docs/getting-started/quick-start.mdx +++ b/docs/getting-started/quick-start.mdx @@ -361,8 +361,10 @@ Approved server context7: 2 tools approved, 0 blocked, 0 still pending, 0 change `mcpproxy security approve context7` is an alias. -The header flips to `Connected (2 tools)`, **Admin state** to **Enabled**, and -the tab to `Tools (2)`. The Review tab confirms *"context7 is approved"*. +The Review tab confirms *"context7 is approved"*. The upstream can take a moment +to connect after approval or a daemon restart. Before making the first tool call, +run the command below. If Context7 is still connecting, run it again until +its status is `Online` and the tool count is greater than zero. ```bash mcpproxy upstream list From 56c3db89fc8c3544a26ae2cc59bd9e97b6db2eeb Mon Sep 17 00:00:00 2001 From: Algis Dumbris Date: Fri, 20 Nov 2026 15:19:25 +0200 Subject: [PATCH 2/3] docs: separate the readiness check from the first call --- README.md | 5 ++++- docs/getting-started/quick-start.mdx | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2b5237c9b..13ee3d0ab 100644 --- a/README.md +++ b/README.md @@ -167,9 +167,12 @@ mcpproxy review show context7 mcpproxy review approve context7 --yes # 4. check that context7 is Online and has discovered tools before calling it -# If it is still connecting, rerun this command. mcpproxy upstream list +``` + +If Context7 shows `Connecting` or lists zero tools, run `mcpproxy upstream list` again. Once it shows `Online` with discovered tools, make the first call. +```bash # 5. one harmless read, then see it in the activity log mcpproxy call tool-read -t context7:resolve-library-id -j '{"libraryName":"vue-router","query":"routing"}' mcpproxy activity list --limit 3 diff --git a/docs/getting-started/quick-start.mdx b/docs/getting-started/quick-start.mdx index d2347986e..98cc110f5 100644 --- a/docs/getting-started/quick-start.mdx +++ b/docs/getting-started/quick-start.mdx @@ -363,8 +363,8 @@ Approved server context7: 2 tools approved, 0 blocked, 0 still pending, 0 change The Review tab confirms *"context7 is approved"*. The upstream can take a moment to connect after approval or a daemon restart. Before making the first tool call, -run the command below. If Context7 is still connecting, run it again until -its status is `Online` and the tool count is greater than zero. +run the command below. If Context7 shows `Connecting` or lists zero tools, run it again. +Continue once its status is `Online` and the tool count is greater than zero. ```bash mcpproxy upstream list From 880207d300d30d8031494269e118979044664cbb Mon Sep 17 00:00:00 2001 From: Algis Dumbris Date: Sat, 21 Nov 2026 06:23:47 +0200 Subject: [PATCH 3/3] Avoid ephemeral port collision in OAuth login pairing test --- .../upstream/core/oauth_login_pair_race_test.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/internal/upstream/core/oauth_login_pair_race_test.go b/internal/upstream/core/oauth_login_pair_race_test.go index d6f2fa87e..d46c156f1 100644 --- a/internal/upstream/core/oauth_login_pair_race_test.go +++ b/internal/upstream/core/oauth_login_pair_race_test.go @@ -3,6 +3,7 @@ package core import ( "context" "encoding/json" + "fmt" "go/ast" "go/parser" "go/token" @@ -98,8 +99,18 @@ func TestLoginCompletion_TokenAndClientStoredAsOnePair(t *testing.T) { // completion time may hold a replacement listener on another port. replacement, err := oauth.GetGlobalCallbackManager().StartCallbackServer(f.name, 0) require.NoError(t, err) - cbA := &oauth.CallbackServer{Port: 41001, RedirectURI: "http://127.0.0.1:41001" + oauth.DefaultRedirectPath} - cbB := &oauth.CallbackServer{Port: 41002, RedirectURI: "http://127.0.0.1:41002" + oauth.DefaultRedirectPath} + // The OS can assign either synthetic port to the replacement listener. + portA, portB := 41001, 41002 + if replacement.Port == portA || replacement.Port == portB { + portA, portB = 41003, 41004 + } + newCallback := func(port int) *oauth.CallbackServer { + return &oauth.CallbackServer{ + Port: port, + RedirectURI: fmt.Sprintf("http://127.0.0.1:%d%s", port, oauth.DefaultRedirectPath), + } + } + cbA, cbB := newCallback(portA), newCallback(portB) ctx := context.Background() doneA := make(chan error, 1)