Skip to content

Interface: McpIntegrationStrategy

Makaio Framework


Makaio Framework / ai-adapters-core / McpIntegrationStrategy

Defined in: ../../../adapters/core/src/types/mcp-integration.ts:31

Adapter-specific MCP consumption strategy.

Each adapter that supports MCP implements this interface to declare how it consumes MCP tools. Defined in adapter-core to avoid circular dependencies (McpService imports this interface, adapters implement it).

readonly mode: "native-passthrough" | "tool-injection" | "observe-only"

Defined in: ../../../adapters/core/src/types/mcp-integration.ts:33

What this adapter needs from McpService


readonly supportsMidSessionToolChange: boolean

Defined in: ../../../adapters/core/src/types/mcp-integration.ts:39

Whether this adapter supports mid-session tool list changes. If false, deferred injection is used (bridge current turn, native next turn).

optional onToolsChanged(changes): Promise<void>

Defined in: ../../../adapters/core/src/types/mcp-integration.ts:53

Called when MCP tools change mid-session (server reconnect, dynamic enable). Only invoked if supportsMidSessionToolChange is true.

McpToolChange

Description of what tools changed

Promise<void>


prepareMcpForSession(context): Promise<McpSessionResources>

Defined in: ../../../adapters/core/src/types/mcp-integration.ts:46

Called when a session starts. Returns adapter-specific resources.

Resolved MCP config for this session (post-visibility-chain)

object[] = ...

Tools resolved as direct-inject for this session

object[] = ...

Tools available for discovery in this session

string | null = ...

Profile identifier (null for default)

string | null = ...

Project identifier (null for global)

object[] = ...

Servers enabled for this session (post-project-filter)

string = ...

Session identifier

Promise<McpSessionResources>

Resources the adapter needs to consume MCP tools