Skip to content

Persist dynamically registered OAuth clients across sessions #3335

Closed

Description

@eleftherias

Formalising this future enhancement into an issue

3. **Client Credential Caching**: Persist dynamically registered clients across sessions

Problem

When using Dynamic Client Registration (RFC 7591) for remote MCP servers, client credentials are not persisted across restarts. This causes:

  1. New OAuth client registered on every thv run execution
  2. Orphaned client registrations accumulate in OAuth providers
  3. Risk of rate limiting from excessive registration requests

Acceptance Criteria

  • DCR credentials (client_id, client_secret) persisted after registration
  • DCR metadata (client_secret_expires_at, registration_access_token) stored
  • Credentials reused across thv run restarts
  • Expired credentials trigger automatic re-registration
  • thv secret list shows persisted DCR secrets
  • thv secret rm can remove persisted credentials
  • Backward compatibility maintained for existing configs
  • Documentation updated

References

Activity

  1. carlos-gn commented on Jan 22, 2026

    @carlos-gn
    Contributor

    @eleftherias actually this happened to me with the atlassian mcp. Assign it to me :)

  2. added a commit that references this issue on Jan 23, 2026
    bd87c65
  3. eleftherias commented on Jan 23, 2026

    @eleftherias
    MemberAuthor

    Hey @carlos-gn, another contributor has created a PR for this issue. They already had a partial solution based on a previous issue they had worked on.
    Sorry about the coordination issues here, I hope you didn't spend too much time implementing this already.

    If you're still up for contributing, #995 and #883 have been bugging us for a while and could use some eyes.

  4. added a commit that references this issue on Jan 31, 2026
    7d02b34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions