Skip to content

feat: lazy Snowflake connection to avoid SSO on startup#9

Merged
atvaccaro merged 1 commit intomainfrom
avaccaro/lazy-connection
Feb 6, 2026
Merged

feat: lazy Snowflake connection to avoid SSO on startup#9
atvaccaro merged 1 commit intomainfrom
avaccaro/lazy-connection

Conversation

@atvaccaro
Copy link

Summary

  • Defers Snowflake connection from MCP server init to first tool use, so Okta SSO browser auth is not triggered every Claude Code boot
  • Adds client_store_temporary_credential=True to cache SSO tokens in the macOS keychain
  • Simplifies get_connection() by reusing _ensure_connected() instead of duplicated inline connection logic

Test plan

  • Start Claude Code — verify no Okta browser tab opens on startup
  • Use a Snowflake tool — verify connection is established and SSO triggers only then
  • Subsequent sessions — verify client_store_temporary_credential caches the token (no browser prompt)
  • SPCS container auth path is unchanged (lazy init still works with OAuth token)

🤖 Generated with Claude Code

Defer the Snowflake connection from MCP server init to first tool use,
so Okta/SSO browser auth is not triggered every time Claude Code boots.
Also enable client_store_temporary_credential to cache SSO tokens.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@atvaccaro atvaccaro self-assigned this Feb 6, 2026
@atvaccaro atvaccaro merged commit 2df4994 into main Feb 6, 2026
12 checks passed
@atvaccaro atvaccaro deleted the avaccaro/lazy-connection branch February 6, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant