Skip to content

MCP Support for Consumption #8788

Open
Bhavd13 wants to merge 3 commits intoAzure:mainfrom
Bhavd13:mcp
Open

MCP Support for Consumption #8788
Bhavd13 wants to merge 3 commits intoAzure:mainfrom
Bhavd13:mcp

Conversation

@Bhavd13
Copy link
Contributor

@Bhavd13 Bhavd13 commented Feb 4, 2026

Commit Type

  • feature - New functionality
  • fix - Bug fix
  • refactor - Code restructuring without behavior change
  • perf - Performance improvement
  • docs - Documentation update
  • test - Test-related changes
  • chore - Maintenance/tooling

Risk Level

  • Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

What & Why

This PR implements MCP (Model Context Protocol) connection support for Consumption Logic Apps. Most of the MCP implementation code was already common for managed connectors, shared between Standard and Consumption. For built-in MCP connections in Consumption, I removed the connection panel settings dependency and created a dedicated createBuiltInMcpConnection() method in ConsumptionConnectionService that generates local connection objects stored in workflow.json instead of API Hub. I also created a Consumption-specific MCP connector mcpclientconnector.ts with the builtin capability to differentiate it from managed connectors.

Impact of Change

  • Users: Consumption Logic Apps users can now add MCP servers (both built-in "Add your own" and Microsoft-managed) to their workflows.
  • Developers: New method and helper functions available in ConsumptionConnectionService for handling built-in MCP connections.
  • System: None

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in:

Contributors

Screenshots/Videos

Copilot AI review requested due to automatic review settings February 4, 2026 12:01
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

⚠️ PR Title

  • Current: MCP Support for Consumption
  • Issue: The title is vague and has a trailing space. It doesn't clearly describe the scope (what was changed and where). For reviewers and changelogs it's best to be explicit about the subsystem and the nature of the change.
  • Recommendation: Use a concise, descriptive title such as: Add MCP connection support for Consumption Logic Apps (built-in and managed) or Enable MCP client connections for Consumption SKU.

Commit Type

  • Properly selected (feature)
  • Only one commit type is selected in the PR body which is correct.

Risk Level

  • Assessment: The PR body marks the Risk Level as Low, but the repository labels do not contain a corresponding risk:low label and the changes touch core connection services, add a new connector manifest, add new connection creation code paths for built-in vs managed MCP connections, and modify UI behavior.
  • Recommendation: Update the PR to include a risk label that matches the body. Based on the changes in the diff (new service logic, new connector manifest, UI change, and new tests) the advised risk level is Medium. Please either:
    • Update the PR body to justify why this is truly Low (with detailed mitigations, testing coverage, and rollout strategy), and add the risk:low label; or
    • Change the Risk Level selection in the PR body to Medium and add the risk:medium label to the PR.

What & Why

  • Current: This PR implements MCP connection support for Consumption Logic Apps and describes the main approach (createBuiltInMcpConnection, mcpclientconnector, changes to avoid API Hub storage for built-ins).
  • Issue: None critical — the explanation is present and helpful. Consider adding a short list of the concrete files modified (or the core behavioral change lines) so reviewers can quickly correlate description to diff.
  • Recommendation: You could add a one-line summary of key files changed, e.g. libs/logic-apps-shared/.../consumption/connection.ts, manifests/mcpclientconnector.ts, and the new unit tests path to make it easier to cross-check.

⚠️ Impact of Change

  • Issue: The PR currently lists System: None. That understates impact: the PR introduces a new connector manifest, new connection creation flows (built-in vs managed), and UI logic that hides the name input for specific connector + SKU combinations. Those could have system-wide consequences (configuration stored in workflow.json vs API Hub, naming/ID generation, authentication parameter handling, telemetry/logging).
  • Recommendation:
    • Users: Add: "Consumption Logic Apps users can create built-in MCP connections whose connection data is stored locally in workflow.json (not API Hub) — behavior differs from managed connectors." Include any migration/compatibility notes if relevant.
    • Developers: Add: "New helper functions (extractParameterValue, extractAuthParameters), new creation flows createBuiltInMcpConnection/createManagedMcpConnection, and a mcpclient connector manifest. Consumers of ConnectionService should be aware of new constructor name check used in UI code."
    • System: Add: "Potential changes to storage and auth handling (built-in stored locally). Ensure API Hub expectations and downstream consumers are compatible; possible impacts to telemetry/tracing and connection status values. Consider any RBAC / security considerations for local storage of credentials and how secrets are represented (securestring vs plain)."

Test Plan

  • Assessment: The PR claims unit tests added and the diff includes a new test file at libs/logic-apps-shared/src/designer-client-services/lib/consumption/__tests__/connection.spec.ts. Good.
  • Recommendation: Ensure these unit tests run and pass in CI; add a brief note in the PR either linking to a passing CI run or confirming the tests were executed locally. For this type of change (connections + UI), consider adding at least one manual test checklist or an E2E test verifying that creating a built-in MCP connection results in expected workflow.json output and that a managed connection uses API Hub.

⚠️ Contributors

  • Assessment: No contributors listed in the PR body.
  • Recommendation: Add any teammates who contributed (PMs, Designers, Engineers, Reviewers) so they receive credit and context. If there are no other contributors, add a short note stating so.

⚠️ Screenshots/Videos

  • Assessment: No screenshots provided. The change affects the connection panel UI (hides name input for built-in MCP on Consumption SKU). Visual verification can help reviewers.
  • Recommendation: Add a screenshot or a short manual test checklist showing the connection panel before/after for Consumption + MCP client (to validate UI change), OR provide explicit manual testing steps that were executed.

Summary Table

Section Status Recommendation
Title ⚠️ Make it explicit and remove trailing space. Example: Add MCP connection support for Consumption Logic Apps (built-in and managed)
Commit Type No action needed
Risk Level Update PR label to match body and consider setting to Medium (recommended). Provide justification if keeping Low.
What & Why Add file list / short mapping to diff for faster review.
Impact of Change ⚠️ Expand "System" section to reflect storage/auth/telemetry impacts; mention any security considerations.
Test Plan Link to CI run or confirm tests pass; consider adding manual/E2E tests for UI and storage behaviors.
Contributors ⚠️ Add contributor list or note none.
Screenshots/Videos ⚠️ Provide screenshots or manual test steps for UI change.

Final notes:

  • Advised risk level: Medium (higher than the PR's selected Low). This is because the PR adds new connection behaviors (built-in vs managed), a new connector manifest, and alters UI behavior for connection creation — all of which can have broader impacts than a small/localized change.
  • Please update the PR with the following actionable items before re-requesting review:
    1. Update the PR title to be more descriptive and remove trailing whitespace.
    2. Update the Risk Level selection or provide a detailed justification to keep it at Low; add the appropriate repository label (risk:medium if you accept the advised level, or risk:low if justified).
    3. Expand the Impact of Change section to include system-level implications and any security considerations for storing connection data in workflow.json.
    4. Confirm that the newly added unit tests are passing in CI and link to the CI run, or include instructions for reproducing the successful test run.
    5. Add manual testing notes or E2E tests to validate the user flow (creating built-in MCP connection stores expected values in workflow.json, managed connection flows via API Hub, and UI hides/shows name input as intended).
    6. Add contributors (if any) and provide screenshots or manual test steps for the UI change.

Please update the PR with the requested changes and labels, then re-submit. Thanks for the thorough implementation and for adding unit tests — this is a solid start; with the requested clarifications and label corrections we can proceed to a full review.


Last updated: Fri, 06 Mar 2026 06:39:14 GMT

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds MCP (Model Context Protocol) connection support for Consumption Logic Apps by implementing built-in and managed MCP connection capabilities. The implementation reuses most existing MCP code for managed connectors, with Consumption-specific additions for built-in connections that store connection objects locally in workflow.json instead of API Hub.

Changes:

  • Added Consumption-specific MCP connector manifest (mcpclientconnector.ts) with builtin capability
  • Created createBuiltInMcpConnection() method in ConsumptionConnectionService for local connection storage
  • Added comprehensive unit tests for MCP connection creation and parameter extraction
  • Modified connection panel to hide name input for Consumption MCP connections

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
servers Subproject commit reference update
libs/logic-apps-shared/src/designer-client-services/lib/consumption/manifests/mcpclientconnector.ts Defines the MCP Client connector manifest with authentication types and parameter sets
libs/logic-apps-shared/src/designer-client-services/lib/consumption/connection.ts Implements built-in and managed MCP connection creation logic with parameter extraction
libs/logic-apps-shared/src/designer-client-services/lib/consumption/tests/connection.spec.ts Adds comprehensive unit tests for MCP connection functionality
libs/designer-v2/src/lib/ui/panel/connectionsPanel/createConnection/createConnection.tsx Hides name input for Consumption MCP connections in the UI

},
},
uiDefinition: {
displayName: 'Basic',
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The authentication type name 'Basic' should match the parameter set name defined on line 41. Currently the parameter set uses 'Basic' as the name, but this should be 'BasicAuth' for consistency with the extractAuthParameters method which checks for 'BasicAuth' in connection.ts line 239.

Copilot uses AI. Check for mistakes.

if (connectionParametersSet?.values) {
const values = connectionParametersSet.values;
const authKeys = ['username', 'password', 'key', 'keyHeaderName', 'clientId', 'secret', 'tenant', 'authority', 'audience', 'pfx'];
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The hardcoded list of authentication keys should be defined as a constant at the class or module level to improve maintainability and allow reuse. Consider extracting this to a private static readonly property or a module-level constant.

Copilot uses AI. Check for mistakes.
});

try {
const connectionName = connectionInfo.displayName || connectionId.split('/').at(-1) || `mcp-${Date.now()}`;
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The fallback connection name generation using Date.now() could produce non-unique names if multiple connections are created in rapid succession. Consider using a more robust unique identifier generation approach, such as a UUID or a combination of timestamp with a random component.

Suggested change
const connectionName = connectionInfo.displayName || connectionId.split('/').at(-1) || `mcp-${Date.now()}`;
const fallbackSuffix = `${Date.now()}-${Math.random().toString(16).slice(2)}`;
const connectionName = connectionInfo.displayName || connectionId.split('/').at(-1) || `mcp-${fallbackSuffix}`;

Copilot uses AI. Check for mistakes.
expect(result.name).toBe('test-mcp-connection');
expect(result.id).toContain('connectionProviders/mcpclient/connections/');
expect((result.properties as any).parameterValues.mcpServerUrl).toBe('https://mcp-server.example.com');
expect((result.properties as any).parameterValues.authenticationType).toBe('ApiKey');
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The test expects authenticationType to be 'ApiKey' but the connection info specifies 'ApiKey' on line 78. However, the connector manifest defines 'Key' as the authentication type name (line 275). This inconsistency should be resolved to match the actual authentication type names defined in the manifest.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants