Skip to content

MCP OAuth: registered client expires together with the access token, so every re-login after 30 days fails with invalid_client #2251

Description

@fucx

Bug Description

The client registration via /api/mcp/register is valid for 30 days, just like the access token. There is no refresh token, which means that both expire at the same time. This causes the API to respond with invalid_client upon requesting a connection after 30 days.

A comment in the code suggests that the client registration should be renewed by the client automatically in response to the access token expiring. However, this does not work for Claude Code (see anthropics/claude-code#84614).

Suggested Solution

Either extend the period of validity for the client registration, or implement a refresh token.

Activity

  1. kaneo-mellon commented on Nov 21, 2026

    @kaneo-mellon

    Thanks for contributing to Kaneo!

    We welcome AI tools for exploring ideas and writing code. Our contributing guide asks that issue, feature request, and pull request descriptions be written in your own words, so maintainers can understand your thinking.

    This submission was flagged by an automated check, which can make mistakes. If you wrote the description yourself, no changes are needed. Otherwise, please update it to explain the issue or contribution in your own voice.

    Questions? A maintainer can help.

    Automated score: 0.9912454194365324 (cutoff 0.8). Detector: 9d3abed60e628951c7b0d2cd1e1c69eddb23eb97. Model SHA-256: 228087029eceee8a1c6cd57f29ec484a0141c639f8ed139fd506ef27eaa98825.

  2. added
    mellon: review
    on Nov 21, 2026
  3. added and removed
    mellon: review
    on Nov 27, 2026
  4. added theissue type on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions