OAuth sign-in for the MCP server, for the connector directories of AI assistants

Description

ESFJ-2554 made the Web API an MCP server at /webapi/v1/mcp. It accepts only API keys, which is enough for developer tools such as Claude Code, Cursor, VS Code, Codex and Gemini CLI. Listing the server for everyone in Claude or ChatGPT needs OAuth. So does signing in each user in the other assistants.

Where we want the connector:

  • Claude Connectors Directory and the ChatGPT app directory. Both want OAuth with DCR or CIMD, and ChatGPT can't send API keys at all.

  • Microsoft 365 Copilot via Copilot Studio, where an admin adds the server as an agent tool. Our API key works there already. OAuth with DCR and discovery adds per-user sign-in.

  • Gemini Enterprise. Custom MCP servers are still in preview there. An admin adds ours with an OAuth client we create for them, because Gemini has no DCR.

  • Mistral's Le Chat and Perplexity take a bearer API key or OAuth with DCR in their custom connectors.

  • Rovo uses Forge actions instead, in ESFJ-2557.

  1. Add OAuth 2.1 next to API keys on /webapi/v1/mcp, per the MCP authorization spec. Discovery starts from a 401 with resource_metadata. Clients register with DCR or CIMD, except Gemini, whose client we register by hand. PKCE S256 and token refresh are required. Redirect URIs to accept:

    • https://claude.ai/api/mcp/auth_callback, plus loopback on any port for Claude Code

    • https://chatgpt.com/connector_platform_oauth_redirect

    • https://www.perplexity.ai/rest/connections/oauth_callback

    • Gemini: vendor guides say https://vertexaisearch.cloud.google.com/oauth-redirect. TODO confirm in Google's docs.

  2. Users sign in with their Atlassian account and pick the Jira site. The consent screen lists their External Share permissions, computed the same way as in the UI (ForgePermissionsService: Jira admins get everything, others what their project permissions allow), and they can untick any of them. Permissions are checked again on every call, so a user who loses Jira admin loses the admin tools immediately.

  3. Log token calls under the user who made them.

  4. Users can see and revoke their connections.

  5. Submit to the Claude and ChatGPT directories: documentation and privacy policy pages, a test account for reviewers, and the providers' IP ranges allowed by our WAF. Anthropic's range is 160.79.104.0/21. Tool titles and read-only/destructive hints are already in ESFJ-2554.

Docs: Claude https://claude.com/docs/connectors/building/authentication and https://claude.com/docs/connectors/building/submission, ChatGPT https://developers.openai.com/apps-sdk/build/auth, Copilot Studio https://learn.microsoft.com/en-us/microsoft-copilot-studio/mcp-add-existing-server-to-agent, Le Chat https://docs.mistral.ai/le-chat/knowledge-integrations/connectors/mcp-connectors, Perplexity https://www.perplexity.ai/help-center/en/articles/13915507-adding-custom-remote-connectors

Child work items

Work Item Type Icon ESFJ-2623 Submit the MCP connector to the Claude and ChatGPT directories Priority: Lowest Assignee:
Backlog

Linked work items

relates to
Work Item Type Icon ESFJ-2554 Expose an MCP server Priority: High Assignee:
Released
is blocked by
Work Item Type Icon DOC-45 Update documentation Priority: Lowest Assignee:
To Do
Work Item Type Icon MKT-1436 Blog post Priority: Lowest Assignee:
Backlog