Skip to content

Commit db2ad0f

Browse files
committed
docs(examples): allow skipping manual OAuth in oauth2 script
1 parent 04ac645 commit db2ad0f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

examples/clients/simple-auth-multiprotocol-client/run_oauth2_test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ SIMPLE_AUTH_SERVER="${REPO_ROOT}/examples/servers/simple-auth"
1111
SIMPLE_AUTH_CLIENT="${REPO_ROOT}/examples/clients/simple-auth-client"
1212
AS_PORT=9000
1313
RS_PORT=8001
14+
SKIP_OAUTH="${MCP_SKIP_OAUTH:-0}"
1415

1516
cd "$REPO_ROOT"
1617
echo "Repo root: $REPO_ROOT"
18+
echo "Skip OAuth: $SKIP_OAUTH"
1719

1820
# Ensure deps (simple-auth and simple-auth-client are workspace examples)
1921
uv sync --quiet 2>/dev/null || true
@@ -65,6 +67,12 @@ curl -sS "http://localhost:$RS_PORT/.well-known/oauth-protected-resource/mcp" |
6567
echo ""
6668
echo ""
6769

70+
# Optional: skip launching the interactive client (for CI / automation).
71+
if [ "$SKIP_OAUTH" = "1" ]; then
72+
echo "Skipping OAuth manual test (MCP_SKIP_OAUTH=1)"
73+
exit 0
74+
fi
75+
6876
# Run client (foreground); user completes OAuth in browser and runs list / call get_time / quit
6977
echo "Starting simple-auth-client. Complete OAuth in the browser, then run: list, call get_time {}, quit"
7078
echo ""

0 commit comments

Comments
 (0)