Add mcp application type for MCP client applications - #4399
Conversation
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (23)
📝 WalkthroughWalkthroughMCP is added as a supported application type across API schemas, backend validation and flow behavior, Console models and controls, application templates, tests, error metadata, and user documentation. ChangesMCP application type support
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant ApplicationCreatePage
participant ApplicationService
participant FlowExecService
ApplicationCreatePage->>ApplicationService: submit application with type mcp
ApplicationService->>ApplicationService: validate MCP application fields
ApplicationService->>FlowExecService: resolve MCP flow initiation mode
FlowExecService->>ApplicationCreatePage: return Flow Secret or initiation mode
Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
docs/content/guides/applications/manage-applications.mdx (1)
33-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winComplete the MCP Client description.
“May be a public or confidential client” is a sentence fragment. Use a complete sentence in the table cell.
-| **MCP Client** | For AI applications that connect to MCP servers using the Model Context Protocol. May be a public or confidential client depending on its OAuth 2.0 configuration. | Depends on configuration | +| **MCP Client** | For AI applications that connect to MCP servers using the Model Context Protocol. The client can be public or confidential, depending on its OAuth 2.0 configuration. | Depends on configuration |🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/content/guides/applications/manage-applications.mdx` at line 33, Update the MCP Client table entry to express the public-or-confidential client statement as a complete sentence, while preserving its existing meaning and the surrounding OAuth 2.0 configuration context.Source: Linters/SAST tools
backend/internal/application/application_type_test.go (1)
119-121: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the test name and eligibility comment aligned.
The test now covers MCP and also asserts eligibility when OAuth configuration is absent, but
TestFullStackAndCustomFlowSecretEligibilityand the comment describe only the previous cases. Rename the test and mention both eligible paths.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/internal/application/application_type_test.go` around lines 119 - 121, Rename TestFullStackAndCustomFlowSecretEligibility to reflect coverage of MCP and OAuth-absent eligibility, and update the adjacent comment to document both eligible paths: confidential non-redirect embedded clients and applications without OAuth configuration.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/content/guides/applications/application-settings.mdx`:
- Line 69: Update the OAuth 2.0/OIDC application-type descriptions at both
referenced locations to include Custom App alongside the existing application
types. Ensure both lists consistently indicate that Custom App follows the
documented token and client-secret configuration behavior.
In `@docs/content/key-concepts/authentication/integration-models.mdx`:
- Line 65: Update the authentication model description for Full-stack, Custom,
and MCP Client applications to state that Flow Secrets require a confidential,
non-redirect OAuth client. Explicitly distinguish flow-capable grant
combinations such as token exchange from an application using only
client_credentials, and avoid implying that every confidential client without
authorization_code can initiate the flow directly.
In
`@frontend/apps/console/src/features/applications/components/edit-application/general-settings/EditGeneralSettings.tsx`:
- Around line 121-129: The Flow Secret eligibility predicates incorrectly
classify client-credentials-only MCP configurations as flow-native. Update
isFlowNativeClient in
frontend/apps/console/src/features/applications/components/edit-application/general-settings/EditGeneralSettings.tsx
lines 121-129 and the corresponding predicate in
frontend/apps/console/src/features/applications/components/edit-application/mcp/McpConnectTab.tsx
lines 137-143 to use the backend’s confidential-client eligibility rule,
excluding m2m-shaped MCP configurations from regeneration controls.
---
Nitpick comments:
In `@backend/internal/application/application_type_test.go`:
- Around line 119-121: Rename TestFullStackAndCustomFlowSecretEligibility to
reflect coverage of MCP and OAuth-absent eligibility, and update the adjacent
comment to document both eligible paths: confidential non-redirect embedded
clients and applications without OAuth configuration.
In `@docs/content/guides/applications/manage-applications.mdx`:
- Line 33: Update the MCP Client table entry to express the
public-or-confidential client statement as a complete sentence, while preserving
its existing meaning and the surrounding OAuth 2.0 configuration context.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 5b339e90-f0b3-44bf-b24f-4570fa1fd68a
📒 Files selected for processing (22)
api/application.yamlbackend/internal/application/application_type_test.gobackend/internal/application/error_constants.gobackend/internal/application/model/application.gobackend/internal/application/model/constants.gobackend/internal/application/model/utils.gobackend/internal/application/service.gobackend/internal/flow/flowexec/service.gobackend/internal/flow/flowexec/service_test.gobackend/internal/system/i18n/core/defaults.gobackend/pkg/thunderidengine/providers/model.godocs/content/guides/applications/application-settings.mdxdocs/content/guides/applications/manage-applications.mdxdocs/content/key-concepts/authentication/integration-models.mdxfrontend/apps/console/src/features/applications/components/edit-application/general-settings/EditGeneralSettings.tsxfrontend/apps/console/src/features/applications/components/edit-application/general-settings/__tests__/EditGeneralSettings.test.tsxfrontend/apps/console/src/features/applications/components/edit-application/mcp/McpConnectTab.tsxfrontend/apps/console/src/features/applications/data/application-templates/technology-based/mcp-client.jsonfrontend/apps/console/src/features/applications/models/application.tsfrontend/apps/console/src/features/applications/pages/__tests__/ApplicationCreatePage.test.tsxfrontend/apps/console/src/features/applications/utils/__tests__/resolveApplicationType.test.tsfrontend/apps/console/src/features/applications/utils/resolveApplicationType.ts
357ff34 to
218f7c3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Purpose
Followup to #4321. The
mcp-clientConsole template was mapped to thebrowserapplication type, which forces a public, PKCE-only client. As noted in review, MCP client hosts like VS Code and Claude Code can also be confidential clients, so pinning them tobrowserwas too restrictive.This PR adds a dedicated
mcpapplication type so MCP client applications can be public or confidential based on their own OAuth 2.0 configuration.Approach
mcpas a new canonical application type, alongsidebrowser,fullstack,mobile,m2m, andcustom.mcpapplications derive Flow Secret eligibility and flow-initiation mode from their OAuth 2.0 configuration, the same wayfullstack/customapps already do.mcp-clientConsole template to usemcpinstead ofbrowser.The Digital Wallet template mapping raised in the same issue is intentionally left as
mobileand is not part of this PR.Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks
Summary by CodeRabbit
New Features
Documentation
Bug Fixes