TypeError: buildAuthHeaders is not a function when using MCP tools in AI piece (local development))

When attempting to use MCP tools in the AI piece, the application fails with TypeError: buildAuthHeaders is not a function. The function buildAuthHeaders is defined in packages/shared/src/lib/agents/mcp.ts but is not properly exported through the module’s main index file, causing import failures at runtime.

Environmen
Activepieces Version: 0.77.6

Failed to connect to MCP server https://xxxx/mcp: TypeError: (0 , shared_1.buildAuthHeaders) is not a function
    at <anonymous> ({mypath}/cache/v7/common/node_modules/packages/pieces/community/ai/src/lib/actions/agents/tools.ts:79:29)
    at Generator.next (<anonymous>)
    at {mypath}/cache/v7/common/node_modules/.bun/[email protected]/node_modules/tslib/tslib.js:170:75
    at new Promise (<anonymous>)
    at Object.__awaiter ({mypath}/cache/v7/common/node_modules/.bun/[email protected]/node_modules/tslib/tslib.js:166:16)
    at constructMcpServersTools ({mypath}/cache/v7/common/node_modules/packages/pieces/community/ai/src/lib/actions/agents/tools.ts:69:26)

I not sure what is the issue , may be issue @activepieces/piece-ai from npm registery , Can anyone help here

Thank you!

Team any help here ?