Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mcp/client/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ async def _exchange_token(self, auth_code: str, code_verifier: str) -> httpx.Req

async def _handle_token_response(self, response: httpx.Response) -> None:
"""Handle token exchange response."""
if response.status_code != 200:
if response.status_code not in {200, 201}:
raise OAuthTokenError(f"Token exchange failed: {response.status_code}")

try:
Expand Down
Loading