feat: register public Notion OAuth integration for remote proxy #6
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/notion-mcp-remote#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone — scoped from
project-notion-mcp-remote. Prerequisite for the claude.ai OAuth round-trip.Repo
forgejo_admin/notion-mcp-remoteUser Story
As a claude.ai user
I want a public Notion OAuth integration backing the proxy
So that I can complete Notion OAuth via the public URL and claude.ai obtains a per-user access token.
Context
The remote proxy does three-legged OAuth: claude.ai ↔ notion-mcp-remote ↔ Notion. The middle leg requires a Public Notion integration (distinct from the Internal integration-token flow used by the local stdio server). This yields
CLIENT_IDandCLIENT_SECRETvalues that feedNOTION_OAUTH_CLIENT_ID/NOTION_OAUTH_CLIENT_SECRETenv vars in the pod.Manual UI step — Notion's "Develop or manage integrations" page has no public API for integration creation. Redirect URI must match exactly what the running service advertises via its OAuth metadata endpoint.
File Targets
No repo file changes expected. This is credential provisioning. The captured values land in:
~/secrets/notion-mcp-remote/credentials.env— keysNOTION_OAUTH_CLIENT_ID,NOTION_OAUTH_CLIENT_SECRETnotion-mcp-remote(provisioned by a sibling issue)Files NOT to touch:
server.py,requirements.txt— already consume the env varsAcceptance Criteria
https://notion-mcp-remote.tail5b443a.ts.net/oauth/callbackNOTION_OAUTH_CLIENT_IDandNOTION_OAUTH_CLIENT_SECRETcaptured in~/secrets/notion-mcp-remote/credentials.envcurl -s "https://api.notion.com/v1/oauth/authorize?client_id=<id>&redirect_uri=https%3A%2F%2Fnotion-mcp-remote.tail5b443a.ts.net%2Foauth%2Fcallback&response_type=code&owner=user"returns the consent HTML, not an errorTest Expectations
Constraints
mcp-remote-authlibrary registers and validates/oauth/callback(seemcp_remote_auth/routes.py:41andprovider.py:125,151)/onboard/callbackas a secondary redirect URI on this same integration (avoids a second UI trip) or create a separate integrationChecklist
~/secrets/notion-mcp-remote/Related
project-notion-mcp-remotestory-notion-mcp-remote-claude-ai-connectarch-dataflow-notion-mcp-remote(OAuth handshake sequence)Scope Review: NEEDS_REFINEMENT
Review note:
review-1046-2026-04-21Scope is solid overall — template complete, traceability mostly intact, file targets verified against codebase — but two fixable issues block promotion to
todo.Blocking:
[BODY]Redirect URI path is wrong. Ticket specifies/callbackbut the service registers/oauth/callback(seemcp-remote-auth/src/mcp_remote_auth/routes.py:41,provider.py:125,provider.py:151). If Notion is configured with/callback, the token exchange will fail silently. Fix AC #3, the smoke curl URL in AC #5, and any Constraints references:https://notion-mcp-remote.tail5b443a.ts.net/callback→https://notion-mcp-remote.tail5b443a.ts.net/oauth/callback.[SCOPE]arch:notion-oauthlabel has no backing note.search_notes("arch-notion-oauth")returned no results; the OAuth handshake is actually documented inarch-dataflow-notion-mcp-remote. Either relabel the board item toarch:dataflow-notion-mcp-remote(lighter, preferred) or create a dedicatedarch-notion-oauthcomponent note.Optional (non-blocking):
[BODY]Also register/onboard/callbackif the same Public integration will back the onboarding flow (future story).[BODY]Correct the blocker references — per the board, this ticket unblocks #7 (secret provisioning) and #9 (E2E verify), not #5 / #8 as implied elsewhere.No decomposition needed (1 pt, 5 ACs, single UI flow).
Refinement applied per
review-1046-2026-04-21Issue body updated to resolve NEEDS_REFINEMENT verdict. Per consolidated-spec convention, the body is the single source of truth — this comment documents what changed and why.
Changes
Redirect URI path corrected:
/callback→/oauth/callbackredirect_uri=occurrences), and Constraints section.mcp-remote-authlibrary registers and validates/oauth/callbackatmcp_remote_auth/routes.py:41andprovider.py:125,151. The prior/callbackpath would have failed Notion's exact-match redirect check at runtime.Constraints: added library citation for the redirect path requirement so the dev executing the UI step can verify without tracing through the code.
Constraints: added follow-up note flagging the
/onboard/callbackdecision for when the onboarding flow story lands. Opted for the flag (reviewer's "if uncertain" option) rather than pre-registering a second redirect URI, since no onboarding story exists in pal-e-docs yet and expanding scope without explicit direction isn't warranted.Not changed
arch-dataflow-notion-mcp-remote; no stalearch-notion-oauthreference existed in the body.Ready for re-review.