Skip to content

Conversation

@vorporeal
Copy link
Contributor

Motivation and Context

When connecting to the GitHub remote MCP server as an "OAuth App" client (as opposed to a "GitHub App" client), GitHub issues a persistent, non-expiring access token and no refresh token.

The current logic treats a lack of an expiry time as "the token is already expired", which is incorrect in this use case, as the token never expires, and we are unable to refresh it (as we were never issued a refresh token).

This fixes the issue by only attempting to refresh if we have either a refresh token or an expiry time.

How Has This Been Tested?

Tested it with a local build of Warp, and verified that instead of getting OAuth token refresh failed: No refresh token available errors, we now are able to properly make an authenticated connection to the GitHub remote MCP server.

Breaking Changes

No, this is not a breaking API change, and should not break any functional behavior.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@github-actions github-actions bot added T-core Core library changes T-transport Transport layer changes labels Dec 19, 2025
@vorporeal vorporeal force-pushed the vorporeal/fix-handling-of-non-expiring-access-tokens branch from 9d7e18a to 79d03f7 Compare December 19, 2025 18:51
@vorporeal vorporeal changed the title Only try to refresh access tokens if we have a refresh token or an expiry time. fix: only try to refresh access tokens if we have a refresh token or an expiry time Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-transport Transport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant