Skip to content

Can a scheduled local Claude Code run use your connectors, or does it need the cloud?

Last updated 2026-08-17 · Confidence: documented — Claude Code’s headless, MCP, and scheduled-task docs; the cron-keychain caveat is inferred.

Local works: a scheduled claude -p run inherits your MCP servers, connector logins, and saved permissions — the cloud is only required when your machine may be off, or for Event triggers like API calls and GitHub events.

Without the --bare flag, claude -p loads the same context an interactive session would: settings, hooks, CLAUDE.md, and every MCP server configured in ~/.claude.json or the project’s .mcp.json. Connectors added on claude.ai appear in Claude Code automatically once you’re logged in with that account. --bare skips all of it and never reads OAuth credentials or the system keychain — so a “bare” scripted run is the one that genuinely has no connector access.

Authenticate and approve first, interactively

Section titled “Authenticate and approve first, interactively”

A headless run can’t show OAuth or permission prompts, so front-load both:

  • Sign in to remote servers once from an interactive session (/mcp or claude mcp login <name>); stored tokens refresh automatically on a 401. A few Anthropic-hosted connectors (Gmail, Google Calendar, Microsoft 365) can only be connected from claude.ai settings, then flow through.
  • Pre-approve tools with --allowedTools, a permission mode, or permissions.allow rules — otherwise calls fail instead of waiting.

Claude Code’s comparison of scheduling options: your own cron job wrapping claude -p is the DIY version of the Desktop app’s local scheduled tasks — Routines → New routine → Local, 1-minute minimum interval, per-task permission mode with “always allow” choices that persist across runs, one catch-up run after sleep. Both need the machine awake (Desktop tasks also need the app open). Cloud routines run with the machine off but get a fresh clone, not your local files, with connectors configured per task and an hourly minimum.

One cron caveat: a non-bare run reads credentials from the system keychain, which cron’s environment may not unlock.