Skip to content
Discussion options

You must be logged in to vote

Hi @PL-Peter! Great setup — running behind a Cloudflare tunnel with ZeroTrust is a solid approach.

The behavior you're seeing (works initially, disconnects after ~1 hour) is a known limitation of our current OAuth implementation:

Root Cause

Access tokens expire after 60 minutes (the default MCP_OAUTH_ACCESS_TOKEN_EXPIRE_MINUTES=60), and our OAuth server does not yet issue refresh tokens. When the token expires, Claude.ai has no way to silently renew the session — it can only show "not connected" until you re-authenticate manually.

Workarounds (for now)

Option 1: Increase token lifetime

Set in your .env / container environment:

MCP_OAUTH_ACCESS_TOKEN_EXPIRE_MINUTES=1440

This extends token…

Replies: 6 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@omni-front
Comment options

Answer selected by PL-Peter
Comment options

You must be logged in to vote
1 reply
@omni-front
Comment options

Comment options

You must be logged in to vote
1 reply
@omni-front
Comment options

Comment options

You must be logged in to vote
2 replies
@doobidoo
Comment options

@omni-front
Comment options

Comment options

You must be logged in to vote
1 reply
@omni-front
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants