name = "linear-mcp"
main = "src/worker.ts"
compatibility_date = "2025-06-18"
workers_dev = true
compatibility_flags = ["nodejs_compat"]
[vars]
# MCP protocol
MCP_PROTOCOL_VERSION = "2025-11-25"
MCP_TITLE = "Linear"
MCP_VERSION = "1.0.0"
# Auth - MUST be enabled for Linear OAuth
AUTH_ENABLED = "true"
AUTH_REQUIRE_RS = "true"
AUTH_ALLOW_DIRECT_BEARER = "false"
# Linear API endpoints
PROVIDER_ACCOUNTS_URL = "https://linear.app/oauth"
OAUTH_AUTHORIZATION_URL = "https://linear.app/oauth/authorize"
OAUTH_TOKEN_URL = "https://api.linear.app/oauth/token"
OAUTH_REVOCATION_URL = "https://api.linear.app/oauth/revoke"
# Linear scopes (space-separated)
OAUTH_SCOPES = "read write"
# Redirect configuration
# Add your client's callback URIs here
OAUTH_REDIRECT_ALLOW_ALL = "false"
OAUTH_REDIRECT_ALLOWLIST = "alice://oauth/callback,https://claude.ai/api/mcp/auth_callback,https://claude.com/api/mcp/auth_callback,https://example.com/mcp/oauth/linear/callback"
OAUTH_REDIRECT_URI = "https://your-worker.your-subdomain.workers.dev/oauth/callback"
# Environment
NODE_ENV = "production"
# ─────────────────────────────────────────────────────────────────────────────
# SECRETS - Set via wrangler secret put (NEVER in [vars]!)
# ─────────────────────────────────────────────────────────────────────────────
#
# Linear OAuth (from https://linear.app/settings/api → OAuth Applications):
# wrangler secret put PROVIDER_CLIENT_ID
# wrangler secret put PROVIDER_CLIENT_SECRET
#
# Token encryption (recommended for production):
# openssl rand -base64 32 | tr -d '=' | tr '+/' '-_'
# wrangler secret put RS_TOKENS_ENC_KEY
#
# Without RS_TOKENS_ENC_KEY, provider tokens are stored unencrypted in KV!
# ─────────────────────────────────────────────────────────────────────────────
[[kv_namespaces]]
binding = "TOKENS"
# Create with: wrangler kv:namespace create TOKENS
# Replace with your KV namespace ID:
id = "YOUR_KV_NAMESPACE_ID"
# Preview KV namespace (for wrangler dev --remote)
# Create with: wrangler kv:namespace create TOKENS --preview
# [[kv_namespaces]]
# binding = "TOKENS"
# preview_id = "YOUR_PREVIEW_KV_NAMESPACE_ID"