deleteMcpServer()
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 mcpServerId: string = 'mcpserverid-123'; return client.ai.deleteMcpServer(mcpServerId);}Signature
function deleteMcpServer( mcpServerId: string, client?: WachtClient,): Promise<void>Parameters
›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 };}