.env.exampleβ’2.17 kB
# Twenty MCP Server Configuration
# Copy this file to .env and fill in your actual values
# Required: Your Twenty CRM API Key
# Get this from: Settings > API & Webhooks > Generate API Key
TWENTY_API_KEY=your-twenty-api-key-here
# Required: Your Twenty instance URL
# Examples:
# - Twenty Cloud: https://api.twenty.com
# - Self-hosted: https://your-company.twenty.com
# - Local dev: http://localhost:3000
TWENTY_BASE_URL=https://your-twenty-instance.com
# Optional: Debug logging (uncomment to enable)
# DEBUG=twenty-mcp:*
# ===== OAuth Authentication Configuration (Optional) =====
# Enable OAuth authentication for multi-user support
# Enable/disable OAuth authentication
AUTH_ENABLED=false
# Authentication provider (currently only 'clerk' is supported)
AUTH_PROVIDER=clerk
# Require authentication for all requests
# If false, allows both authenticated and anonymous requests
REQUIRE_AUTH=false
# ===== Clerk Configuration (Required if AUTH_ENABLED=true) =====
# Get these from https://dashboard.clerk.com
# Clerk publishable key (starts with pk_)
CLERK_PUBLISHABLE_KEY=pk_test_xxx
# Clerk secret key (starts with sk_)
CLERK_SECRET_KEY=sk_test_xxx
# Your Clerk application domain
CLERK_DOMAIN=your-app.clerk.accounts.dev
# ===== Security Configuration =====
# Encryption secret for storing user API keys
# Generate with: openssl rand -hex 32
API_KEY_ENCRYPTION_SECRET=your-32-byte-hex-string-here
# ===== IP Protection Configuration (Optional) =====
# Restrict server access by IP address
# Enable/disable IP protection
IP_PROTECTION_ENABLED=false
# Comma-separated list of allowed IP addresses and CIDR blocks
# Examples: 192.168.1.100,10.0.0.0/8,2001:db8::/32
# Note: 127.0.0.1 (localhost) is always allowed
IP_ALLOWLIST=192.168.1.0/24,10.0.0.0/8
# Comma-separated list of trusted reverse proxy IPs
# Used to read X-Forwarded-For and X-Real-IP headers
TRUSTED_PROXIES=127.0.0.1,10.0.0.1
# Block connections when client IP cannot be determined
# Set to false to allow unknown IPs (not recommended)
IP_BLOCK_UNKNOWN=true
# ===== Server Configuration =====
# Public URL of this MCP server (used for OAuth metadata)
MCP_SERVER_URL=http://localhost:3000