# LinkedIn MCP Server Configuration
# Copy this file to .env and fill in your credentials
# ============================================================================
# OAuth Configuration
# ============================================================================
# OAuth Mode: "linkedin" (default) or "keycloak"
# - linkedin: Direct OAuth with LinkedIn (requires LINKEDIN_CLIENT_ID/SECRET)
# - keycloak: Use Keycloak as OAuth provider (requires KEYCLOAK_* settings)
OAUTH_MODE=linkedin
OAUTH_ENABLED=true
OAUTH_SERVER_URL=http://localhost:8000
# ============================================================================
# LinkedIn Direct Mode Configuration
# ============================================================================
# Use when OAUTH_MODE=linkedin
# Get credentials from: https://www.linkedin.com/developers/apps
# Required scopes: openid, profile, w_member_social
LINKEDIN_CLIENT_ID=your_client_id_here
LINKEDIN_CLIENT_SECRET=your_client_secret_here
LINKEDIN_REDIRECT_URI=http://localhost:8000/oauth/callback
# ============================================================================
# Keycloak Mode Configuration
# ============================================================================
# Use when OAUTH_MODE=keycloak
# Keycloak manages LinkedIn as an Identity Provider and stores tokens
# Keycloak server URL (without /realms)
#KEYCLOAK_BASE_URL=http://localhost:8080
# Keycloak realm name
#KEYCLOAK_REALM=my-realm
# Identity Provider alias in Keycloak (the name you gave LinkedIn IdP)
#KEYCLOAK_PROVIDER_ALIAS=linkedin
# Important Keycloak Setup:
# 1. Configure LinkedIn as Identity Provider in Keycloak
# 2. Enable "Store Tokens" in Identity Provider settings
# 3. Add "broker -> read-token" role to users who need LinkedIn access
# 4. Configure LinkedIn OAuth app with Keycloak redirect URI:
# http://localhost:8080/realms/my-realm/broker/linkedin/endpoint
# ============================================================================
# Session Storage
# ============================================================================
# Use 'memory' for local development (no Redis needed)
# Use 'redis' for production (requires SESSION_REDIS_URL)
SESSION_PROVIDER=memory
# Optional: Production Redis Configuration
#SESSION_REDIS_URL=redis://localhost:6379/0
# ============================================================================
# Optional Configuration
# ============================================================================
# LinkedIn Person URN (auto-fetched via OAuth, but can be set manually)
#LINKEDIN_PERSON_URN=urn:li:person:YOUR_MEMBER_ID
# Artifact Storage Provider (memory, filesystem, s3, ibm-cos)
#ARTIFACT_PROVIDER=memory