Interface: McpIntegrationStrategy
Makaio Framework / ai-adapters-core / McpIntegrationStrategy
Interface: McpIntegrationStrategy
Section titled “Interface: 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).
Properties
Section titled “Properties”
readonlymode:"native-passthrough"|"tool-injection"|"observe-only"
Defined in: ../../../adapters/core/src/types/mcp-integration.ts:33
What this adapter needs from McpService
supportsMidSessionToolChange
Section titled “supportsMidSessionToolChange”
readonlysupportsMidSessionToolChange: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).
Methods
Section titled “Methods”onToolsChanged()?
Section titled “onToolsChanged()?”
optionalonToolsChanged(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.
Parameters
Section titled “Parameters”changes
Section titled “changes”Description of what tools changed
Returns
Section titled “Returns”Promise<void>
prepareMcpForSession()
Section titled “prepareMcpForSession()”prepareMcpForSession(
context):Promise<McpSessionResources>
Defined in: ../../../adapters/core/src/types/mcp-integration.ts:46
Called when a session starts. Returns adapter-specific resources.
Parameters
Section titled “Parameters”context
Section titled “context”Resolved MCP config for this session (post-visibility-chain)
directTools
Section titled “directTools”object[] = ...
Tools resolved as direct-inject for this session
discoverableTools
Section titled “discoverableTools”object[] = ...
Tools available for discovery in this session
profileId
Section titled “profileId”string | null = ...
Profile identifier (null for default)
projectId
Section titled “projectId”string | null = ...
Project identifier (null for global)
servers
Section titled “servers”object[] = ...
Servers enabled for this session (post-project-filter)
sessionId
Section titled “sessionId”string = ...
Session identifier
Returns
Section titled “Returns”Promise<McpSessionResources>
Resources the adapter needs to consume MCP tools