Cookie authentication: first request fails, requires restart when cookies expire
Problem
When using GITLAB_AUTH_COOKIE_PATH with an auth proxy:
-
First request fails - Auth proxies redirect and set cookies on the first request. The MCP server's first real request fails because the session isn't established yet.
-
Server restart required when cookies expire - Cookies are loaded once at startup. If an external process refreshes expired cookies (e.g., every 2 hours), the MCP server keeps using stale cookies until restarted.
Expected behavior
- First request should succeed (after automatic session warmup)
- Cookie file changes should be detected and reloaded automatically
Environment
- Using
GITLAB_AUTH_COOKIE_PATH with cookie-based proxy authentication
- Cookies managed by external process that refreshes them periodically
Cookie authentication: first request fails, requires restart when cookies expire
Problem
When using
GITLAB_AUTH_COOKIE_PATHwith an auth proxy:First request fails - Auth proxies redirect and set cookies on the first request. The MCP server's first real request fails because the session isn't established yet.
Server restart required when cookies expire - Cookies are loaded once at startup. If an external process refreshes expired cookies (e.g., every 2 hours), the MCP server keeps using stale cookies until restarted.
Expected behavior
Environment
GITLAB_AUTH_COOKIE_PATHwith cookie-based proxy authentication