listActorMcpServers()
This method lists MCP servers connected for one actor.
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'; return client.ai.listActorMcpServers(actorId);}Signature
function listActorMcpServers( actorId: string, client?: WachtClient,): Promise<PaginatedResponse<ActorMcpServerSummary>>Parameters
›actorId: string;
actorId: string;Actor id used for actor-scoped AI endpoints.
Return value
›data?: ActorMcpServerSummary[] | undefined;
data?: ActorMcpServerSummary[] | undefined;Current page result items.
›has_more?: boolean | undefined;
has_more?: boolean | undefined;Whether additional pages are available.
›limit?: number | undefined;
limit?: number | undefined;Effective page size when returned by backend.
›offset?: number | undefined;
offset?: number | undefined;Effective offset when returned by backend.
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 };}