Skip to content

MCP Support for Consumption #8788

Open
Bhavd13 wants to merge 1 commit intoAzure:mainfrom
Bhavd13:mcp
Open

MCP Support for Consumption #8788
Bhavd13 wants to merge 1 commit 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: Title has a trailing space and is a bit too generic. It doesn't clearly indicate scope (Logic Apps Consumption) and key change (built-in MCP vs managed MCP, new manifest, new service method). A high-quality title should be concise but descriptive.
  • Recommendation: Use a clear, specific title. Example: Add MCP (mcpclient) support for Consumption Logic Apps (createBuiltInMcpConnection + manifest)

Commit Type

  • Properly selected (feature)
  • Only one commit type is selected which is correct.

Risk Level

  • Assessment: The PR body marks this as Low, but the repository labels do NOT include a risk label (I only see needs-pr-update). The code changes add new connection flows (built-in vs managed MCP), a new manifest, a new public method path in the ConsumptionConnectionService, and a UI change to CreateConnection logic. These are behavioral changes touching connection creation, manifests, and UI — this is more than a trivial change and can impact runtime behavior and user workflows.
  • Recommendation: Update the PR risk selection to Medium and add the corresponding repository label (e.g., risk:medium). If you believe the change is truly Low, include a detailed justification addressing why the added paths/manifest/creation logic and UI change cannot affect existing users (e.g., backwards-compatible defaults, feature flags, or strong unit/e2e coverage proving no regression).

What & Why

  • Current: This PR implements MCP connection support for Consumption Logic Apps, removes connection panel settings dependency for built-in MCP connections, adds createBuiltInMcpConnection() to ConsumptionConnectionService, and creates a Consumption-specific mcpclient connector manifest.
  • Issue: The description is generally good, but could call out the specific files changed and summarize behavioral impact (i.e., where built-in connections are stored vs API Hub, and UI behavior change hiding the name input for built-in MCP connections in Consumption).
  • Recommendation: Add a one-line summary of modified files and high-level behavioral change (e.g., "Creates mcpclient manifest, adds createBuiltInMcpConnection/createManagedMcpConnection flows in ConsumptionConnectionService, and updates CreateConnection UI to hide name input for built-in MCP in Consumption SKU").

⚠️ Impact of Change

  • The PR lists Users, Developers, System; good structure.
  • Issue: The System section says "None" but the change introduces a new manifest and new connection storage semantics for built-in MCP connections (stored in workflow.json). That could be considered a system/architecture impact.
  • Recommendation: Flesh out the System entry briefly:
    • Users: Consumption Logic Apps users can add MCP servers (both built-in and Microsoft-managed). (Keep as-is.)
    • Developers: Mention new public methods added (createBuiltInMcpConnection, createManagedMcpConnection), and the new manifest file path (libs/logic-apps-shared/.../manifests/mcpclientconnector.ts).
    • System: Note change in storage surface (local workflow.json vs API Hub for built-in vs managed) and any implications (migration, backwards compatibility, or telemetry).

Test Plan

  • Assessment: PR claims "Unit tests added/updated" and the diff contains a new unit test file: libs/logic-apps-shared/src/designer-client-services/lib/consumption/tests/connection.spec.ts — this validates many new code paths (createBuiltInMcpConnection, extractParameterValue, extractAuthParameters, getConnector).
  • Issue / Recommendation: Good that unit tests were added. Please consider adding or documenting E2E or integration tests validating the full create flow for managed MCP (createManagedMcpConnection) including createConnectionInApiHub behavior, or explain why E2E is not required (e.g., environment dependencies or separate integration test plans). Also ensure tests cover error cases and the UI change that hides the name input (unit or component tests for CreateConnection) if applicable.

⚠️ Contributors

  • Assessment: The Contributors section in the PR body is empty.
  • Recommendation: If others contributed (PM, designer, other devs, reviewers), add them. If not, add a short note: "No additional contributors". It's not required to block, but it's good practice.

Screenshots/Videos

  • Assessment: Not applicable for a backend/manifest feature. No screenshots required.

Summary Table

Section Status Recommendation
Title ⚠️ Make title specific and remove trailing space. Example provided above.
Commit Type None required.
Risk Level Change PR checkbox to Medium and add label risk:medium, or justify Low with details.
What & Why Add brief file list and exact behavioral summary.
Impact of Change ⚠️ Expand System section to mention storage/architecture impact.
Test Plan Unit tests present; consider integration/E2E for createManagedMcpConnection or justify absence.
Contributors ⚠️ Add contributor credits or state none.
Screenshots/Videos None needed.

Final notes

  • Overall: The PR content is promising and you added unit tests which is excellent. However, because this change adds new connection creation flows, a manifest, and UI logic changes, I recommend labeling this as Medium risk rather than Low and adding the repo label risk:medium.

Action items for you to update the PR before re-submission:

  1. Update the PR title to a clearer form (example: Add MCP (mcpclient) support for Consumption Logic Apps (createBuiltInMcpConnection + manifest)).
  2. Update the Risk Level checkboxes to select Medium and add the repository label risk:medium. If you want to keep Low, add a short justification in the PR body explaining why the behavioral impact is minimal and why regression risk is low.
  3. In "What & Why", add a one-line summary of changed files (e.g., ConsumptionConnectionService, createConnection UI, new manifest file path, new unit tests) and clarify what is stored in workflow.json vs API Hub.
  4. Expand the "System" slice under Impact of Change to call out storage/architecture implications and any migration or compatibility considerations.
  5. Add contributor credits or explicitly say none.
  6. Consider adding E2E/integration tests for the managed MCP flow (createManagedMcpConnection) or add a note explaining why E2E is not included and how this will be validated.

Please update the PR with the above items and add the risk:medium label (or justify Low) — once updated I can re-run the check. Thank you for the thorough work and tests added so far!


Last updated: Wed, 04 Feb 2026 12:03:49 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.

1 participant