claude -p headless sessions don't load Claude AI connector MCP tools

Resolved 💬 4 comments Opened Mar 20, 2026 by nsimi22 Closed Apr 18, 2026

Description

claude -p headless sessions do not load Claude AI connector MCP servers (e.g., claude.ai Slack, claude.ai Microsoft 365, claude.ai Atlassian). Only locally configured stdio/HTTP MCPs (from ~/.claude.json) are available.

Interactive Claude Code sessions load all connectors correctly. claude mcp list shows them as "Connected". But claude -p spawned processes cannot see or use any mcp__claude_ai_* tools.

Reproduction

  1. Configure Claude AI connector MCPs (Slack, Microsoft 365, etc.) — verify they show as "Connected" in claude mcp list
  2. In an interactive session, confirm mcp__claude_ai_Slack__slack_send_message works
  3. Run: echo "Run ToolSearch for mcp__claude_ai_Slack__slack_send_message and report FOUND or NOT_FOUND" | claude -p --dangerously-skip-permissions
  4. Result: NOT_FOUND — the tool is not available in headless mode

Expected Behavior

claude -p should have access to the same Claude AI connector MCP tools as interactive sessions, since they're configured at the account/workspace level.

Environment

  • Claude Code version: 2.1.80
  • Platform: macOS (Darwin 25.3.0)
  • Claude Desktop: Running and signed in
  • All connectors show as "Connected" in claude mcp list

Impact

This breaks any automation that uses claude -p (LaunchAgents, cron jobs, CI/CD) that depends on Claude AI connector MCPs. We have 5 monitoring agents that relied on these connectors and had to migrate to local MCP servers as a workaround.

Workaround

For Slack: Built a local stdio MCP server with equivalent functionality, configured in ~/.claude.json.

For Microsoft 365: No workaround available — requires Azure AD app registration which may not be accessible to all users.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗