Skip to content

Hotfix/bhavya mcpconsumption#8917

Closed
Bhavd13 wants to merge 10 commits intomainfrom
hotfix/bhavya-mcpconsumption
Closed

Hotfix/bhavya mcpconsumption#8917
Bhavd13 wants to merge 10 commits intomainfrom
hotfix/bhavya-mcpconsumption

Conversation

@Bhavd13
Copy link
Contributor

@Bhavd13 Bhavd13 commented Mar 13, 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

Impact of Change

  • Users:
  • Developers:
  • System:

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 March 13, 2026 17:24
@github-actions
Copy link

🤖 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: Hotfix/bhavya mcpconsumption
  • Issue: The title is terse and does not clearly describe what the changes do. It contains a personal name and a branch-style format rather than a concise, descriptive title. PR titles should describe the user-visible or system change so reviewers and release notes can understand the intent at a glance.
  • Recommendation: Use a descriptive title that summarizes the change and the affected area. Example: Hotfix: Add MCP client consumption support (built-in and managed MCP connections, manifests, and tests)

Commit Type

  • Commit type is not selected in the PR body.
  • Only one should be selected. Based on the diff (adds feature support + tests and some UI tweaks), recommended selection: - [ ] fix if this is a hotfix addressing a bug, or - [ ] feature if this introduces a new capability. Pick only one. If this truly is a hotfix, choose fix.

Risk Level

  • Assessment: No risk level was selected and there is no risk label on the PR.
  • Recommendation: The code changes introduce new connector manifests, connection service logic, and UI behavior for MCP (both built-in and managed), and add many unit tests. This touches connection handling and runtime behavior and is best classified as risk:medium. Please add the GitHub label risk:medium to the PR and check the corresponding box in the PR body.

What & Why

  • Current: (Missing)
  • Issue: The PR body does not explain what the change is and why it was made. The diff shows new MCP client manifests, new handling in ConsumptionConnectionService and ConsumptionConnectorService, UI toggles for mcpClientToolEnabled, and multiple unit tests. Reviewers need a succinct statement of intent.
  • Recommendation: Add a brief summary, e.g.: What: Add support for MCP client consumption including built-in and managed MCP connections, MCP operation manifest and connector, UI toggle to enable MCP client tooling, and unit tests. Why: Enable workflows to call MCP tools via built-in and managed connections and ensure test coverage.

Impact of Change

  • Issue: Impact section is empty. This is required to help reviewers and release owners understand who and what will be affected.
  • Recommendation: Populate like:
    • Users: Enables MCP client tool operations in consumption SKU; may change connection UX (name input hidden for certain MCP built-in connections).
    • Developers: Adds new ConsumptionConnectionService flows (createBuiltInMcpConnection/createManagedMcpConnection), modifies connector/operation manifest resolution, and adds new connector/manifest files — developers should review connector shapes and API contract assumptions.
    • System: Adds new manifests and connection shapes; potential runtime impact for connection creation and dynamic list calls; monitor related telemetry and e2e scenarios.

Test Plan

  • Assessment: The PR body does not mark any test boxes, but the diff includes multiple unit tests.
  • Issue: There's a mismatch: unit tests were added in the diff but the PR body did not indicate Unit tests were added/updated.
  • Recommendation: Update the Test Plan section to tick - [x] Unit tests added/updated and include where and how tested. Example detail: Unit tests added for ConsumptionConnectionService, ConsumptionConnectorService, and ConsumptionOperationManifestService. Files: libs/logic-apps-shared/src/designer-client-services/lib/consumption/__tests__/connection.spec.ts, connector.spec.ts, operationmanifest.spec.ts. Ran via vitest locally.

⚠️ Contributors

  • Assessment: Blank. Not required, but recommended to credit reviewers/PM/Designers.
  • Recommendation: Add any contributors (PMs, Designers, reviewers) to this section.

⚠️ Screenshots/Videos

  • Assessment: Not applicable (no visual changes required). Optional to include if the UI was modified in a way that affects screenshots.
  • Recommendation: If there are UX changes (e.g., hiding name input for MCP built-in connections), consider adding a small screenshot or note describing the UX effect.

Summary Table

Section Status Recommendation
Title ⚠️ Use a descriptive title, e.g. Hotfix: Add MCP client consumption support (built-in and managed MCP connections, manifests, and tests)
Commit Type Select a commit type (likely fix for hotfix or feature)
Risk Level Add risk:medium label and select Medium in the PR body
What & Why Add a concise "What & Why" summarizing the changes and purpose
Impact of Change Explain Users/Developers/System impacts (see recommendations)
Test Plan Mark Unit tests added/updated and describe how tested; point to new test files in diff
Contributors ⚠️ Optionally add contributors' names/handles
Screenshots/Videos ⚠️ Not necessary unless UX changed significantly; add if applicable

Summary / Next steps

  • This PR does NOT pass the PR title/body checklist because required metadata (commit type, risk level, What & Why, Impact, Test Plan) are missing or inconsistent with the code changes.
  • Advised risk level (based on the diff touching connection management, manifests, UI, and adding new behavior) is risk:medium. The PR did not specify any risk — please add the risk:medium label. If you believe the change is lower risk, provide justification in the PR body; otherwise use risk:medium.
  • Test plan mismatch: The code includes unit tests (see new files in the diff: libs/logic-apps-shared/src/designer-client-services/lib/consumption/tests/connection.spec.ts, connector.spec.ts, operationmanifest.spec.ts). Update the Test Plan to mark unit tests and explain how they were executed.

Please update the PR title and body per the recommendations above and re-submit. Thank you for helping maintain high-quality PR metadata — this speeds up reviews and release coordination.


Last updated: Fri, 13 Mar 2026 17:25:47 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

Adds Consumption-SKU support for the native MCP Client Tool by wiring up a built-in MCP connector + operation manifest, plus client-side connection creation and dynamic tool listing (listMcpTools) so the designer can enumerate MCP tools.

Changes:

  • Register MCP Client Tool (McpClientToolconnectionProviders/mcpclient + nativemcpclient) in the Consumption operation manifest service and add the built-in operation manifest.
  • Add Consumption connector/connection service support for MCP tool discovery, including request payload shaping for built-in vs managed connections.
  • Update connection creation UI behavior (hide name input for MCP in Consumption) and add unit tests covering the new behavior.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
libs/logic-apps-shared/src/designer-client-services/lib/consumption/operationmanifest.ts Routes MCP Client Tool operations to the built-in MCP manifest and registers the MCP connector as built-in.
libs/logic-apps-shared/src/designer-client-services/lib/consumption/manifests/mcpclientconnector.ts Adds the Consumption MCP connector definition (connection parameter sets, icon, etc.).
libs/logic-apps-shared/src/designer-client-services/lib/consumption/manifests/builtinmcpclient.ts Adds the built-in MCP operation manifest (including dynamic list definition for tools).
libs/logic-apps-shared/src/designer-client-services/lib/consumption/connector.ts Implements listMcpTools dynamic list behavior for Consumption (built-in vs managed payload shapes).
libs/logic-apps-shared/src/designer-client-services/lib/consumption/connection.ts Adds Consumption MCP connection creation logic (built-in in-memory connection + managed connection creation).
libs/logic-apps-shared/src/designer-client-services/lib/consumption/tests/operationmanifest.spec.ts Tests for MCP Client Tool operation info, support checks, and manifest retrieval.
libs/logic-apps-shared/src/designer-client-services/lib/consumption/tests/connector.spec.ts Tests for MCP listMcpTools payload shaping and response mapping.
libs/logic-apps-shared/src/designer-client-services/lib/consumption/tests/connection.spec.ts Tests for built-in MCP connection creation and auth parameter extraction helpers.
libs/designer/src/lib/ui/panel/connectionsPanel/createConnection/createConnection.tsx Hides name input for MCP connections in Consumption based on the active connection service implementation.
libs/designer-v2/src/lib/ui/panel/connectionsPanel/createConnection/createConnection.tsx Same MCP/Consumption name-input behavior for designer-v2.
apps/Standalone/src/designer/app/AzureLogicAppsDesigner/laDesignerConsumption.tsx Enables the MCP Client Tool flag in the Standalone Consumption designer host options.

Comment on lines +130 to +166
it('should include authentication for ApiKey auth type', async () => {
InitConnectionService({
getConnection: vi.fn().mockResolvedValue({
id: builtInConnectionId,
name: 'test-mcp',
properties: {
displayName: 'Test MCP Server',
parameterValues: {
mcpServerUrl: 'https://mcp.example.com',
authenticationType: 'ApiKey',
key: 'test-api-key',
keyHeaderName: 'X-Api-Key',
},
},
} as unknown as Connection),
} as any);

vi.mocked(mockHttpClient.post).mockResolvedValue(mockMcpToolsResponse);

await connectorService.getListDynamicValues(
builtInConnectionId,
'/connectionProviders/mcpclient',
'nativemcpclient',
{},
mcpDynamicState
);

const postCallArgs = vi.mocked(mockHttpClient.post).mock.calls[0][0];
const content = postCallArgs.content as any;

expect(content.connection.authentication).toEqual({
type: 'ApiKey',
value: 'test-api-key',
name: 'X-Api-Key',
in: 'header',
});
});
Comment on lines +230 to +253
private _buildMcpAuthentication(connectionProperties: Record<string, any>): Record<string, any> | undefined {
const authType = connectionProperties['authenticationType'];
if (!authType || authType === 'None') {
return undefined;
}

const authentication: Record<string, any> = { type: authType };
if (authType === 'ApiKey') {
authentication['value'] = connectionProperties['key'];
authentication['name'] = connectionProperties['keyHeaderName'];
authentication['in'] = 'header';
} else if (authType === 'Basic') {
authentication['username'] = connectionProperties['username'];
authentication['password'] = connectionProperties['password'];
} else if (authType === 'ActiveDirectoryOAuth') {
authentication['tenant'] = connectionProperties['tenant'];
authentication['clientId'] = connectionProperties['clientId'];
authentication['secret'] = connectionProperties['secret'];
authentication['authority'] = connectionProperties['authority'];
authentication['audience'] = connectionProperties['audience'];
} else if (authType === 'ClientCertificate') {
authentication['pfx'] = connectionProperties['pfx'];
authentication['password'] = connectionProperties['password'];
}
Comment on lines +81 to +85
const connection = await ConnectionService().getConnection(connectionId);
const connectionProperties = (connection?.properties as any)?.parameterValues ?? {};
const isBuiltInConnection = connectionId?.includes('connectionProviders/mcpclient');

if (isBuiltInConnection) {
Comment on lines +274 to +312
{
name: 'Key',
parameters: {
serverUrl: {
type: 'string',
uiDefinition: {
displayName: 'Server URL',
constraints: {
required: 'true',
},
description: 'Server URL',
},
},
key: {
type: 'securestring',
uiDefinition: {
displayName: 'Key',
constraints: {
required: 'true',
propertyPath: ['authentication'],
},
description: 'Key',
},
},
keyHeaderName: {
type: 'string',
uiDefinition: {
displayName: 'Key Header Name',
constraints: {
propertyPath: ['authentication'],
},
description: 'Key header name',
},
},
},
uiDefinition: {
displayName: 'Key',
},
},
'tenant',
'authority',
'audience',
'pfx',
Comment on lines +72 to +92
const connectionInfo: ConnectionCreationInfo = {
displayName: 'test-mcp-connection',
connectionParameters: {
serverUrl: { value: 'https://mcp-server.example.com' },
},
connectionParametersSet: {
name: 'ApiKey',
values: {
key: { value: 'test-api-key' },
},
},
};

const result = await service.createConnection('test-connection-id', connector as Connector, connectionInfo);

expect(result).toBeDefined();
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');
});
@github-actions
Copy link

📊 Coverage Check

The following changed files need attention:

⚠️ libs/logic-apps-shared/src/designer-client-services/lib/consumption/connection.ts - 42% covered (needs improvement)
⚠️ libs/logic-apps-shared/src/designer-client-services/lib/consumption/connector.ts - 66% covered (needs improvement)
⚠️ libs/logic-apps-shared/src/designer-client-services/lib/consumption/operationmanifest.ts - 76% covered (needs improvement)
⚠️ libs/designer-v2/src/lib/ui/panel/connectionsPanel/createConnection/createConnection.tsx - 69% covered (needs improvement)
⚠️ libs/designer/src/lib/ui/panel/connectionsPanel/createConnection/createConnection.tsx - 69% covered (needs improvement)

Please add tests for the uncovered files before merging.

@Bhavd13 Bhavd13 closed this Mar 14, 2026
@Bhavd13 Bhavd13 deleted the hotfix/bhavya-mcpconsumption branch March 14, 2026 09:38
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