Skip to content

feat(mcp-server): request ORG_ATTRIBUTES_READ scope by default#147

Merged
anikdhabal merged 2 commits into
mainfrom
devin/eng-2265-org-attributes-read-scope
Jul 9, 2026
Merged

feat(mcp-server): request ORG_ATTRIBUTES_READ scope by default#147
anikdhabal merged 2 commits into
mainfrom
devin/eng-2265-org-attributes-read-scope

Conversation

@anikdhabal

@anikdhabal anikdhabal commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Paired with calcom/cal#4177, which adds a dedicated ORG_ATTRIBUTES_READ OAuth scope for the org attributes read endpoints (replacing the reuse of ORG_MEMBERSHIP_READ). This PR appends that scope to the MCP server's default requested scope set so new authorizations mint tokens carrying the precise scope.

  DEFAULT_OAUTH_SCOPES =
-   "EVENT_TYPE_READ ... ORG_MEMBERSHIP_READ ..."
+   "EVENT_TYPE_READ ... ORG_MEMBERSHIP_READ ... ORG_ATTRIBUTES_READ"

No behavior change for existing connections: the cal PR keeps a backward-compat fallback so already-issued tokens (which only hold ORG_MEMBERSHIP_READ) continue to satisfy the attributes endpoints without re-consent. This change only affects the scope list presented on the next fresh authorization.

Docs touched: apps/mcp-server/README.md and apps/mcp-server/.env.example list the new scope in the default set.

Link to Devin session: https://app.devin.ai/sessions/f0105eac4ac544ffa2568e9c3c3358cd
Requested by: @anikdhabal


Summary by cubic

Add ORG_ATTRIBUTES_READ to the MCP server’s default Cal.com OAuth scopes so new authorizations request org-attributes read permission (ENG-2265). Backward compatible—existing tokens with ORG_MEMBERSHIP_READ still work; defaults updated in apps/mcp-server/src/config.ts and docs in apps/mcp-server/README.md and apps/mcp-server/.env.example.

Written for commit de9f07a. Summary will update on new commits.

Review in cubic

Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
@anikdhabal anikdhabal self-assigned this Jul 9, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@anikdhabal anikdhabal marked this pull request as ready for review July 9, 2026 05:54
@anikdhabal anikdhabal enabled auto-merge (squash) July 9, 2026 05:54

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread apps/mcp-server/src/config.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

# Conflicts:
#	apps/mcp-server/.env.example
#	apps/mcp-server/README.md
#	apps/mcp-server/src/config.ts
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
cal-companion-chat Ignored Ignored Jul 9, 2026 7:27pm
cal-companion-mcp Ignored Ignored Jul 9, 2026 7:27pm

Request Review

@anikdhabal anikdhabal merged commit 647e29e into main Jul 9, 2026
17 checks passed
@anikdhabal anikdhabal deleted the devin/eng-2265-org-attributes-read-scope branch July 9, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants