Fix Calendar permissions for VS Code and other IDE-based MCP clients - #1
Open
jackrichins wants to merge 1 commit into
Open
Fix Calendar permissions for VS Code and other IDE-based MCP clients#1jackrichins wants to merge 1 commit into
jackrichins wants to merge 1 commit into
Conversation
macOS TCC (Transparency, Consent, and Control) has two requirements that prevent Calendar from working in IDE terminals: 1. On macOS 14+, the deprecated requestAccessToEntityType_completion_ silently fails for Calendar. Switch to requestFullAccessToEvents- WithCompletion_ and requestFullAccessToRemindersWithCompletion_. 2. TCC requires BOTH the direct binary (uv/python) AND the responsible app (VS Code, Cursor, etc.) to have permission. IDEs cannot trigger the Calendar permission dialog, so the setup script must be run from Terminal.app to grant permission to the uv binary. After the dialog grants permission to uv, the script automatically detects the parent IDE (via TERM_PROGRAM, VSCODE_PID) and copies its existing Reminders TCC entry to Calendar — no manual database manipulation needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
Just sharing what I got to work - feel free to reject or modify heavily, but since I found this project so useful just wanted to share back. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
requestFullAccessToEventsWithCompletion_andrequestFullAccessToRemindersWithCompletion_instead of the deprecatedrequestAccessToEntityType_completion_, which silently fails for Calendar when run from IDE subprocesses (VS Code, Cursor, etc.)Problem
On macOS 14+, the deprecated
requestAccessToEntityType_completion_API silently fails to show a Calendar permission dialog when run from IDE integrated terminals (VS Code, Cursor, Windsurf). Reminders still works with the old API, but Calendar does not. Additionally, macOS TCC has a dual-requirement: both the binary AND the parent app need permission, which IDEs cannot obtain for Calendar on their own.Solution
permissions.py: Updated to use macOS 14+ full-access APIs, handle WRITE_ONLY status, and direct users to run setup from Terminal.appsetup_permissions.py: Major rewrite to:Test plan
uv run python scripts/setup_permissions.pyfrom Terminal.app — should show Calendar/Reminders dialogs and grant permissionscheck_permissionsMCP tool reports both Calendar and Reminders as authorized🤖 Generated with Claude Code