@@ -26,7 +26,6 @@ import {
2626 LogEntryLevel ,
2727 LoggerService ,
2828 OperationManifestService ,
29- ConnectionService ,
3029 WorkflowService ,
3130 getIntl ,
3231 create ,
@@ -167,15 +166,8 @@ export const serializeWorkflow = async (rootState: RootState, options?: Serializ
167166 }
168167
169168 const operation = getRecordEntry ( rootState . operations . operationInfo , nodeId ) ;
170- // DEBUG: Log MCP connection filtering
171- if ( referenceKey === 'mcpclient' || referenceKey ?. includes ( 'mcp' ) ) {
172- console . log (
173- `[MCP Debug] nodeId=${ nodeId } , referenceKey=${ referenceKey } , operation.type=${ operation ?. type } , operation.kind=${ operation ?. kind } , isBuiltIn=${ operation ? isBuiltInMcpOperation ( operation ) : 'no-op' } `
174- ) ;
175- }
176-
169+ // Built-in MCP operations don't use connection references; exclude them
177170 if ( operation && isBuiltInMcpOperation ( operation ) ) {
178- console . log ( `[MCP Filter] Skipping MCP connection: ${ referenceKey } ` ) ;
179171 return references ;
180172 }
181173
@@ -552,32 +544,9 @@ const serializeBuiltInMcpOperation = async (rootState: RootState, nodeId: string
552544
553545 const operationFromWorkflow = getRecordEntry ( rootState . workflow . operations , nodeId ) as LogicAppsV2 . OperationDefinition ;
554546
555- // Look up the connection to get MCP server URL and authentication type
556- const referenceKey = getRecordEntry ( rootState . connections . connectionsMapping , nodeId ) ;
557- const connectionReference = referenceKey ? getRecordEntry ( rootState . connections . connectionReferences , referenceKey ) : undefined ;
558- const connectionId = connectionReference ?. connection ?. id ;
559-
560- let mcpServerUrl = '' ;
561- let authenticationType = 'None' ;
562-
563- if ( connectionId ) {
564- try {
565- const connection = await ConnectionService ( ) . getConnection ( connectionId ) ;
566- const parameterValues = ( connection ?. properties as any ) ?. parameterValues ;
567- if ( parameterValues ) {
568- mcpServerUrl = parameterValues . mcpServerUrl ?? '' ;
569- authenticationType = parameterValues . authenticationType ?? 'None' ;
570- }
571- } catch {
572- // Fall back to empty values if connection lookup fails
573- }
574- }
575-
547+ // Built-in MCP operations: MCP server URL and authentication are passed as parameters.
548+ // No pseudo-connection is needed; backend handles implicit MCP connection.
576549 const inputs = {
577- Connection : {
578- McpServerUrl : mcpServerUrl ,
579- Authentication : authenticationType ,
580- } ,
581550 parameters : {
582551 ...inputParameters . parameters ,
583552 } ,
0 commit comments