disconnectActorMcpServer()
This method manages MCP server configuration or actor-level MCP connectivity.
Usage
The following example shows a basic usage of the backend client from @wacht/nextjs/server.
import { wachtClient } from '@wacht/nextjs/server';export async function example() { const client = await wachtClient(); const actorId: string = 'actorid-123'; const mcpServerId: string = 'mcpserverid-123'; return client.ai.disconnectActorMcpServer(actorId, mcpServerId);}Signature
function disconnectActorMcpServer( actorId: string, mcpServerId: string, client?: WachtClient,): Promise<void>Parameters
›actorId: string;
actorId: string;Actor id used for actor-scoped AI endpoints.
›mcpServerId: string;
mcpServerId: string;Target MCP server id.
Examples
AI usage pattern
import { wachtClient } from '@wacht/nextjs/server';export async function provisionMcp(actorId: string) { const client = await wachtClient(); const server = await client.ai.createMcpServer({ name: 'Internal MCP', transport: 'sse', endpoint_url: 'https://mcp.example.com', }); const connected = await client.ai.connectActorMcpServer(actorId, server.id); return { server, connected };}